Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: connecting to Oracle without using TNSNAMES.ORA
George Meltser wrote:
>
> Is it possible to connect to Oracle by specifying the connection description
> (host, port, instance_name etc) rather than connect string?
> If yes, what is the correct syntax to do it?
Sure! The syntax is basically the same as what's in your tnsnames.ora. For example:
sqlplus usr/pwd@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(COMM UNITY=TCP.world)(PROTOCOL=TCP)(Host=ahostname.com)(Port=1 521)))(CONNECT_DATA=(SID=ASIDNAME))) Received on Thu May 18 2000 - 00:00:00 CDT