Wednesday Sep 30, 2009

JDBC URLs with Oracle database

The JDBC URL structure indicated in the DPS doc set to access ORACLE databases is wrong somehow: Referring to the DPS admin guide, the db-url is in the form jdbc:vendor:driver://dbhost:dbport.

A correct db-url for Oracle is jdbc:oracle:thin:@localhost:1521:

Using "//" instead of "@" may lead to errors similar to the one below:


Snipplet from the Oracle EX logs:
28-SEP-2009 12:12:52 \*
(CONNECT_DATA=(SID=orcl)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))) \*
(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=55625)) \* establish \* orcl
\* 12505
TNS-12505: TNS:listener does not currently know of SID given in connect
descriptor

Wednesday Sep 02, 2009

Using DB/2 JDBC driver with DPS

The IBM DB/2 jdbc driver db2jcc.jar has a accompanying license file called db2jcc_license_cu.jar.

Both jar files must be part of the DPS java environment. If you don't, you'll get errors similars to "cannot connect to JDBC datasource .....  license is not present". To provide both jar files (driver and license), use dpconf command as follow:

$ dpconf create-jdbc-data-source -b sample -B jdbc:db2://hostname:50000/ -J file:/path/to/db2jcc_license_cu.jar -J file:/path/to/db2jcc.jar -S com.ibm.db2.jcc.DB2Driver db2-source

Corresponding LDIF entry in the proxy configuration file looks like that:

dn: cn=db2-source,cn=data sources,cn=config
dbUrl: jdbc:db2://hostname.domain:50000/
objectClass: top
objectClass: configEntry
objectClass: dataSource
objectClass: jdbcDataSource
driverClass: com.ibm.db2.jcc.DB2Driver
jarUrl: file:/usr/ds/sberthol/db2/etc/db2jcc.jar
jarUrl: file:/usr/ds/sberthol/db2/etc/db2jcc_license_cu.jar
dbName: sample
cn: db2-source
enabled: true
dbPassword: {3DES}3r1CipqhECC5E4JOLE8geyV3G9e9+QIq
dbUser: db2inst1

About


I am Sylvain Duloutre, I work as a Software Architect in the Oracle Directory Integration Team, the customer-facing part of Directory Services & Identity Management Product Development, working on Technical Field Enablement.

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
9
10
11
12
13
14
16
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today