Any Idea's ?
I could make my SQL prompt like this USERNAME@DB1>, Where username is the DB username and DB1 is the global name of the DB. By editing the glogin file and adding the folowing enteries
define X=NotConnected
define Y=DBNAME
Column Usr New_Value X
Column DBName New_Value Y
Select SYS_CONTEXT('USERENV','SESSION_USER' ) Usr From Dual;
Select SYS_CONTEXT('USERENV','DB_NAME') DBNAME From Dual;
set sqlprompt '&X@&Y> '
But I want to get the alias from the tnsnames.ora file, if my tnsnames.ora file would have an entry like following then i would like to see my sql prompt like this SCOTT@DBTEST
DBTEST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 111.1.1.1)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ora9i)
)
)
Any ideas out there?
NK
====================================================
Stand up for your principles even if you stand alone!
====================================================