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

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

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

From: Powell, Mark D <mark.powell_at_eds.com>
Date: Fri, 7 Apr 2006 14:29:21 -0400
Message-ID: <5A14AF34CFF8AD44A44891F7C9FF410506E8DE00@usahm236.amer.corp.eds.com>


Why not capture the OS user which is available via v$session.osuser or sys_context('USERENV','os_user') ?  

HTH -- Mark D Powell --     


From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Jared Still Sent: Friday, April 07, 2006 2:19 PM
To: xiaoyezi.xyz_at_163.com
Cc: oracle-l_at_freelists.org
Subject: Re: How to capture the name of a user that logon on the database as sysdba?

        Perhaps you should mention what you are really trying to do?                           

        On 4/5/06, xiaoyan <xiaoyezi.xyz_at_163.com> wrote:

                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!                  

	-- 
	Jared Still
	Certifiable Oracle DBA and Part Time Perl Evangelist
	


--
http://www.freelists.org/webpage/oracle-l
Received on Fri Apr 07 2006 - 13:29:21 CDT

Original text of this message

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