4 Using WebLogic-branded DataDirect Drivers

Learn about the WebLogic-branded DataDirect drivers that are included in the WebLogic Server distribution.

Using DataDirect Documentation

Oracle provides WebLogic-branded versions of DataDirect drivers for DB2, Informix, MS SQL Server, and Sybase. Learn how WebLogic-branded DataDirect drivers are configured and used in a WebLogic Server environment.

For detailed information on these drivers, see Progress DataDirect Connect Series for JDBC User's Guide Release 5.1 and Progress DataDirect for JDBC Drivers Reference Release 5.1 at DataDirect Connectors for JDBC Documentation. You need to make the following adaptations where appropriate when using DataDirect documentation:

  • URLs: substitute "weblogic" for "datadirect"

  • Install directory: the fully qualified installation directory for WebLogic-branded DataDirect drivers is ORACLE_HOME\oracle_common\modules\datadirect.

JDBC Specification Compliance

WebLogic-branded Data Direct drivers are compliant with the JDBC 4.0 specification.

Note:

When comparing WebLogic Server behavior when using drivers from different vendors, it is important to remember that even though the drivers are JDBC specification compliant, a vendor may interpret the specification differently or provide different implementations for a given situation.

For example: When using the WebLogic-branded SQL Server driver, if you enter a negative value (-100) into a TINYINT column where the schema defines the range as 0 to 256, the driver throws an exception, whereas the Microsoft SQL Server driver ignores the minus sign.

Installation

Learn about the installation of DataDirect drivers with WebLogic Server.

WebLogic-branded DataDirect drivers are installed with WebLogic Server in the ORACLE_HOME\oracle_common\modules\datadirect folder, where ORACLE_HOME is the directory in which you installed WebLogic Server. Driver jar files are included in the manifest classpath in weblogic.jar, so the drivers are automatically added to your classpath on the server.

Note:

WebLogic-branded DataDirect drivers are installed by default when you perform a complete installation of WebLogic Server. If you choose a custom installation, ensure that the WebLogic JDBC Drivers option is selected (checked). If this option is unchecked, the drivers are not installed.

WebLogic-branded DataDirect drivers are not included in the manifest classpath of the WebLogic client jar files (for example: wlclient.jar). To use the drivers with a WebLogic client, you must copy the following files to the client and add them to the classpath on the client:

  • For DB2: wldb2.jar

  • For Informix: wlinformix.jar

  • For MS SQL Server: wlsqlserver.jar

  • For Sybase: wlsybase.jar

Supported Drivers and Databases

Learn about supported drivers and databases.

Connecting Through WebLogic JDBC Data Sources

To create a physical database connection in the data source, create a JDBC data source in your WebLogic Server configuration and select the JDBC driver.

Applications can then look up the data source on the JNDI tree and request a connection.

See the following related information:

Developing Your Own JDBC Code

You can develop JDBC code that uses the WebLogic-branded DataDirect drivers as long as the code is included in the WebLogic Server CLASSPATH.

Specifying Connection Properties

You specify connection properties for connections in a data source using the WebLogic Server Administration Console, command-line interface, or JMX API. Connection properties vary by DBMS.

For the list of the connection properties specific to each of the WebLogic-branded DataDirect drivers, see the Connection Properties section for your driver in Progress DataDirect for JDBC User's Guide.

Using IP Addresses

WebLogic-branded DataDirect drivers support Internet Protocol (IP) addresses in IPv4 and IPv6 format.

See Progress DataDirect for JDBC User's Guide Release 5.1 for more details. In a WebLogic environment, simply convert the jdbc:datadirect portion of the URL to jdbc:weblogic. For example, the following connection URL specifies the server using IPv4 format:

jdbc:weblogic:db2://123.456.78.90:50000;DatabaseName=jdbc;User=test; Password=secret

Required Permissions for the Java Security Manager

Using WebLogic-branded DataDirect drivers with the Java Security Manager enabled requires certain permissions to be set in the security policy file of the domain. WebLogic Server provides a sample security policy file that you can edit and use.

The file is located at ORACLE_HOME\wlserver\server\lib. The weblogic.policy file includes all necessary permissions for the drivers.

If you use the weblogic.policy file without changes, you may not need to grant any further permissions. If you use another security policy file or if you use driver features that require additional permissions, see Progress DataDirect for JDBC User's Guide Release 5.1 for details. Use ORACLE_HOME\oracle_common\modules\datadirect as the install_dir where ORACLE_HOME is the directory in which you installed WebLogic Server.

For more information about using the Java Security Manager with WebLogic Server, see Using Java Security to Protect WebLogic Resources in Developing Applications with the WebLogic Security Service.

For MS SQLServer Users

Learn about configuring MS SQLServer for use with DataDirect MS SQL Server driver.

Installing MS SQLServer XA DLLs

WebLogic Server provides the following XA dlls for MS SQL Server:

  • sqljdbc.dll: for 32-bit Windows

  • 64sqljdbc.dll: for 64-bit Windows

  • X64sqljdbc.dll: for the X64 processors

To install, do the following:

  1. cd to the ORACLE_HOME\oracle_common\modules\datadirect directory

  2. For:

    • 32-bit Windows systems, install the sqljdbc.dll file.

    • 64-bit Windows systems, copy the 64sqljdbc.dll file, rename as sqljdbc.dll, and then install the sqljdbc.dll file.

    • X64 processors, copy the X64sqljdbc.dll file, rename as sqljdbc.dll, and then install the sqljdbc.dll file.

Using instjdbc.sql with MS SQLServer

There is a known error in some versions of the DataDirect instjdbc.sql script that installs stored procedures into MS SQLServer versions 2008 and newer. The workaround is to replace all instances of dump tran master with no_log in the instjdbc.sql script with DBCC SHRINKFILE(mastlog, 1).