oracle 开启 DDL 审计
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4142413/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Turn on DDL auditing
提问by kupa
How to audit DDL statements in oracle 10g and clear audited data before 30days... Thank you.
如何在oracle 10g 中审计DDL 语句并在30 天前清除审计数据... 谢谢。
IN EDITION:
版中:
Howcan I turn on auditing on "ALTER TABLE" statement? when I run AUDIT TABLE; or AUDIT ALTER TABLE; or AUDIT ALTER ANY TABLE; Audited information can't be seen in AUD$ or DBA_AUDIT_TRAIL views.(Just event when system user alters table is written,but there is no record for HR user) why????
如何打开对“ALTER TABLE”语句的审计?当我运行 AUDIT TABLE 时;或审计变更表;或审核更改任何表格;在AUD$或DBA_AUDIT_TRAIL视图中看不到审计信息。(只是系统用户修改表的事件被写入,但HR用户没有记录)为什么????
采纳答案by Rob van Laarhoven
回答by Andrei Co?codan
Check if the audit option is enabled:
检查是否启用了审计选项:
select value
from v$parameter
where name = 'audit_trail';
if the result is 'NONE' (which is default) then the audit is not turned on.
如果结果为“NONE”(默认值),则不会打开审核。
To enable audit you must set the AUDIT_TRAIL initialization parameter in the database initialization parameter file. The parameter must be set to one of the following values: 'DB', 'XML', 'DB,EXTENDED', 'XML,EXTENDED', 'OS'.
要启用审计,您必须在数据库初始化参数文件中设置 AUDIT_TRAIL 初始化参数。该参数必须设置为以下值之一:“DB”、“XML”、“DB,EXTENDED”、“XML,EXTENDED”、“OS”。
For managing audit trail records you can use the DBMS_AUDIT_MGMTpackage.
要管理审计跟踪记录,您可以使用DBMS_AUDIT_MGMT包。