Checking Database auditing information - if auditing is enabled



conn / as sysdba

Prompt  Auditing Initialisation Parameters

select name || '=' || value PARAMETER
from   sys.v_$parameter where name like '%audit%'
/

Prompt Statement Audits Enabled on this Database

column user_name format a10
column audit_option format a40
select *
from   sys.dba_stmt_audit_opts
/

Prompt  Privilege Audits Enabled on this Database

select * from dba_priv_audit_opts
/

Prompt  Object Audits Enabled on this Database

select (owner ||'.'|| object_name) object_name,
       alt, aud, com, del, gra, ind, ins, loc, ren, sel, upd, ref, exe
from   dba_obj_audit_opts
where  alt != '-/-' or aud != '-/-'
   or  com != '-/-' or del != '-/-'
   or  gra != '-/-' or ind != '-/-'
   or  ins != '-/-' or loc != '-/-'
   or  ren != '-/-' or sel != '-/-'
   or  upd != '-/-' or ref != '-/-'
   or  exe != '-/-'
/
Prompt Default Audits Enabled on this Database

select * from all_def_audit_opts
/

Post a Comment

And that's all there is to it!

If anyone has any other questions or requests for future How To posts, you can either ask them in the comments or email me. Please don't feel shy at all!

I'm certainly not an expert, but I'll try my hardest to explain what I do know and research what I don't know.

Previous Post Next Post