1。激活审计
sqlplus / as sysdba
SQL> show parameter audit
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
audit_file_dest string o:\audit\strdb
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> startup force;
SQL> show parameter audit
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
audit_file_dest string o:\audit\strdb
audit_sys_operations boolean TRUE
audit_syslog_level string
audit_trail string DB, EXTENDED
2。审计USER_ABC的操作:
AUDIT SELECT TABLE, INSERT TABLE, DELETE TABLE,UPDATE TABLE, EXECUTE PROCEDURE BY linjun ;
3。查询审计:
select * from DBA_COMMON_AUDIT_TRAIL where object_schema='linjun';