is it possible to use ip:port instead of sid for oracleconnection?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

for example:

connectionstr="DATA SOURCE=192.168.1.11:1521;UID=bnd;PWD=bnd;" instead of
connectionstr="DATA SOURCE=sid;UID=bnd;PWD=bnd;"

new oracleconnection(connectionstr);

is it ok, and what is the format of data source?
 
Hi,

I haven't seen such a thing in use myself, because all the IP address + port
numbers are usually stored in the tnsname.ora file, IINM, so it would be the
right way to connect using the name, instead of the IP address.

-Altaf
 
Back
Top