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

Home -> Community -> Mailing Lists -> Oracle-L -> why 'DBSNMP'and 'SYSMAN' are found when I tried to get the valeu of sys_context('userenv','session_user')?

why 'DBSNMP'and 'SYSMAN' are found when I tried to get the valeu of sys_context('userenv','session_user')?

From: С <xiaoyezi.xyz_at_163.com>
Date: Wed, 5 Apr 2006 23:35:58 +0800
Message-ID: <00cb01c658c6$a5dc6090$d88870ca@buaad538c81ca1>


I want to find the value of the 'sys_context('userenv','session_user')'when the user longon of database,and I wrote the folloing statements:  

create user t identified by t;

grant connect,resource to t;  

create user t1 identified by t1;

grant connect,resource to t1;    

conn t/t;

create table u (username varchar2(20));

grant select,delete on u to t1;  

conn system/manager as sysdba;  

create or replace trigger user_logon

after logon

on database

begin

insert into t.u values(sys_context('userenv','session_user'));

end;

/  

and then:  

SQL>conn t1/t1;

SQL> select * from t.u;  

USERNAME


T1  

SQL>conn t/t;

SQL> select * from t.u;    

USERNAME


T1

T

SQL> grant insert on u to t1;

SQL> select * from t.u;  

USERNAME


T1

T

SYSMAN   now 'SYSMAN' is found, why? and sometimes, it is 'DBSNMP', is there some kind of regulation about the emergence of 'SYSMAN'and 'DBSNMP'anybody can tell me? Thank in advance.

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

Original text of this message

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