oracle中跟踪数据变化的最佳方式

the best way to track data changes in oracle(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中跟踪数据变化的最佳方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

SQL to Generate Periodic Snapshots from Transactions Table(用于从事务表生成定期快照的SQL)
MyBatis support for multiple databases(MyBatis支持多个数据库)
Oracle 12c SQL: Missing column Headers in result(Oracle 12c SQL:结果中缺少列标题)
SQL query to find the number of customers who shopped for 3 consecutive days in month of January 2020(查询2020年1月连续购物3天的客户数量)
Why we require temporal table in SQL Server 2016 as we have CDC or CT?(既然我们有CDC或CT,为什么我们在SQL Server 2016中需要时态表?)
How to get top 10 data weekly (This week, Previous week, Last month, 2 months ago, 3 month ago)(如何每周获取前十大数据(本周、前一周、上个月、2个月前、3个月前))