Re: Connecting to Oracle using sqlplus, bypass tnsnames.ora question

  • From: "Andre van Winssen" <dreveewee@xxxxxxxxx>
  • To: ltiu@xxxxxxxxxxxxx
  • Date: Tue, 21 Oct 2008 15:31:51 +0200

Hi,

you could use any of these methods:

sqlplus un/pw@hostname:port/sid
or
sqlplus
un/pw@'(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=<hostname>)(Port=<portnr>))(CONNECT_DATA=(SID=<SID>)))'

 I noticed that sqlplus un@hostname:port/sid doesn't work therefore 2nd
method is to be preferred because it allows you to specify password later on
when prompted by sqlplus if you do:
 sqlplus
un@'(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=<hostname>)(Port=<portnr>))(CONNECT_DATA=(SID=<SID>)))'

hth,
Andre


2008/10/21, Lyndon Tiu <ltiu@xxxxxxxxxxxxx>:
>
> Hi guys,
>
> Is there a way to use sqlplus and connect to a database without using
> tnsnames.ora?
>
> Specify the whole connect string in the command line?
>
> Thanks.
>
> --
> Lyndon Tiu
> --
> //www.freelists.org/webpage/oracle-l
>
>
>

Other related posts: