【问题标题】:How to check audit trail size and flush or truncate audit trial?如何检查审计跟踪大小并刷新或截断审计试验?
【发布时间】:2018-02-26 03:01:58
【问题描述】:

我们创业公司有Oracle数据库,整个数据库只剩下1GB空间,很快就被占用了,怎么做才能腾出数据库空间呢?

我们可以截断或删除数据库中的审计跟踪记录吗? 如果有怎么办? 还有其他在数据库中腾出空间的技巧吗?

【问题讨论】:

标签: oracle audit audit-trail audit-logging


【解决方案1】:

看来你的

审计跟踪

参数设置为

DB
Write the standard audit content to sys.aud$ table

DB, EXTENDED 
Write standard audit content to sys.aud$ along
with the SQL text and bind variable content that
was executed for that SQL

您应该通过设置将内容写入操作系统文件

审计跟踪

到以下之一:

OS 
Write the standard audit content to text files

XML 
Write the standard audit content and FGA ( Fine Grained Auditing ) audit
content to an XML formatted file 

XML, EXTENDED 
Write the standard audit content and FGA content
to an XML formatted file along with SQL text and
bind variable content. 

例如,您可以发出以下命令:

SQL> alter system set AUDIT_TRAIL=xml, extended scope=spfile;

然后,您需要重新启动数据库。

我忘了说截断,好的,你可以备份 sys.aud$ 表,然后你可以用经典的方式截断: truncate table sys.aud$

【讨论】:

猜你喜欢
  • 2018-10-23
  • 2011-11-26
  • 1970-01-01
  • 1970-01-01
  • 2018-01-31
  • 2015-10-23
  • 1970-01-01
  • 2011-04-26
  • 2016-09-15
相关资源
最近更新 更多