Oracle審計例子
文章版權所有 Jusin Hao(luckyfriends) ,支援原創,轉載請註明
1. Oracle審計例子
1.1. 建立delete審計
--建立審計NC57模式下面bd_psndoc表的delete操作
Begin
Dbms_Fga.Add_Policy(Object_Schema => 'SCOTT',
Object_Name => 'T1',
Policy_Name => 'T1_audit_delete',
Statement_Types => 'delete');
End;
/
---檢視捕獲策略
Select * From Dba_Audit_Policies;
Order By Timestamp;
select * from t1 where id=4200;
delete t1 where id=4200;commit;
--檢視捕獲資訊
Select Timestamp, Userhost, Os_User, Db_User, Object_Schema, Object_Name, Statement_Type, Sql_Text, Policy_Name
From Dba_Fga_Audit_Trail
1.2. 建立insert升級
--建立審計scott模式下面bd_psndoc表的insert操作
Begin
Dbms_Fga.Add_Policy(Object_Schema => 'SCOTT',
Object_Name => 'T1',
Policy_Name => 'T1_audit_inset',
Statement_Types => 'insert');
End;
/
---檢視捕獲策略
Select a.object_schema,a.object_name,a.policy_name,a.Policy_Text,a.enabled,a.sel,a.ins,a.upd,a.del,a.audit_trail,a.policy_column_options From Dba_Audit_Policies a;
select * from t1 where id=4120;
select * from t1 where id=4120;
insert into t1 values ('4120',to_date('2002-12-25 16:26:12','YYYY-MM-DD hh24:mi:ss'),'aaaaaaaaaaaaaa');
commit;
--檢視捕獲資訊
Select Timestamp, Userhost, Os_User, Db_User, Object_Schema, Object_Name, Statement_Type, Sql_Text, Policy_Name
From Dba_Fga_Audit_Trail
Order By Timestamp;
1.3. 刪除審計
Begin
Dbms_Fga.drop_policy(Object_Schema => 'SCOTT',
Object_Name => 'T1',
Policy_Name => 'T1_audit_inset');
End;
/
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/14710393/viewspace-1171452/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle審計Oracle
- oracle 審計Oracle
- Oracle審計(轉)Oracle
- Oracle:審計清理Oracle
- Oracle審計列表Oracle
- Oracle 審計 auditOracle
- Oracle 審計功能Oracle
- oracle審計功能Oracle
- oracle 審計(Audit)Oracle
- ORACLE AUDIT審計(1)Oracle
- oracle細粒度審計Oracle
- oracle標準審計Oracle
- ORACLE的 審計功能Oracle
- Oracle FGA審計功能Oracle
- Oracle Database標準審計和細粒度審計功能OracleDatabase
- oracle審計-細粒度(轉)Oracle
- oracle 細粒度審計(fga)Oracle
- oracle 審計日誌清理Oracle
- oracle開啟audit(審計)Oracle
- 關於oracle審計功能Oracle
- oracle11g審計Oracle
- oracle審計簡單示例Oracle
- oracle-審計導數Oracle
- Oracle10g審計Oracle
- Oracle 審計的初步操作Oracle
- Oracle Audit 審計 說明Oracle
- [zt] ORACLE審計小結Oracle
- 【安全】oracle 標準審計Oracle
- Oracle OCP(52):細粒度審計Oracle
- oracle10g審計(轉)Oracle
- Oracle OCP(50):審計簡介Oracle
- Oracle OCP(51):簡單審計Oracle
- oracle fga審計(欄位級)Oracle
- Oracle audit 審計功能說明Oracle
- oracle審計(整理自網路)Oracle
- oracle審計簡單設定Oracle
- Oracle 審計和測試操作Oracle
- 初識ORACLE的審計功能Oracle