Trace users by after logon trigger
510608Mar 29 2008 — edited Mar 30 2008Hi.
I have to trace some users application to find the source of problems.
Oracle8i Enterprise Edition Release 8.1.7.0.0
connect system/manager@testdb
create or replace trigger login_trigger
after logon on database
begin
if (USER in ('BLAKE','SCOTT')) then
execute immediate
'ALTER SESSION SET EVENTS ''10046 TRACE NAME CONTEXT FOREVER, LEVEL 12''';
end if;
end;
/
show error;
SQL> connect scott/tiger@testdb
ERROR:
ORA-00604: error occurred at recursive SQL level 1
ORA-01031: insufficient privileges
ORA-06512: at line 3
OK, I'll grant a priv.
SQL> connect system/manager@testdb
SQL> GRANT administer DATABASE TRIGGER TO "SCOTT";
SQL> connect scott/tiger@testdb
Connected.
Good, only *.trc file is empty after that and there is no trace information for analyse.
Could you please give me a solution?
Mikhail