Oracle11gr2 審計語句增強(一)
在11.2中,Oracle對於AUDIT語句進行了增強。
這一篇介紹將AUDIT的ALL STATEMENT語句。
在以前的版本中,審計只支援AUDIT ALL和AUDIT ALL PRIVILEGES,在11.2中,審計又增加了AUDIT ALL STATEMENTS,可以審計所有的頂級的SQL語句。
SQL> SELECT * FROM V$VERSION;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
SQL> AUDIT ALL STATEMENTS;
審計已成功。
SQL> SELECT USER_NAME, AUDIT_OPTION, SUCCESS, FAILURE
2 FROM DBA_STMT_AUDIT_OPTS;
USER_NAME AUDIT_OPTION SUCCESS FAILURE
------------------------------ ---------------------------------------- ---------- ----------
ALTER SYSTEM BY ACCESS BY ACCESS
SYSTEM AUDIT BY ACCESS BY ACCESS
CREATE SESSION BY ACCESS BY ACCESS
CREATE USER BY ACCESS BY ACCESS
ALTER USER BY ACCESS BY ACCESS
DROP USER BY ACCESS BY ACCESS
PUBLIC SYNONYM BY ACCESS BY ACCESS
DATABASE LINK BY ACCESS BY ACCESS
ROLE BY ACCESS BY ACCESS
PROFILE BY ACCESS BY ACCESS
CREATE ANY TABLE BY ACCESS BY ACCESS
ALTER ANY TABLE BY ACCESS BY ACCESS
DROP ANY TABLE BY ACCESS BY ACCESS
ALL STATEMENTS BY SESSION BY SESSION
CREATE PUBLIC DATABASE LINK BY ACCESS BY ACCESS
GRANT ANY ROLE BY ACCESS BY ACCESS
SYSTEM GRANT BY ACCESS BY ACCESS
ALTER DATABASE BY ACCESS BY ACCESS
CREATE ANY PROCEDURE BY ACCESS BY ACCESS
ALTER ANY PROCEDURE BY ACCESS BY ACCESS
DROP ANY PROCEDURE BY ACCESS BY ACCESS
ALTER PROFILE BY ACCESS BY ACCESS
DROP PROFILE BY ACCESS BY ACCESS
GRANT ANY PRIVILEGE BY ACCESS BY ACCESS
CREATE ANY LIBRARY BY ACCESS BY ACCESS
EXEMPT ACCESS POLICY BY ACCESS BY ACCESS
GRANT ANY OBJECT PRIVILEGE BY ACCESS BY ACCESS
CREATE ANY JOB BY ACCESS BY ACCESS
CREATE EXTERNAL JOB BY ACCESS BY ACCESS
已選擇29行。
下面利用其他使用者執行一些操作:
SQL> SHOW USER
USER 為 "YANGTK"
SQL> CREATE TABLE T_TEST (ID NUMBER);
表已建立。
SQL> INSERT INTO T_TEST VALUES (1);
已建立 1 行。
SQL> SELECT * FROM T_TEST;
ID
----------
1
SQL> DROP TABLE T_TEST PURGE;
表已刪除。
檢查審計結果:
SQL> SELECT USERID, ACTION#, OBJ$NAME
2 FROM SYS.AUD$
3 WHERE OBJ$NAME = 'T_TEST';
USERID ACTION# OBJ$NAME
------------------------------ ---------- ----------
YANGTK 1 T_TEST
YANGTK 2 T_TEST
YANGTK 3 T_TEST
YANGTK 12 T_TEST
透過使用NOAUDIT ALL STATEMENTS語句,可以關閉所有語句的統計:
SQL> NOAUDIT ALL STATEMENTS;
審計未成功。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/4227/viewspace-627071/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle11gr2 審計語句增強(二)Oracle
- Oracle11gr2 AUDIT清除功能增強(一)Oracle
- Oracle11gr2新增遞迴WITH語句(一)Oracle遞迴
- Oracle11gr2簡易連線增強(一)Oracle
- oracle 10g 增強審計(二)----細粒度訪問審計Oracle 10g
- 簡單使用oracle的審計語句Oracle
- 【實驗】Oracle審計語句的使用演示Oracle
- Oracle11gr2 AUDIT清除功能增強(三)Oracle
- Oracle11gr2 AUDIT清除功能增強(四)Oracle
- Oracle11gr2 AUDIT清除功能增強(二)Oracle
- Oracle11gr2觸發器依賴判斷增強(一)Oracle觸發器
- Audit裡審計SQL語句與審計系統許可權的區別SQL
- Oracle11gr2新增遞迴WITH語句(三)Oracle遞迴
- Oracle11gr2新增遞迴WITH語句(二)Oracle遞迴
- Oracle11gr2簡易連線增強(二)Oracle
- Oracle11gr2的PLSQL優化NULL語句OracleSQL優化Null
- oracle 10g 增強審計。表insert 及bind valuesOracle 10g
- 語句審計相關的表是stmt_audit_option_map
- OEM模組審計查詢語句佔用較大資源
- Oracle11gr2觸發器依賴判斷增強(二)Oracle觸發器
- Oracle11gr2物化檢視日誌新增PURGE語句Oracle
- 使用 @Audited 增強Spring Boot 應用程式的資料審計能力Spring Boot
- 最簡單的sql語句(增刪改查統計)SQL
- Oracle使用審計監控使用者執行過的SQL語句OracleSQL
- 發現sql語句真是強大SQL
- Oracle11gr2物化檢視日誌新增COMMIT SCN語句OracleMIT
- Oracle11g安全審計–重要帳號的DDL語句操作記錄Oracle
- Oracle使用系統級觸發器審計重要帳號的DDL語句Oracle觸發器
- 關於評審開發人員的sql語句SQL
- python的with語句,超級強大Python
- 一句話計算出 TopN 的增長情況
- 常用SQL語句1-增刪改查SQL
- 手擼Mysql原生語句--增刪改查MySql
- mysql 資料增刪改查基本語句MySql
- SQL中CASE語句強大功能詳解SQL
- MySQL如何啟用密碼強度審計MySql密碼
- 12條語句學會oracle cbo計算(一)Oracle
- 使用CREATETABLE語句宣告一個計算列(轉)