是否可以使用触发器检测oracle物化视图中哪个表的数据发生了变化?
我有一个物化视图,我想检测:
- 当物化视图更新时,
- 哪个表的
- 数据(或行)发生了变化?
I have a materialized view and I want to detect:
- when materialized view is updated
- which table(s)'s
- what data's (or row) changed?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您使用 MV 日志,则基表上应该已经有一个触发器,并且触发器会填充材质视图日志(实际上是一个表),这将假设您正在执行快速刷新而不是完全刷新。检查下表,看看它们是否包含您正在查找的信息:
如果基表的名称太长,则 mlog$_... 和 rupd$... 名称可能会被截断。希望对您有帮助。
If you are using a MV log there should already be a trigger on the base table(s) and the triggers an populating the material view log (actually its a table) This would assume that you are doing fast refreshes instead of complete refreshes. Check the following tables to see if they contain the information that you are looking for:
The mlog$_... and rupd$... name may get truncated in case the base table's name is too long. Hope that helps you.