Thursday, January 3, 2013

OBIEE DAC Connection to DB2 Issue


When I tried to connect to the DB2 (iSeries 5R4) source database from DAC I was not able to connect. My settings and error message were as follows.
The following things are to be checked and validated to establish the connection from OBI DAC to DB2 iSeries or other DB2 database.
(1) the correct IP Address without the symbol “<”
(2) “4.11.3.1 Specifying a Data Source Connection for JD Edwards EnterpriseOne or JD Edwards World Hosted on a DB2 Database If you have a JD Edwards EnterpriseOne or JD Edwards World source system hosted on an iSeries DB2 database, follow the steps in this section to specify the OLTP connection in DAC. 1. From the IBM site, select and download the appropriate driver based on the version of your iSeries DB2 database. 2. Include the driver in the class path, for example, for IBM DB2 on iSeries V5R4M0, download jt400.jar copied from the iSeries server only. 3. On a machine that hosts the DAC Server and an appropriate drive client access for iSeries, create a data source name (DSN) to connect to the source DB2 database (using an ODBC Connection). 4. Log into DAC. 5. From the Views menu, select Setup, then Physical Data Sources. 6. Select the record for the JD Edwards EnterpriseOne or JD Edwards World source. 7. In the Edit tab, complete the following fields:
JDBC Driver The name of the driver. The driver that you enter will override the driver that connects to the iSeries database. The driver that you select must be applicable to the version of iSeries on which JD Edwards EnterpriseOne or JD Edwards World is hosted. For example, for IBM DB2 on iSeries V5R4M0, you would enter this driver: com.ibm.as400.access.AS400JDBCDriver
URL The URL for the driver. The URL that you enter will override the driver URL that connects to the iSeries database. The driver URL that you select must be applicable to the version of iSeries on which JDE source is hosted. For example, for IBM DB2 on iSeries V5R4M0, you would enter this URL: jdbc:as400://<hostname>/LIBRARY”
Set the DB2 Code page:
(3) “4.4.2.2 How to Set the DB2CODEPAGE Environment Variable for DB2 Databases Follow this procedure to set the DB2CODEPAGE environment variable for DB2 databases on machines that have the DB2 client installed. To set the DB2CODEPAGE environment variable for DB2 databases
1. Determine the DB2CODEPAGE value. a. Connect to the Source database, using the following command: SELECT CODEPAGE FROM SYSCAT.DATATYPES WHERE TYPENAME = ‘VARCHAR’ b. Make a note of the result. For example: 1208
2. For Windows: a. Navigate to Control Panel > System and click the Advanced tab. Click Environment Variables. b. In System variables section, click New. c. In the Variable Name field, DB2CODEPAGE. d. In the Variable Value field, enter the value that was returned in Step 1.
3. For UNIX and Linux, set the variable as shown below: setenv DB2CODEPAGE <DB2CODEPAGE value> For example: setenv 1208.”