|
| Problem | Configure WAS Data Source using the JDBC-ODBC Bridge | | | | Solution | 1. Create an ODBC System Data SourceOn Windows NT/2000:Launch the ODBC Data Source Administrator from Start/Settings/Control Panel folder on Windows NT and Start/Settings/Control Panel/Administrative Tools on Windows 2000.In the ODBC Data Source Administrator window, select the System DSN tab and click on the Add button to add the new ODBC system data source to configure a data sourceOn UNIX:Various by ODBC vendor. The following example shows how to configure ODBC data source using MERANT DataDirect Connect ODBC Driver:a. Change directory to the directory where the ODBC driver is installed,e.g. /opt/odbc $ cd /opt/odbcb. Source the appropriate script to setup the required environment variables C Shell $ source odbc.csh Bourn or Korn Shell $ . odbc.shc. Configure your ODBC datasourced. Set the environment variable ODBCINI to the odbc.ini file C Shell $ setenv ODBCINI /opt/odbc/odbc.ini Bourn or Korn Shell $ ODBCINI=/opt/odbc/odbc.ini; export ODBCINIe. Make sure you can connect using the sample odbc application "demoodbc" with the data source configured in step 1c.2. Create JDBC Driver and Data Source for WebSphere Application ServerFrom WebSphere Administrative Console:a. Create a JDBC Driver with Class Name: sun.jdbc.odbc.JdbcOdbcDriver URL prefix : jdbc:odbcWith JDK 1.2.2, the jar file Note: On Windows NT/2000 platforms, you don't need to register the sun.jdbc.odbc.JdbcOdbcDriver class it is bundled within the rt.jar file.b. Install the driver for the JDBC Driver created in step 2a. The "Jar file" for the driver depends on the version of JDK you are using: For IBM JDK 1.2.2, select the rt.jar from the c:\WebSphere\AppServer\jdk\jre\lib directory For IBM JDK 1.1.8, select the classes.zip from the JDK's installation directoryc. Create a DataSource with the following properties: Database name: <SystemODBCDatasource> Driver : <JdbcOdbcBridgeDriver> Where <SystemODBCDataSource is the one you created in step 1. <JdbcOdbcBridgeDriver> is the one you created in step 2a.3. This step is for UNIX onlyEdit the startupServer.sh file and add the environment variables required by the ODBC Driver. The following environment variables are required for MERANT DataDirect Connect ODBC Driver:ODBCINI=/opt/odbc/odbc.iniexport ODBCINILIBPATH=/opt/odbc/libexport LIBPATH | |
| |
| |
|
Product categories: Software, Application Servers, Distributed Application & Web Servers, WebSphere Application Server, Administrative Console (all non-scripting) Operating system(s): AIX, Solaris, Windows 2000, Windows NT Software version: 3.0, 3.5 Reference #: 1055141 IBM Group: Software Group Modified date: 2002-07-25
(C) Copyright IBM Corporation 2000, 2004. All Rights Reserved.
|