Registering server definitions for JDBC data sources
You must register each JDBC server that you want to access in the federated database.
About this task
jdbc.ini
in all the bundled JDBC data sources. For those data
sources that are not bundled with the driver library, you can download the JDBC driver from the
vendor and specify the DRIVER_PACKAGE and DRIVER_CLASS.Procedure
Run the CREATE SERVER statement from the command line for
every JDBC server that you want to register,
For example:
-- New simplifed syntax
CREATE SERVER server_Definition_Name
TYPE jdbc_Datasource_Type
VERSION version_Number
OPTIONS (
URL ‘jdbc_Url_Connect_String');
-- Old traditional syntax
CREATE SERVER server_Definition_Name
TYPE jdbc_Datasource_Type
VERSION version_Number
WRAPPER jdbc_Wrapper_Name
OPTIONS (
DRIVER_PACKAGE 'jdbc_Driver_package_optional',
DRIVER_CLASS ‘jdbc_Driver_Class_Path',
URL ‘jdbc_Url_Connect_String');
Important: When you run the CREATE SERVER statement, it does not create a connection to
data source until you run the CREATE NICKNAME statement. If you specify incorrect connection
information in the OPTIONS parameter, you are not notified of the error until you run either the
CREATE NICKNAME or pass-through statements.