JDBC drivers

The following table provides an example JDBC URL for database targets. It also provides documentation and download URLs where available. For more information, consult the database vendor's documentation.

Database

JDBC URL
Internet site

MySQL

jdbc:mysql://host[,failoverhost...][:port]/[database]
    [;property=value][;property=value]

The following example URL connects to a MySQL server running on a host on IP address 192.168.0.100, port 3306, database name ADDM_IMPORT, user fred, and password password:

jdbc:mysql://192.168.0.100:3306/ADDM_IMPORT?user=fred&password=password

Download—http://www.mysql.com/products/connector/
Documentation—http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-configuration-properties.html

Postgres

jdbc:postgresql://host:[port]/database
    [?propertyName1][=propertyValue1][&propertyName2][=propertyValue2]

The following example URL connects to a Postgres server running on a host on IP address 192.168.0.100, port 5432, and database name ADDMdatabase:

jdbc:postgresql://192.168.0.100:5432/ADDMdatabase

Download—http://jdbc.postgresql.org/download.html
Documentation—http://jdbc.postgresql.org/documentation/83/connect.html

Oracle

For Oracle, there are two possible connection styles:

Connection using service

jdbc:oracle:<drivertype>:[username/password]@//host[:port]/service

The following example URL connects, using a thin driver, to an Oracle server running on a host on IP address 192.168.0.100, port 1521, and service ADDM_DB:

jdbc:oracle:thin:@//192.168.0.100:1521/ADDM_DB

Connection using SID

jdbc:oracle:<drivertype>:@host[:port]:SID

The following example URL connects, using a thin driver, to an Oracle server running on a host on IP address 192.168.0.100, port 1521, and SID ADDM100:

jdbc:oracle:thin:[username/password]@192.168.0.100:1521:ADDM100

Download—http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html
Documentation—http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-faq-090281.html
For more information about setting up both styles in BMC Discovery, see Multiple Drivers Using the Same JAR (Oracle).

Ingres

jdbc:ingres://host:[port]/database
    [;property=value][;property=value]

The following example URL connects to an Ingres server running on a host on IP address 192.168.0.100, port mnemonic II7, database name ADDMdatabase, user fred, and password password:

jdbc:ingres://192.168.0.100:II7/ADDMdatabase;user=fred;password=password

Download—http://community.ingres.com/wiki/JDBC_Driver
Documentation—http://community.ingres.com/wiki/Open_Office_How_To#Ingres_JDBC_URL_Connection_Information

Sybase

jdbc:sybase:Tds:host[:port][/databasename]

The following example URL connects to a Sybase server running on a host on IP address 192.168.0.100, port 6689, and database name ADDM_DB:

jdbc:sybase:Tds:192.168.0.100:6689/ADDM_DB

Documentation:

http://www.sybase.com/detail?id=1009876#sec2q2

MS SQL

jdbc:sqlserver://serverName[\instanceName][:portNumber]
    [;property=value][;property=value]

The following example URL connects to an instance of MS SQL server called TDA running on a host on IP address 192.168.0.100, port 1433, user fred, and password password. The username and password correspond to a user configured on the database rather than a Windows AD user. For more information, see the related Microsoft article.

jdbc:sqlserver://192.168.0.100\TDA:1433;User=fred;Password=password

Download—http://msdn.microsoft.com/en-us/data/aa937724.aspx
Documentation—http://msdn.microsoft.com/en-us/library/ms378428.aspx
The downloaded file (a gzipped tar archive, current version sqljdbc_3.0.1301.101_enu.tar.gz) contains two JAR files. Use the sqljdbc4.jar the other does not work.

JTDS

 jdbc:jtds:servertype://server[:port][/database]
    [;property=value][;property=value]

The following example URL connects using JTDS to an MS SQL server running on a host on IP address 192.168.0.100, port 1433, database name ADDM_IMPORT, instance TDA, user fred, and password password:

jdbc:jtds:sqlserver://192.168.0.100:1433/ADDM_IMPORT;
    instance=TDA;user=fred;password=password

When using a domain credential (Windows Authentication) of the form DOMAINNAME\username, enter the username in the URL described, and the domain information in the Additional JDBC parameters dialog box in the following form: domain="DOMAINNAME". Also, if the domain controller requires NTLM v2, add the parameter useNTLMv2=true.

The following example URL connects using JTDS to an MS SQL server running on a host on IP address 192.168.0.100, port 1433, database name ADDM_IMPORT, instance TDA, Windows user fred in the domain DOM1, and password password:

jdbc:jtds:sqlserver://192.168.0.100:1433/ADDM_IMPORT;
    instance=TDA;domain=DOM1;useNTLMv2=true;user=fred;password=password

Documentation—http://jtds.sourceforge.net/faq.html#urlFormat

No IPv6 support

IPv6 access using JTDS is not currently possible.

Was this page helpful? Yes No Submitting... Thank you

Comments