Deployment with Third Party Databases

9-66 Oracle Fusion Middleware Users Guide for Technology Adapters

9.6.1 Creating a Database Connection Using a Native or Bundled Oracle WebLogic Server JDBC Driver

To create a database connection when using a native or bundled Oracle WebLogic Server JDBC driver: 1. Ensure that the appropriate JDBC driver JAR files are installed and set the class path. For more information, see: ■ Oracle Fusion Middleware Configuring and Managing JDBC Data Sources for Oracle WebLogic Server ■ Oracle Fusion Middleware Type 4 JDBC Drivers for Oracle WebLogic Server ■ Oracle Fusion Middleware Programming JDBC for Oracle WebLogic Server

2. In the File menu, click New.

The New Gallery page is displayed.

3. In the All Technologies tab, under General categories, select Connections.

A list of the different connections that you can make is displayed in the Items pane on the right side of the New Gallery page.

4. Select Database Connection, and then click OK.

The Create Database Connection page is displayed.

5. For Create Connection In, select IDE Connections.

6. Enter a name for this connection in the Connection Name field. For example, SQLServer.

7. Select the appropriate driver from the Connection Type menu.

8. Enter your credentials such as user name, password, and role, if applicable. 9. Enter your connection information. For example, jdbc:sqlserver:HOST-NAME:PORT;databaseName=DATABASE-NAME For more information, see: ■ Table 9–12, Database Driver Selection from Weblogic Server Console ■ Sample entries in the deployment descriptor file weblogic-ra.xml.

10. Click Test Connection.

11. If the connection is successful, click OK.

9.6.2 Creating a Database Connection Using a Third-Party JDBC Driver

To create a database connection when using a third-party JDBC driver: 1. Install the appropriate JDBC driver JAR files and set the class path. For more information, see Section 9.6.4, Location of JDBC Driver JAR Files and Setting the Class Path .

2. In the File menu, click New.

The New Gallery page is displayed. Oracle JCA Adapter for Database 9-67

3. In the All Technologies tab, under General categories, select Connections.

A list of the different connections that you can make is displayed in the Items pane on the right side of the New Gallery page.

4. Select Database Connection, and then click OK.

The Create Database Connection page is displayed.

5. For Create Connection In, select IDE Connections.

6. Enter a name for this connection in the Connection Name field. For example, SQLServer.

7. Select Generic JDBC from Connection Type.

8. Enter your user name, password, and role information.

9. Click New for Driver Class.

The Register JDBC Driver dialog is displayed. Perform Steps 10, 11 and 19 in the Register JDBC Driver dialog.

10. Enter the driver name for example, some.jdbc.Driver for Driver Class.

For example, com.microsoft.sqlserver.jdbc.SQLServerDriver.

11. Click Browse for Library.

The Select Library dialog is displayed. Perform Steps 12 and 18 in the Select Library dialog.

12. Click New to create a new library.

The Create Library dialog is displayed. Perform Steps 13 through 17 in the Create Library dialog.

13. Specify a name in the Library Name field.

For example, SQL Server JDBC.

14. Click Class Path, and then click Add Entry to add each JAR file of your driver to

the class path. The Select Path Entry dialog is displayed.

15. Select a JDBC class file and click Select.

For example, select sqljdbc.jar.

16. Click OK when you have added all the class files to the Class Path field.

17. Click OK to exit the Create Library dialog.

18. Click OK to exit the Select Library dialog.

19. Click OK to exit the Register JDBC Driver dialog.

20. Enter your connection string name for JDBC URL and click Next.

For example, jdbc:sqlserver:HOST-NAME:PORT;databaseName=DATABASE-NAME For more information, see: ■ Table 9–12, Database Driver Selection from Weblogic Server Console ■ Sample entries in the deployment descriptor file weblogic-ra.xml.