Unanswered: how hide password when connect to oracle server?
when i type : connect email@example.com:1521/orcl.local ---> connection is successful,
but when type: connect firstname.lastname@example.org:1521/orcl.local ---> "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.
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.