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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Connecting to a remote database with SQL*Plus

Re: Connecting to a remote database with SQL*Plus

From: Andy Hassall <andy_at_andyh.org>
Date: Sun, 01 Dec 2002 00:27:04 +0000
Message-ID: <hmliuu0ttjo5b8fd9q212ke1n33fjmm608@4ax.com>


On 30 Nov 2002 08:59:50 -0800, smazerski_at_yahoo.co.jp (Steve Mazerski) wrote:

>> You didn't configure net8 using the net8 assistant on the client, so the
>> service name you specified couldn't be found in your local tnsnames.ora
>> (usually in $ORACLE_HOME/network/admin)
>
>Aha, that sound like it could be the problem. (Plays around a
>little). Ah, it was. Thanks.
>
>I don't suppose there's any way I can impart the same information
>directly to SQL*PLUS without editing tnsnames.ora? I ask because I am
>used to open source databases where I can tell it directly what
>host/port to connect to using command line flags.

 You're better off using tnsnames.ora, but if you really want to, you can specify a full connection string to sqlplus, e.g. (all on one line - this is likely to wrap)

sqlplus
'username/password@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.16)(PORT=1521)))(CONNECT_ DATA=(SERVICE_NAME=dev92.world)))'

-- 
Andy Hassall (andy@andyh.org) icq(5747695) http://www.andyh.org
http://www.andyhsoftware.co.uk/space | disk usage analysis tool
Received on Sat Nov 30 2002 - 18:27:04 CST

Original text of this message

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