Wednesday, October 13, 2010

Oracle JDBC Connections


Example of connect string using jdbc

Recommend
the method we use for WebSphere:
jdbc:oracle:thin:@ldap://oid-uat:389/demo,cn=OracleContext,dc=csxt,dc=csx,dc=com  

A single instance:
   jdbc:oracle:thin:@lnx101-vip:1521:demo

Using TNSName: 
   jdbc:oracle:thin:@demo.world

Full URL:
   jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS = (PROTOCOL = TCP)(HOST = lnx101-vip.csxt.csx.com)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST = lnx102-vip.csxt.csx.com)(PORT = 1521))(LOAD_BALANCE = yes)(FAILOVER = on)(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = demo)(FAILOVER_MODE =(TYPE = session)(METHOD = basic)(RETRIES = 10)(DELAY = 1))))

another option :
jdbc:oracle:thin:@ldap:// oid-dev:389/ demo,cn=OracleContext,dc=csxt,dc=csx,dc=com ldap:// oid-dev:389/ demo,cn=OracleContext,dc=csxt,dc=csx,dc=com


Hope this help. Regards Rupam