Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

connect sqlplus using ip+port+sid

762809Dec 2 2010 — edited Dec 2 2010
Hi Friendz,

Oracle DB 9i

I know I was able to connect before using this format:

$ sqlplus apps/apps@192.168.100.5:1521/oaprod
[oratrng@oracletrng ~]$ sqlplus apps/apps@192.168.100.5:1521/oaprod

SQL*Plus: Release 9.2.0.6.0 - Production on Thu Dec 2 12:17:34 2010

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

SP2-0306: Invalid option.
Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
where <logon>  ::= <username>[/<password>][@<connect_string>] | /
Any idea please...

Thanks a lot

MsK

Comments

Billy Verreynne
Use a connection string instead.
sqlplus scott/tiger@"(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<ip>)(PORT=<port>))(CONNECT_DATA=(SID=<sid>))"
762809
Thanks ;) I'll try it now ....does it work in 9i?
762809
its the same error :(
$ sqlplus apps/apps@"(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.100.5)(PORT=1521))(CONNECT_DATA=(SID=OAPROD))"

SQL*Plus: Release 9.2.0.6.0 - Production on Thu Dec 2 12:53:17 2010

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

SP2-0306: Invalid option.
Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
where <logon>  ::= <username>[/<password>][@<connect_string>] | /
Billy Verreynne
Works just fine on 9i:
/home/oracle> sqlplus billyv@"(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.251.93.233)(PORT=1521))(CONNECT_DATA=(SID=orcl)(SERVER=dedicated)))"

SQL*Plus: Release 9.2.0.1.0 - Production on Thu Dec 2 13:08:14 2010

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Enter password: 

Connected to:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.1.0 - Production

SQL> select * from dual;

D
-
X

SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.1.0 - Production
/home/oracle> 
Try using +$ORACLE_HOME/bin/sqlplus+ instead - your sqlplus could be an intermediate script (due to the path) or point to something else via an alias that in turn execute the actual sqlplus for you.

Also test your connection string using tnsping to ensure it is correctly formatted, e.g.
+$ORACLE_HOME/bin/tnsping "<insert string here>"+
Adigozalov Gurban
sqlplus /nolog
connected
conn apps/apps@"(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.100.5)(PORT=1521))(CONNECT_DATA=(SID=OAPROD))"
Anton Scheffer
Add one ) :)
sqlplus apps/apps@"(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.100.5)(PORT=1521))(CONNECT_DATA=(SID=OAPROD)))"
1 - 6
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Dec 30 2010
Added on Dec 2 2010
6 comments
87,993 views