Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2007

    Unanswered: how hide password when connect to oracle server?

    when i type : connect scott/tiger@ ---> connection is successful,
    but when type: connect scott@ ---> "ERROR:
    ORA-12514: TNS:listener does not currently know of service requested in connect descriptor"

    please tell me how to hide password on command line.

  2. #2
    Join Date
    Apr 2007

    try to help

    Hi limitmoon,

    About ur question First r u using tnsnames.ora to resolve the ORACLE SID or not
    if so then.

    For windows:
    sqlplus USRNAME --->Enter
    then this will prompt u to enter hidden password

    for unix is the same

  3. #3
    Join Date
    Jul 2006
    To hide a password at the sqlplus command line you can use the ACCEPT command with the HIDE option. See the SQL*Plus Users Guide and Reference for more information about using this command.

    Option 2 is to issue the CONNECT command without a password, and then let Oracle prompt you for the password. This does not work well for scripts that contain CONNECT commands.

    Option 3 is to put the whole connect statement in a file, and call the file in sqlplus. Sqlplus always runs file ./login.sql whenever you launch sqlplus, so consider using that file name. For example, in your home directory or other private location create a text file and add your full connection string. You can add any sqlplus settings you like such as "set lines 100 pages 200 timing on trimspool on serveroutput on size 1000000". Whenever you launch sqlplus from the directory containing this file, Oracle automatically looks for and reads the file login.sql. If you need to re-connect, just call the file manually using the syntax @/path/filename.

  4. #4
    Join Date
    May 2006
    On Windoze, you can connect as:

    sqlplus scott@''
    and on *NIX:

    sqlplus scott@\"\"
    you will then be prompted for the password and therefore avoid having the password on the command line.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts