the best way to track data changes in oracle(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记录下来,这不好,然后我在谷歌搜索,学习关于物化视图的新概念记录和更改数据捕获,
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?
推荐答案
您需要查看 审计 声明.它收集 SYS.AUD$ 表中的所有审计记录.
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
问候,
罗布.
这篇关于oracle中跟踪数据变化的最佳方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:oracle中跟踪数据变化的最佳方式


基础教程推荐
- MySQL根据从其他列分组的值,对两列之间的值进行求和 2022-01-01
- 使用 VBS 和注册表来确定安装了哪个版本和 32 位 2021-01-01
- while 在触发器内循环以遍历 sql 中表的所有列 2022-01-01
- 带有WHERE子句的LAG()函数 2022-01-01
- ORA-01830:日期格式图片在转换整个输入字符串之前结束/选择日期查询的总和 2021-01-01
- MySQL 5.7参照时间戳生成日期列 2022-01-01
- CHECKSUM 和 CHECKSUM_AGG:算法是什么? 2021-01-01
- 如何在 CakePHP 3 中实现 INSERT ON DUPLICATE KEY UPDATE aka upsert? 2021-01-01
- 从字符串 TSQL 中获取数字 2021-01-01
- 带更新的 sqlite CTE 2022-01-01