|
-
After going through all notes and forums,i did the following to extract sql through aud$ but it didnt work.
1.I moved sys.aud$ to system.aud$ and created view aud$ in sys with system.aud$ table.rerun the cataudit.sql in sys schema.
2.Gave all permissions on system.aud$ to sys.
3.Created trigger on sys schema on system.aud$(after insert by each row) and insert the new.sessionid,new.userid,new.timestamp#.
4.Created a table x on scott and enabled all audit on this table.
5.inserted a row in this table.system.aud$ captures this event and my trigger is also fired but it stores only the new.sessioid,new.timestamp,new.userid and when i merge this query with
v$session and v$sqlarea,it fails.My insert statement in the trigger is
insert into dummy select :new.userid,:new.sessionid,:new.timestamp# from dual;
This works fine.
i execute another sql script select sql_text from v$sqlarea where
address =(select prev_sql_Addr from v$session where audsid= what i stored in my dummy table.This gives the exact sql what i ran on the table x.
If i put this script in the trigger the script fails.Pls. help me how to extract the sql by merging aud$ table/v$sqlarea/v$session in the trigger.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|