Using SQL Server from ESB or BPEL in OC4J
Download Microsoft SQL Server JDBC Driver 2.0. When prompted pick the Unix version, which is an archive. Extract the files and locate sqljdbc.jar.
There are several ways to make the classes in the driver available to the platform, for example a shared library can be created. However, the easiest approach is to simply copy sqljdbc.jar to
$ORACLE_HOME/applib. Restart the server.
Open Enterprise Manager and select Administration for the oc4j container where the driver is needed. Select JDBC Resources and create a new Connection Pool. Fill in Name, Connection Factory Class, JDBC URL, Username and Password. The correct connection factory class is
com.microsoft.sqlserver.jdbc.SQLServerDataSource and the URL should be
jdbc:sqlserver://host:1433;databaseName=somedb where host and somedb are the names of the database host and the database itself. The port (1433) may need to be changed as well. Test the connection with:
To use the connection factory with a database adapter, create two data sources as managed data sources using the connection pool, for example MSSQLDataSource and MSSQLDataSource-XA with JNDI locations
jdbc/MSSQLDataSource-XA (the names are arbitrary). Navigate to applications and click on default. In the Modules list, click on DbAdapter and select Connection Factories. Create a new one with
In jDeveloper, copy the jar file to
j2ee\home\applib or create a shared library. Create a new connection. The driver class should be
com.microsoft.sqlserver.jdbc.SQLServerDriver. Test the connection. It should now be possible to use the normal adapter wizards with SQL Server and to deploy and run the finished code.