二 查看是否审计功能是否启动 SQL> show parameter audit NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ audit_file_dest string /u01/app/oracle/admin/ORCL/adump audit_sys_operations boolean FALSE audit_syslog_level string audit_trail string NONE
三 开启审计
SQL> conn /as sysdba SQL> show parameter audit NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ audit_file_dest string /u01/app/oracle/admin/ORCL/adump audit_sys_operations boolean FALSE audit_syslog_level string audit_trail string NONE
SQL> alter system set audit_sys_operations=TRUE scope=spfile; --审计管理用户(以sysdba/sysoper角色登陆) SQL> alter system set audit_trail=db,extended scope=spfile;
重启实例 SQL> show parameter audit NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ audit_file_dest string /u01/app/oracle/admin/ORCL/adump audit_sys_operations boolean TRUE audit_syslog_level string audit_trail string DB, EXTENDED (完成)
四 关闭审计 SQL> conn /as sysdba SQL> show parameter audit SQL> alter system set audit_trail=none; 重启实例