Using sqlplus without typing a password in the command line (with Instant Cient)?

From: Richard <grin_at_unice.fr>
Date: Wed, 27 Oct 2004 19:24:04 +0200
Message-ID: <417FD9B4.5020700_at_unice.fr>



Hello,

[Quoted] [Quoted] I have just installed for the first time Oracle Server 9i (under Windows [Quoted] 2003) and Instant Client under Linux.

I can't understand how not to type my password in the command line.

Here is the story:

  1. When I type /usr/bin/sqlplus john/mypassword_at_//sirocco.nice.com:1521/DB it works; I am connected to the DB database.
  2. But I don't want to type my password in the command line, so I type /usr/bin/sqlplus john_at_//sirocco.nice.com:1521/DB

And I receive the following message:

SQL*Plus: Release 10.1.0.2.0 - Production on Wed Oct 27 18:38:27 2004

Copyright (c) 1982, 2004, Oracle. All rights reserved.

Usage: SQLPLUS [ [<option>] [<logon>] [<start>] ] where <option> ::= -H | -V | [ [-C <v>] [-L] [-M <o>] [-R <n>] [-S] ]

       <logon> ::= <username>[/<password>][_at_<connect_identifier>] | / | /NOLOG

       <start>  ::= _at_<URL>|<filename>[.<ext>] [<parameter> ...]

"-H" displays the SQL*Plus version banner and usage syntax
"-V" displays the SQL*Plus version banner
"-C" sets SQL*Plus compatibility version <v>
"-L" attempts log on just once
"-M <o>" uses HTML markup options <o>
"-R <n>" uses restricted mode <n>
"-S" uses silent mode

3. If I type a bad password (to type the good one after): /usr/bin/sqlplus john/badpassword_at_//sirocco.nice.com:1521/DB it doesn't work :
SQL*Plus: Release 10.1.0.2.0 - Production on Wed Oct 27 18:34:15 2004

Copyright (c) 1982, 2004, Oracle. All rights reserved.

ERROR:
ORA-01017: invalid username/password; logon denied

Enter user-name: john
Enter password: // I type the good password here ERROR:
ORA-12162: TNS:net service name is incorrectly specified

Enter user-name:
ERROR:
ORA-12162: TNS:net service name is incorrectly specified

SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus

Someone can help me, please ?

Thanks in avance for your answers.

Richard Received on Wed Oct 27 2004 - 19:24:04 CEST

Original text of this message