oracle10g_audit_記錄業務_solaris
AUDIT
Purpose
Use the AUDIT statement to:
· Track the occurrence of SQL statements in subsequent user sessions. You can track the occurrence of a specific SQL statement or of all SQL statements authorized by a particular system privilege. Auditing operations on SQL statements apply only to subsequent sessions, not to current sessions.
· Track operations on a specific schema object. Auditing operations on schema objects apply to current sessions as well as to subsequent sessions.
Audit語義流圖
子項
2,oracle audit測試步驟
配置audit_trail為db
SQL> ALTER SYSTEM SET audit_trail=db SCOPE=SPFILE;
System altered.
SQL> SHUTDOWN
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> STARTUP
ORACLE instance started.
Total System Global Area 289406976 bytes
Fixed Size 1248600 bytes
Variable Size 71303848 bytes
Database Buffers 213909504 bytes
Redo Buffers 2945024 bytes
Database mounted.
Database opened.
SQL>
測建一個audit_test使用者,用於審計測試操作用
SQL> show user
USER is "SYS"
SQL> create user audit_test identified by system default tablespace users temporary tablespace temp quota unlimited on users;
User created.
SQL> grant connect to audit_test; ---給測建使用者授權
Grant succeeded.
SQL> grant create table,create procedure to audit_test; ---給測建使用者授權
Grant succeeded.
SQL> audit all by audit_test by access; --申計測建使用者所有的操作
Audit succeeded.
SQL> audit select table,update table,insert table,delete table by audit_test by access;--申計與測建使用者系統許可權相關的操作
Audit succeeded.
---以下開始以測建使用者進行各種操作,用於檢視是否把各種操作申計記錄
SQL> conn audit_test/system
Connected.
SQL> create table test_tab(id number);
Table created.
SQL> insert into test_tab values(1);
1 row created.
SQL> update test_tab set id=id;
1 row updated.
SQL> select * from test_tab;
ID
----------
1
SQL> delete from test_tab;
1 row deleted.
SQL> drop table test_tab;
Table dropped.
在dba_audit_trail資料字典查詢以上操作產生的申計記錄
SQL> conn /as sysdba
Connected.
SQL> col username for a10
SQL> col owner for a10
SQL> col obj_name for a10
SQL> col extended_timestamp for a35
SQL> select username,extended_timestamp,owner,action_name from dba_audit_trail where wner='AUDIT_TEST' order by timestamp;
USERNAME EXTENDED_TIMESTAMP OWNER
---------- ----------------------------------- ----------
ACTION_NAME
----------------------------
AUDIT_TEST 08-SEP-09 09.20.29.576355 AM +08:00 AUDIT_TEST
CREATE TABLE
AUDIT_TEST 08-SEP-09 09.20.43.693351 AM +08:00 AUDIT_TEST
INSERT
AUDIT_TEST 08-SEP-09 09.20.51.383562 AM +08:00 AUDIT_TEST
UPDATE
USERNAME EXTENDED_TIMESTAMP OWNER
---------- ----------------------------------- ----------
ACTION_NAME
----------------------------
AUDIT_TEST 08-SEP-09 09.20.56.698266 AM +08:00 AUDIT_TEST
SELECT
AUDIT_TEST 08-SEP-09 09.21.02.743562 AM +08:00 AUDIT_TEST
DELETE
AUDIT_TEST 08-SEP-09 09.21.15.914372 AM +08:00 AUDIT_TEST
DROP TABLE
6 rows selected.
SQL>
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-614135/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- solaris下配置使用SQL*Plus歷史命令記錄SQL
- Spring AOP 實現業務日誌記錄Spring
- Solaris核心proc目錄簡介(轉)
- Solaris記憶體監控記憶體
- 記錄工作過程中一次業務最佳化
- Solaris8安裝筆記筆記
- Solaris記憶體監控(轉)記憶體
- 業務資料目錄整合
- 使用user_tab_modifications檢視業務運算元據庫記錄
- 論資訊系統的定位--業務活動結果的記錄工具
- PUTTY 記錄操作記錄
- 域名解析的記錄型別:A記錄、CNAME、MX記錄、NS記錄型別
- 大繼的基礎級業務實戰設計記錄(二),眾籌
- Cookie記錄瀏覽記錄Cookie
- solaris記憶體引數調整及管理記憶體
- Xshell 5 記錄操作記錄
- 使用“業務資料目錄”功能在網站上顯示業務資料網站
- 記錄
- 過往業務筆記整理筆記
- 淘寶記錄筆記筆記
- 面試記錄面試
- Git記錄Git
- 命令記錄
- 工具記錄
- 地址記錄
- 機器學習記錄機器學習
- explain記錄AI
- GitText記錄Git
- 思路記錄
- 科研記錄
- MyBatis記錄MyBatis
- MongoDB 記錄MongoDB
- 個人記錄
- git 記錄Git
- 照片記錄
- Kafka 記錄Kafka
- mybatis 記錄MyBatis
- nginx 記錄Nginx