For anyone interested:
The first SQL (see my original posting) sets hostname, dbname, username and
session_id. It selects from DUAL, which anyone who can connect to the
database should have. Hostnames should not be the same in a RAC config.
The second SQL statement attempts to change the session_id from AUDSID to
V$SESSION.SID. If the user doesn't have SELECT on V$SESSION, the value of
AUDSID remains.
Finally all values are initialized in case the instance is down. That way a
session won't hang waiting for values when setting sqlprompt.
Now does it make sense?
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail.
Oracle LazyDBA home page