在Oracle中进行审核 [英] Auditing in Oracle

查看:103
本文介绍了在Oracle中进行审核的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Oracle审计中我需要一些帮助.我们有一个包含许多表的数据库,我们希望能够审计对任何字段中的任何表所做的所有更改.因此,我们希望在这次审核中拥有的东西是:

I need some help in auditing in Oracle. We have a database with many tables and we want to be able to audit every change made to any table in any field. So the things we want to have in this audit are:

  • 修改过的用户
  • 发生更改的时间
  • 旧价值和新价值

所以我们开始创建触发器,该触发器应该对任何表执行审计,但是有问题...

so we started creating the trigger which was supposed to perform the audit for any table but then had issues...

正如我之前提到的,我们有很多表,我们不能为每个表创建一个触发器.因此,该想法是创建一个主触发器,该触发器可以针对触发该触发器的任何表动态运行.我试图这样做,但是一点也不幸运....看来,Oracle仅针对由代码声明的表限制了触发环境,而不像我们想要的那样动态地对其进行限制.

As I mentioned before we have so many tables and we cannot go creating a trigger per each table. So the idea is creating a master trigger that can behaves dynamically for any table that fires the trigger. I was trying to do it but no lucky at all....it seems that Oracle restricts the trigger environment just for a table which is declared by code and not dynamically like we want to do.

您对如何执行此操作有任何想法,或者对解决此问题有任何其他建议吗?

Do you have any idea on how to do this or any other advice for solving this issue?

推荐答案

您不需要编写自己的触发器.

You don't need write your own triggers.

Oracle提供了灵活,细粒度的审计跟踪服务.看看本文档(9i )作为起点. (这是 10克和同一文档的 11g 版本. )

Oracle ships with flexible and fine grained audit trail services. Have a look at this document (9i) as a starting point. ( Here's a link for 10g and 11g versions of the same document.)

您可以进行如此多的审核,以使其像像从壁炉中喝水一样-有时会损害服务器性能,或者可能给您留下太多审核信息,以致您将无法从中快速提取有意义的信息,并且/或者最终可能会占用大量磁盘空间.花一些时间考虑您真正需要多少审计信息以及可能需要保留多长时间.为此,可能需要从基本配置开始,然后在能够实际收集到的审计跟踪数据量的样本后对其进行裁剪.

You can audit so much that it can be like drinking from the firehose - and that can hurt the server performance at some point, or could leave you with so much audit information that you won't be able to extract meaningful information from it quickly, and/or you could end up eating up lots of disk space. Spend some time thinking about how much audit information you really need, and how long you might need to keep it around. To do so might require starting with a basic configuration, and then tailoring it down after you're able to get a sample of the kind of volume of audit trail data you're actually collecting.

这篇关于在Oracle中进行审核的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆