Results 1 to 1 of 1
- 02-09-2011, 04:22 PM #1Member
- Join Date
- Nov 2010
- Rep Power
JDBC Connection object creation confusion
I am confused with the URL we provide to create JDBC connection.
Lets say there are 2 databases available i.e., DB1 (IP1), DB2 (IP2).
Oracle Listener is configured to point to DB2 (lets say the SID is MYDB). [SID --> DB2]
Now while creating connetion if I mention IP1 and MYDB as SID, I can still connect successfully but further query to any table throws exception.
Now my question is since we are using SID to create the connection which is already pointing to a IP in listener then why we need to mention the IP again to create Connection object as shown above.
Any clarity will be greately appreciated.
Thanks a lot.
Best Regards - Roy
- By mobosecomin in forum New To JavaReplies: 4Last Post: 01-20-2011, 03:45 AM
- By mac in forum New To JavaReplies: 5Last Post: 06-06-2010, 03:57 PM
- By indranil in forum New To JavaReplies: 1Last Post: 04-13-2010, 12:30 PM
- By enygma in forum Java AppletsReplies: 0Last Post: 01-05-2010, 11:01 AM
- By abimaran in forum New To JavaReplies: 8Last Post: 12-15-2009, 10:58 AM