RE: Connecting to Oracle using sqlplus, bypass tnsnames.ora question
Date: Tue, 21 Oct 2008 08:48:59 -0500
Message-ID: <785A4E1EF4D9E745BAC909B7941BEC009BF541@usplm201.amer.corp.eds.com>
You can always edit sqlnet.ora and remove the TNSNAMES from the order to
check... leaving only EZCONNECT or whatever method you want to use.
hth
Guillermo Alan Bort
DBA / DBA Main Team
EDS, an HP company
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Andre van Winssen
Sent: Tuesday, October 21, 2008 11:32 AM
To: ltiu_at_alumni.sfu.ca
Cc: oracle-l_at_freelists.org
Subject: Re: Connecting to Oracle using sqlplus, bypass tnsnames.ora
question
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=<portn
r>))(CONNECT_DATA=(SID=<SID>)))'
<mailto:un/pw@'(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=%3chostname%3e)
(Port=%3cportnr%3e))(CONNECT_DATA=(SID=%3cSID%3e)))'>
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>)))'
<mailto:un@'(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=%3chostname%3e)(Po
rt=%3cportnr%3e))(CONNECT_DATA=(SID=%3cSID%3e)))'>
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-l
Received on Tue Oct 21 2008 - 08:48:59 CDT