0

I want to capture truncate and drop operations on my table.

So i executed the following:

SQL> select name, value from v$parameter where name like '%aud%';

NAME           VALUE
----           -----
audit_trail    DB


SQL> create table audit_test (id number);

Table created.


SQL> audit all on audit_test by access;

Audit succeeded.

SQL> create table audit_test (id number);

Table created.


SQL> audit all on audit_test by access;

Audit succeeded.


SQL> truncate table audit_test;

Table truncated.

And the truncate does not exists in the dba_audit_Trail...

Thanks for help.

0

2 (+1) possible reasons:

0 - AUDIT ALL does not audit TRUNCATE operations. Use AUDIT TABLE BY ACCESS;

1 - You perform the above as SYS user. Actions performed by SYS are audited into files, under the location of audit_file_dest

2 - AUDIT (Traditional Auditing)

Track the issuance of SQL statements in subsequent user sessions. You can track the issuance of a specific SQL statement or of all SQL statements authorized by a particular system privilege. Auditing operations on SQL statements apply only to subsequent sessions, not to current sessions.

Try it in a new session.

  • 1- this is not a sys user. I take your 1st suggest and try it, but still didn't worked. After i added the last idea with the new session it worked! If the truncate execute from exist session it just doesn't work. Thank you very much! – user2671057 May 1 '17 at 11:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.