Creating a Database Connection Using a Native or Bundled Oracle WebLogic Server JDBC Driver Creating a Database Connection Using a Third-Party JDBC Driver

9-68 Oracle Fusion Middleware Users Guide for Technology Adapters

21. Click Test Connection.

22. If the connection is successful, click OK.

9.6.3 Summary of Third-Party JDBC Driver and Database Connection Information

Table 9–12, Database Driver Selection from Weblogic Server Console summarizes the connection information for common third-party databases. For information about PlatformClassName, see Table 9–11, Database Platform Names . For more information, see: ■ Section 9.6.3.1, Using a Microsoft SQL Server ■ Section 9.6.3.2, Using a Sybase Database ■ Section 9.6.3.3, Using an Informix Database ■ Section 9.6.3.4, Using an IBM DB2 Database ■ Section 9.6.3.5, Using a MySQL Database

9.6.3.1 Using a Microsoft SQL Server

You must note the following when connecting to a SQL Server database: ■ User name and password – SQL Server 2005 installs with Windows authentication as the default. Therefore, you do not log in with a user name and password; rather, your Windows user account either has privilege or does not. JDBC requires you to provide a user name and password. ■ Connect string From the sqlcmd login, you can deduce what your connect string is, as in the following examples: Example 1: sqlcmd 1 jdbc:microsoft:sqlserver:localhost:1433 Example 2: sqlcmd -S user.mycompany.com\SQLExpress Table 9–12 Database Driver Selection from Weblogic Server Console Database JDBC Driver Microsoft SQL Server ■ Oracles MS SQL Server Driver Type 4 XA ■ Oracles MS SQL Server Driver Type 4 Sybase ■ Oracles Sybase Driver Type 4 XA ■ Oracles Sybase Driver Type 4 Informix ■ Oracles Informix Driver Type 4 XA ■ Oracles Informix Driver Type 4 IBM DB2 ■ Oracles DB2 Driver Type 4 XA ■ Oracles DB2 Driver Type 4 MySQL MySQLs Driver Type 4 Versions: using com.mysql.jdbc.Driver Oracle JCA Adapter for Database 9-69 1 jdbc:microsoft:sqlserver:user.mycompany.com\SQLExpress:1433 Example 3: sqlcmd -S user.mycompany.com\SQLExpress -d master 1 jdbc:microsoft:sqlserver:user.mycompany.com\SQLExpress:1433;databasename= master A full URL is as follows: jdbc:microsoft:sqlserver:serverName[\instanceName]:tcpPort[;SelectMethod=curs or][;databasename=databaseName] ■ Database name If you must explicitly supply the database name, but do not know it, go to C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data If you see a file named master.mdf, then one of the database names is master. ■ TCP port Ensure that SQL Server Browser is running and that your SQL Server service has TCPIP enabled and is listening on static port 1433. Disable dynamic ports. In SQL Native Client ConfigurationClient Protocols, ensure that TCPIP is enabled and that the default port is 1433. ■ JDBC drivers You must download the JDBC drivers separately. From www.microsoft.com, click Downloads and search on jdbc. You can also try using the DataDirect driver.

9.6.3.2 Using a Sybase Database

This section includes the following topics: ■ Section 9.6.3.2.1, Using a Sybase JConnect JDBC Driver

9.6.3.2.1 Using a Sybase JConnect JDBC Driver URL:

jdbc:sybase:Tds:SERVER-NAME:PORTDATABASE-NAME Driver Class: com.sybase.jdbc.SybDriver Driver Jar: jConnect-6_0\classes\jconn3.jar For information about the Sybase JConnect JDBC driver, refer to the following link: http:www.sybase.comproductsmiddlewarejconnectforjdbc .

9.6.3.3 Using an Informix Database

This section includes the following topics: ■ Section 9.6.3.3.1, Using an Informix JDBC Driver

9.6.3.3.1 Using an Informix JDBC Driver URL:

jdbc:informix-sqli:HOST-NAME-OR-IP:PORT-OR-SERVICE-NAMEDATABA SE-NAME :INFORMIXSERVER=SERVER-NAME Driver Class: com.informix.jdbc.IfxDriver Driver Jar: ifxjdbc.jar 9-70 Oracle Fusion Middleware Users Guide for Technology Adapters For information about the Informix JDBC driver, refer to the following link: http:www-01.ibm.comsoftwaredatainformixtoolsjdbc .

9.6.3.4 Using an IBM DB2 Database

This section includes the following topics: ■ Section 9.6.3.4.1, IBM DB2 Driver ■ Section 9.6.3.4.2, JT400 Driver AS400 DB2 ■ Section 9.6.3.4.3, IBM Universal Driver

9.6.3.4.1 IBM DB2 Driver URL: jdbc:db2:localhost:NAME

Driver Class: com.ibm.db2.jcc.DB2Driver Driver Jar v8.1: db2jcc.jar, db2jcc_javax.jar, db2jcc_license_cu.jar For information about DataDirect driver, refer to the following link: http:www.datadirect.comtechresjdbcproddocindex.ssp

9.6.3.4.2 JT400 Driver AS400 DB2 URL: jdbc:as400:hostname;translate

binary=true Driver Class: com.ibm.as400.access.AS400JDBCDriver Driver Jar: jt400.jar For correct character set translation, use translate binary=true.

9.6.3.4.3 IBM Universal Driver URL: jdbc:db2:hostname:portschemaname

Driver Class: com.ibm.db2.jcc.DB2Driver Driver Jar: db2jcc.jar, db2jcc4.jar and db2java.zip

9.6.3.5 Using a MySQL Database

Use the following information: URL: jdbc:mysql:hostname:3306dbname Driver Class: com.mysql.jdbc.Driver Driver Jar: mysql-connector-java-3.1.10-bin.jar

9.6.4 Location of JDBC Driver JAR Files and Setting the Class Path

This section describes the location of JDBC JAR files and setting the class path at run time and design time. Run Time For both Windows and Linux, you must perform the following steps: 1. Drop the vendor-specific driver JAR files to the user_ projectsdomainssoainfralib directory. 2. Drop the vendor-specific driver JAR files to the Weblogic_ Homeserverlib. 3. Edit the classpath to include the vendor-specific jar file in Weblogic_ HOMEcommonbincommEnv.sh