JDBC Connection information

To connect to a database, you must enter the appropriate JDBC database driver and connection string.

The JDBC Connection information dialog appears when you are creating or updating a meta-schema file, or when you are changing the connection for the DB Explorer plug-in.

Figure: JDBC Connection information dialog

Example of a JDBC Connection information dialog.

Figure 1 shows one example of a JDBC connection information form. Depending on where the form appears, the look-and-feel may differ.

Table 1. JDBC Connection information form objects
Form object Description
Current schema field Identifies the current schema, if any. When you select to edit the database connection for a meta-schema file, the name of the currently connected database displays. If no connection has been made, the field states that no schema is selected.
Note:

In some contexts, this read-only field does not display.

Keep schema connection information synchronized checkbox When selected, the schema connection information will be permanently updated for the current meta-schema (.4db). This check box appears as selected and read-only when you edit the database connection for an existing meta-schema file. If you edit the connection from DB Explorer, you can uncheck this option to dissociate the DB Explorer connection information from the meta-schema connection information.
Note:

In some contexts, this read-only field does not display.

Previous connections combobox If you have set connections previously, you can select those connections from this drop-down list. Selecting a connection populates the database type, database driver and connection string fields with the values of that connection.
Database type combobox Select the database type.
Database driver field Enter the database driver. See Table 2.
Connection string field Enter the connection string, which provides the details needed to find and connect to the database. See Table 2 for both the connection string syntax and example.
Database owner field Enter the name of the database owner.
Note:

This field is not always required. Refer to your database vendor documentation.

User name field Enter the user name for the connection.
Note:

This field is not always required. Refer to your database vendor documentation.

User password field Enter the user's password.
Note:

This field is not always required. Refer to your database vendor documentation.

Test Connection button This button allows you to verify that the information entered is valid for connecting to the database.
Table 2. JDBC database connection information, by vendor
Vendor Java Driver Class (Database driver) JDBC connection string format Sample connection string
Oracle
oracle.jdbc.driver.OracleDriver
jdbc:oracle:driver_type:
[username/password]@database_specifier
jdbc:oracle:thin:@//localhost:1521/XE
IBM Informix
com.informix.jdbc.IfxDriver
jdbc:informix-sqli://[{ip-address|host-name}:
{port-number|server-name}][/database-name]:
INFORMIXSERVER=server-name[{;user=user;
password=password]|
CSM=(SSO=database_server@realm,ENC=true)}
[;name=value[;name=value]...]
jdbc:informix-sqli://localhost:9088/native_types:INFORMIXSERVER=ol_informix1170
IBM DB2
com.ibm.db2.jcc.DB2Driver
jdbc:db2://server:port/database
jdbc:db2://localhost:50000/NAT_TYPE
Microsoft SQL Server
com.microsoft.sqlserver.jdbc.SQLServerDriver
jdbc:sqlserver://[serverName[\instanceName]
[:portNumber]][;property=value
[;property=value]]
jdbc:sqlserver://AUCKLAND\SQLEXPRESS2012;databaseName=native_types
Oracle MySQL
com.mysql.jdbc.Driver
jdbc:mysql://[host][,failoverhost...]
[:port]/[database] [?propertyName1]
[=propertyValue1][&propertyName2]
[=propertyValue2]...
jdbc:mysql://localhost:3306/native_types
PostgreSQL
org.postgresql.Driver
jdbc:postgresql://host:port/database
jdbc:postgresql://localhost:5433/native_types
SQLite
org.sqlite.JDBC
jdbc:sqlite:filepath
jdbc:sqlite:F:/tmp/DB/jdbc/tests/sqt_types.db