跟踪Oracle中数据更改的最佳方法 [英] the best way to track data changes in oracle
问题描述
作为我正在谈论的标题,跟踪oracle中数据更改的最佳方法是什么?我只想知道要更新/删除/插入的那一行?
as the title i am talking about, what's the best way to track data changes in oracle? i just want to know which row being updated/deleted/inserted?
首先,我考虑触发器,但是我需要在每个表上编写更多触发器,然后记下影响到变更表的rowid,这不好,然后我在Google中搜索,学习有关物化视图的新概念记录并更改数据捕获,
at first i think about the trigger, but i need to write more triggers on each table and then record down the rowid which effected into my change table, it's not good, then i search in Google, learn new concepts about materialized view log and change data capture,
物化视图日志对我很有好处,我可以将其与原始表进行比较,然后我可以获得不同的记录,甚至是不同的字段,我认为从原始创建/复制新表的方式也是相同的(但我不知道有什么不同?);
materialized view log is good for me that i can compare it to original table then i can get the different records, even the different of the fields, i think the way is the same with i create/copy new table from original (but i don't know what's different?);
变更数据捕获组件对我来说很复杂:),所以我不想浪费时间来研究它.
change data capture component is complicate for me :), so i don't want to waste my time to research it.
任何人都拥有跟踪oracle中数据更改的最佳方法的经验吗?
anybody has the experience the best way to track data changes in oracle?
推荐答案
You'll want to have a look at the AUDIT statement. It gathers all auditing records in the SYS.AUD$ table.
示例:
AUDIT insert, update, delete ON t BY ACCESS
关于,
罗布.
Regards,
Rob.
这篇关于跟踪Oracle中数据更改的最佳方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!