please create login.sql with as below and put it in to ORACLE_HOME/bin.
define gname=idle
connect &connect_to
column global_name new_value gname
select lower(user) || '@' || substr( global_name,1,
decode( dot, 0, length(global_name), dot-1) ) global_name
from (select global_name, instr(global_name,'.') dot from global_name );
set sqlprompt '&gname> '
now when ever you connect to database use @login instead of connect so you get idea where you are.
i.e.
varakh@NIKUNJ> @login
Enter value for connect_to: ex2005/test@test
Connected.
GLOBAL_NAME
--------------------------------------------------------------------------------
ex2005@TEST
Input truncated to 24 characters
ex2005@TEST>
No comments:
Post a Comment