InfoCenter
Home > 1:
Solution planning and skills overview > 1.2:
Components in a WebSphere environment > 1.2.3:
Planning and skills for databases > 1.2.3.6: Database drivers
<- you are here
1.2.3.6: Database drivers
This section provides information on the drivers that are available for
use with each database supported for use with IBM WebSphere Application
Server. The following topics are included in this section:
Always refer to the documentation accompanying your database as the
authoritative source of driver information. Refer to the WebSphere
Application Server product prerequisites for the latest information
about supported databases, drivers, and operating systems.
Various product interfaces prompt you to enter database-related
settings. These interfaces include the product installation, the database
conversion assistant, and the administrative clients. In the following
table, the first column lists the type of database-related settings to
configure. The second column shows where to find help in identifying the
appropriate values to be supplied for these settings.
Database-related setting |
Source for obtaining the appropriate value |
Database driver path |
See the
driver locations table |
Other database driver settings, including the URL |
See article
6.6.14.1.4.1 |
Database user ID and password |
Usually, the user ID must have administrative authority. Some
databases, such as DB2, place an eight-character limit on the ID.
Consult the case-specific installation and configuration
instructions for your operating system. To access them, click the
appropriate operating system link on the
Welcome page. |
Data sources for obtaining database connections |
See article
6.6.14.1.4.2 |
The following table lists the default locations of JDBC driver files.
See the product
prerequisites for the most up-to-date information on the operating
system brands and databases supported by IBM WebSphere Application Server.
Column 1 in the table lists the operating system, and column 2 shows a
list of the drivers that are available for use with each database
supported for the operating system.
Operating system |
Drivers |
AIX |
- DB2: $DB2_HOME/java/db2java.zip
- Oracle: $ORACLE_HOME/jdbc/lib/classes12.zip
- Sybase:
sybase_install_root/jConnect-5_2/classes/jconn2.jar
- InstantDB: product_installation_root/lib/idb.jar
Merant SequeLink:
- Complimentary copies with WebSphere Application Server:
|
HP-UX |
- DB2: $DB2_HOME/java/db2java.zip
- Oracle: $ORACLE_HOME/jdbc/lib/classes12.zip
- InstantDB: product_installation_root/lib/idb.jar
Merant SequeLink:
- Complimentary copies with WebSphere Application Server:
|
Linux (Intel) |
|
Linux on S/390 |
|
NetWare |
|
Solaris |
- DB2: $DB2_HOME/java/db2java.zip
- Oracle: $ORACLE_HOME/jdbc/lib/classes12.zip
- Sybase:
sybase_install_root/jConnect-5_2/classes/jconn2.jar
- InstantDB: product_installation_root/lib/idb.jar
Merant SequeLink:
- Complimentary copies with WebSphere Application Server:
|
Windows |
|
Here are some tips for selecting JDBC drivers:
- For DB2, consider type 2 application drivers, which are typically
faster than type 2 network drivers.
- DB2 6.1 on HPUX does not support JDBC 2.0.
- For Sybase, consider type 4 thin drivers.
- On Sybase, JDBC 2.0 support is provided by the jConnect 5.2
component
- For Oracle, consider type 4 thin drivers.
- The InstantDB driver is provided with WebSphere Application Server
- Type 2 drivers are typically fastest; however they need to certified
on a case-by-case basis. For driver information, consult the JDBC links
on the Sun Microsystems Web site:
www.javasoft.com
- The TxJDBC drivers associated with IBM WebSphere Application Server
Version 3.0x are no longer required.
Note that these are only guidelines. It is recommended that you
evaluate and confirm the suitability of a driver for your particular
business environment.
Merant SequeLink notes 
- The Merant SequeLink JDBC driver comprises two JAR files:
sljc.jar file, which contains all classes of the
SequeLink JDBC driver that implement the JDBC 2.0 core API
sljcx.jar file, which contains all the classes of the
SequeLink JDBC driver that implement the JDBC 2.0 Optional Package.
- At the time of this writing, the Merant Web site advises the
following:
Use the method setBigDecimal instead of setLong. SequeLink maps the
data type NUMBER of SQLServer to the JDBC data type NUMERIC.
According to the JDBC specification, the Java type
java.math.BigDecimal is the recommended mapping for JDBC data type
NUMERIC. Therefore, use the setBigDecimal or getBigDecimal methods
respectively to bind or retrieve the NUMERIC data type of Microsoft SQL
Server.
Check the Merant Web site for updates to this
information.
Ensure that your operating system environment is set up to enable JDBC
2.0 use. The following steps make it possible to find the appropriate JDBC
2.0 driver for use with WebSphere Application Server administration:
To enable JDBC 2.0 use on Windows NT systems:
- Run the following batch file:
C:\SQLLIB\java12\usejdbc2.bat
(In some cases, the file is named jdbc20.exe.)
- Stop WebSphere Application Server (if it is running) and start it
again.
Changing from JDBC 2.0 to JDBC 1.0 for DB2 on Windows NT
To reverse the changes and return to a JDBC 1.x driver with JDK 1.1.x
settings, run the batch file as follows:
- Stop all DB2 services.
- Stop the IBM WebSphere Application Server administrative service.
- Stop any other processes that use the db2java.zip file. (Note: If
the JVIEW process is active, you must use the Task Manager
utility to stop it.)
- Run the batch file:
C:\sqllib\java12\usejdbc1.bat
- Start the DB2 services.
Determining the level of JDBC in use for DB2 on Windows NT
To see whether JDBC 1.x or 2.0 is in use on your system, view the
following file: C:\sqllib\java12\inuse
On UNIX, perform these steps before installing
or starting WebSphere Application Server.
To enable JDBC 2.0 use with DB2 on UNIX systems:
- Ensure that DB2 is stopped.
- Set up the root user to run the following script:
#DB2_root/java12/usejdbc2.sh
where DB2_root is the directory in which your DB2 product is
installed.
Determining the level of JDBC in use for DB2 on your UNIX system
To see whether JDBC 1.x or 2.0 is in use on your system, do the
following:
- View the WebSphere Application Server admin.config
file.
- In the file, check the administrative server classpath setting to
ensure it includes the DB2
java12 directory (for JDBC 2.0)
or the DB2 java directory (for JDBC 1.x).
Instructions are available for using JTA drivers on particular
operating systems. See your operating system's documentation for more
information.
To enable JTA drivers for DB2 on Windows NT, follow these steps:
- Stop all DB2 services.
- Stop the IBM WebSphere Application Server administrative service.
- Stop any other processes that use the db2java.zip file. (Note: If
the JVIEW process is active, you must use the Task Manager
utility to stop it.)
- Run the batch file:
C:\sqllib\java12\usejdbc2.bat
- Start the DB2 services.
- Configure DB2 to use JTS as the transaction processing (TP) monitor.
From the DB2 Control Center, follow these steps:
- Right-click the DB2 instance that contains the database that is to
be enabled for JTA access.
- Click Multisite Update, Configure to start the
Smartguide utility.
- Click the Use the TP monitor named below radio button.
- Select JTS as the TP monitor.
- Click Done.
- Bind the necessary packages to the database. From the DB2 Command
Line Processor window, issue the following commands:
db2=> connect to mydb2jta
db2=> bind db2home\bnd\@db2cli.lst
db2=> bind db2home\bnd\@db2ubind.lst
db2=> disconnect mydb2jta
where mydb2jta is the name of the database that is to be JTA
enabled, and db2home is the DB2 root installation directory
path (for example, d:\sqllib\bnd\@db2cli.lst).
- When you use an IBM WebSphere Application Server administrative
client (such as the WebSphere Administrative Console) to configure a
JDBC driver, specify the following settings:
- Class name =
COM.ibm.db2.jdbc.app.DB2Driver
- URL prefix =
jdbc:jta:db2
- JTA enabled =
True
To enable JTA drivers on UNIX, follow these steps:
- Stop all DB2 services.
- Stop the IBM WebSphere Application Server administrative service.
- Stop any other processes that use db2java.zip file.
- Run the batch file:
#DB2_root/sqllib/java12/usejdbc2.sh
where DB2_root is the directory in which your DB2 product is
installed.
- Start the DB2 services.
- When you use an IBM WebSphere Application Server administrative
client (such as the WebSphere Administrative Console) to configure a
JDBC driver, specify the following settings:
- Class name =
COM.ibm.db2.jdbc.app.DB2Driver
- URL prefix =
jdbc:jta:db2
- JTA enabled =
True
To enable JTA drivers for use with Oracle via SequeLink on the Windows
NT operating system, follow these steps:
- Setting up Oracle 8.1.6:
- Setting up direct database authentication through SequeLink Manager:
- In SequeLink Services, SLOracle51,
Configuration, Service Settings, and User
Security, set ServiceAuthMethods to Anonymous.
- In SequeLink Services, SLOracle51,
Configuration, Data Source Settings, Default, and
User Security, set DataSourceLogonMethod to
DBMSLogon(UserID,Password).
- Because the XAOpen string, containing the user ID and password, is
stored in the trace log, to ensure security, enter the following
setting: In SequeLink Services, SLOracle51,
Configuration, Service Settings, Logging set
ServiceDebugLogLevel to either Fatal or
Errors.
- Setting up WebSphere Application Server:
- When you create your new JDBC driver, the URL prefix defaults to
the following:
jdbc:sequelink//hostname:19996
Change hostname to the name of your machine, and enter the
port number you are using, represented here by the SequeLink default
of :19996.
- When you create the data source, enter the Oracle environment
variable ORACLE_SID in the Database Name field.
Enter the Oracle environment variable ORACLE_SID.
- Select your server, and on the General tab, click
Environment. Add the CLASSPATH variable, and set its value to
the path in which the SequeLink Client is installed, for example:
#$WAS_HOME/driver/lib/sljcx.jar
where $WAS_HOME is the location where WebSphere
Application Server is installed.
To enable JTA drivers for use with Sybase on the AIX operating system,
follow these steps:
- At a command prompt, enable the Data Transaction Manager (DTM) by
issuing these commands (one per line):
isql -Usa -Ppassword -Sservername
sp_configure "enable DTM", 1
go
- Stop the Sybase Adaptive Server database and start it again.
- At a command prompt, grant the appropriate role authorization to the
EJB user:
isql -Usa -Ppassword -Sservername
grant role dtm_tm_role to EJB
go
Do not use a Sybase JTA connection in an enterprise bean method with an
unspecified transaction context. A Sybase JTA connection does not support
the local transaction mode. The implication is that the Sybase JTA
connection must be used in a global transaction context. |
|