Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Trace users by after logon trigger

510608Mar 29 2008 — edited Mar 30 2008
Hi.

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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 27 2008
Added on Mar 29 2008
17 comments
1,907 views