Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: logon trigger to start tracing
What database version? What is your setting for O7_DICTIONARY_ACCESSIBILITY?
I tried the following in an 8.1.7 database with O7_DICTIONARY_ACCESSIBILITY = FALSE
create user x identified by ... ;
grant create session, create trigger to x ;
(logging on as SYSDBA)
grant execute on sys.dbms_support to x ;
CONNECT X ...
create trigger schema_trace
after logon
on schema
begin
sys.dbms_support.start_trace (waits => false, binds => false) ;
end ;
/
DISCONNECT
logon as user X:
trace file created
logon as user Y:
no trace file created
logon as user Y, say "alter sesssion set current_schema = X ;" no trace file created
No error messages in alert log
> -----Original Message-----
> From: Paul Baumgartel [mailto:treegarden_at_yahoo.com]
>
> In an attempt to catch all SQL issued by a report, I created a logon
> trigger in the report's logon schema. (As SYS, I granted the user
> EXECUTE on DBMS_SESSION before creating the trigger.) As the schema
> owner, I am able to execute DBMS_SESSION.SET_SQL_TRACE interactively.
>
> On logon, trace files are created, but they contain the following:
>
> *** SESSION ID:(27.4739) 2003-07-22 18:52:53.000
> Skipped error 604 during the execution of RPT_PERF.TRACE_ALL
> *** 2003-07-22 18:52:53.000
> ksedmp: internal or fatal error
> ORA-00604: error occurred at recursive SQL level 1
> ORA-01031: insufficient privileges
> ORA-06512: at "SYS.DBMS_SESSION", line 126
> ORA-06512: at line 2
>
>
> When SQL statements are executed in the session, no further trace
> information is added to the file.
Received on Tue Jul 22 2003 - 18:58:04 CDT
![]() |
![]() |