Re: Connecting to Oracle using sqlplus, bypass tnsnames.ora question
Date: Tue, 21 Oct 2008 15:31:51 +0200
Message-ID: <9b46ac490810210631n162c784fi1b2310346606c932@mail.gmail.com>
Hi,
you could use any of these methods:
sqlplus un/pw_at_hostname:port/sid
or
sqlplus
un/pw@'(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=<hostname>)(Port=<portnr>))(CONNECT_DATA=(SID=<SID>)))'
I noticed that sqlplus un_at_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_at_alumni.sfu.ca>:
>
> 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
> --
> http://www.freelists.org/webpage/oracle-l
>
>
>
-- http://www.freelists.org/webpage/oracle-lReceived on Tue Oct 21 2008 - 08:31:51 CDT