trigger for 10046 event for schema(session level)
hello all, i am trying to trace a schema for some stuff. We want a 10046 trace for this user(lets call it scott). so i did the below. i wanted my trace file to be called test, so it easy to lookup in udump. and then i did hte alter session set event to trigger the trace. it says it created it with compilation errors. and now when i try to login as scott, it throws an error saying...trigger name is invalid and failed re-validation(ORA - 04098)..i tried compile invalid object, it dont work...
wat am i doing wrong here???
CREATE OR REPLACE TRIGGER testing
after logon
on SCOTT.schema
begin
execute immediate 'ALTER SESSION SET TRACEFILE_IDENTIFIER=''TEST''';
execute immediate 'ALTER SESSION SET EVENTS='10046 trace name context forever, level 12';';
end;
/
if the above is wrong...how can i get a 10046 trace event(at session level) on a schema with a trigger ?? or how can i fix the above ?? thanks in advance.