Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
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')?
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-lReceived on Wed Apr 05 2006 - 10:35:58 CDT