Some Tips with SQL PLus
Many times we may open several SQL*PLUS windows meaning serveral database consoles. In order to identify the right console we can do,
Code:
SQL> host hostname
Queen
SQL> show parameter db_name
NAME TYPE VALUE
------------------------------------ ----------------------------
db_name string kidas
SQL> show user
USER is "SYS"
to be sure on which database as which user we are actually going to run commands.
So after three commands we would run a sql. By setting SQL*plus environmental variable connection identifier we can get rid of it and be sure on which console we are connecting to. Like,
Code:
SQL> SET SQLPROMPT "_USER'@'_CONNECT_IDENTIFIER > "
SYS@kidas >
And now rename the session as of hostname.
cheers