Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: SQL*Net connection WITHOUT a tnsnames.ora file ? How?

Re: SQL*Net connection WITHOUT a tnsnames.ora file ? How?

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 1997/08/14
Message-ID: <33f85f83.23244704@newshost>#1/1

On Thu, 14 Aug 1997 11:36:56 -0400, Amit Aggarwal <amaggarwal_at_kendle.com> wrote:

>atraber_at_bigfoot.com wrote:
>>
>> Environment: SUN Solaris 2.5, Oracle 7.3.., SQL*Net 2.3...
>> Task:
>> I need to check a database connection BEFORE a tnsnames.ora file is
>> available on the client workstation.
>>
>> Can all the stuff normally located in the tnsnames.ora somehow be
>> specified on the command line for example for sqlplus ?
>>

Yes it can, here is an example:

sqlplus
'scott/tiger@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=slackdog)(PORT=1521))(CONNECT_DATA=(SID=oracle8)))'

Note that the ' quotes are important for the shell.. It needs to start with DESCRIPTION=, not address=.

>> I tried something like:
>> sqlplus scott/tiger@(ADDRESS=(COMMUNITY=TCP_com)(HOST=...)(Port=..)...
>> but no matter what i specify: in the end there is always a result like
>> ...cannot resolve service name etc...
>>
>> Anybody knows how to get around this tnsnames.ora ?
>> ----------------
>> Arnold Traber
>> Union Bank of Switzerland
>> Postfach
>> CH-8021 Zurich
>> Switzerland
>>
>> -------------------==== Posted via Deja News ====-----------------------
>> http://www.dejanews.com/ Search, Read, Post to Usenet
>
>If I understand correctly, you want to check SQL*Net connection but only
>on server.
>
>You can create tnsnames.ora file on the server itself and put it in
>$ORACLE_HOME/network/admin directory.
>Then run sqlplus scott/tiget_at_service_name.
>
>It should work.
>
>amit
>Oracle DBA/Unix SA

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Bethesda MD

http://govt.us.oracle.com/ -- downloadable utilities



Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Thu Aug 14 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US