rem -----------------------------------------------------------------------
rem Filename: whoami.SQL
rem Purpose: Reports information about your current database context
rem Author: Frank Naude, Oracle faq
rem -----------------------------------------------------------------------
SET termout off
STORE set store rep
SET head off
SET pause off
SET termout ON
SELECT 'User: '
||USER
||' on database '
||GLOBAL_NAME,
' (term='
||Userenv('TERMINAL')
||', audsid='
||Userenv('SESSIONID')
||')' AS mycontext
FROM GLOBAL_NAME;
@STORE
SET termout ON
Reports information about your current database context
0 comments:
Post a Comment