SQL> show parameter audit
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
audit_file_dest string /app/oracle/admin/study/adump
audit_sys_operations boolean FALSE
audit_syslog_level string
audit_trail string NONE
SQL> alter system set audit_trail=true scope=spfile;
System altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 180355072 bytes
Fixed Size 1218364 bytes
Variable Size 79694020 bytes
Database Buffers 92274688 bytes
Redo Buffers 7168000 bytes
Database mounted.
Database opened.
SQL> show parameter audit
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
audit_file_dest string /app/oracle/admin/study/adump
audit_sys_operations boolean FALSE
audit_syslog_level string
audit_trail string TRUE
SQL> audit create session by hr;
Audit succeeded.
SQL> audit create session;
Audit succeeded.
SQL> noaudit create session;
Noaudit succeeded.
-----数据字典
1.privilee (SYSTEM PRIVILEGE)
SELECT * FROM Dba_Priv_Audit_Opts; ---开了哪些审计
SELECT * FROM Dba_Audit_Trail; --审计内容
SELECT * FROM aud$
SELECT * FROM Audit_Actions; --审计动作
2.object (OBJECT PRIVILEGE)
SELECT * FROM dba_obj_audit_opts
3.statement (SQL)
SELECT * FROM dba_stmt_audit_opts
select * from all_def_audit_opts ---
select * from dba_common_audit_trail ---包括标准审计(Standard Audit)\精细粒度审计(Fine-Grained Audit)
SQL> audit create session by hr whenever not successful;
Audit succeeded.
SQL> noaudit table;
Noaudit succeeded.
SQL> noaudit create session by hr;
Noaudit succeeded.
SQL> noaudit create able by test;
noaudit create able by test
*
ERROR at line 1:
ORA-00969: missing ON keyword
SQL> noaudit create table by test;
noaudit create table by test
*
ERROR at line 1:
ORA-01435: user does not exist
SQL> noaudit create table;
Noaudit succeeded.
SQL> noaudit create table by hr;
Noaudit succeeded.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/7356664/viewspace-746113/
,如需转载,请注明出处,否则将追究法律责任。