How to Modify / Set SQLPlus Prompt With Connected Username and SID?

advertisements

_____________________________________________________________________________________________________________________

The Eucharistic Miracles of the World
It is always better have the username and the database SID to be set in the sqlplus prompt to avoid confusions. It will be very useful to identify the database where you connected especially your work involved in multiple databases.
        1.   Setting the prompt temporarily with the current connected session.
set sqlprompt "_CONNECT_IDENTIFIER'-'_USER> "
esbtst-SYS>


        2.   Setting the prompt permanently with glogin.sql file.
Add the required format to the glogin.sql file located in $ORACLE_HOME/sqlplus/admin directory.
$ cd $ORACLE_HOME/sqlplus/admin

$ echo set sqlprompt "_USER'@'_CONNECT_IDENTIFIER> ">>glogin.sql

_____________________________________________________________________________________________________________________

Website Stats

0 comments:

Post a Comment

Labels

Oracle (629) Script (86) General (77) Unix (47) Blog (23) Technology (19) gadget (6) games (6) Business (3) OCI (3) SQL* Loader (3) Datapump (2)
 

acehints.com Copyright 2011-23 All Rights Reserved | Site Map | Contact | Disclaimer