Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> How to capture the name of a user that logon on the database as sysdba?

How to capture the name of a user that logon on the database as sysdba?

From: xiaoyan <xiaoyezi.xyz_at_163.com>
Date: Thu, 6 Apr 2006 11:34:35 +0800
Message-ID: <001201c6592b$104d1230$d88870ca@buaad538c81ca1>


In sql*plus, when a user connects to database as sysdba, no matter what his logon nam is, the value of sys_context(¡®userenv¡¯,¡¯session_user¡¯) is always ¡®sys¡¯.

Then, how I get the real name of the user who logons on database as sysdba? That is:  

SQL>conn system/manager as sydba;

SQL>create user wxy identified by wxy;

SQL>grant sysdba to wxy;

SQL>conn wxy/wxy as sysdba  

How can I capture the name of the user ¡®wxy¡¯?

Thanks in advance!  

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Apr 05 2006 - 22:34:35 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US