oracle 如何读取Oracle事务日志
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/551987/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do you read the Oracle transaction log
提问by magius
Instead of placing triggers on tables everywhere in an Oracle database, is there a Java API that I can use to read transactions off the Oracle transaction log?
是否有一个 Java API 可用于从 Oracle 事务日志中读取事务,而不是在 Oracle 数据库中的任何表上放置触发器?
My purpose is to be able to detect transactions going into a proprietary(vendor) database and react accordingly. We can't modify the database so that we do not void our maintenance contract.
我的目的是能够检测进入专有(供应商)数据库的交易并做出相应的反应。我们无法修改数据库,以免使我们的维护合同无效。
Please help!
请帮忙!
回答by Gary Myers
There is LogMiner which is SQL based (and so you could access through JDBC).
有基于 SQL 的 LogMiner(因此您可以通过 JDBC 访问)。
http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/logminer.htm#sthref1875
Or you can look at Oracle Streams which reads the logs and generates 'logical change messages' into a queue from the log contents.
或者您可以查看 Oracle Streams,它读取日志并将“逻辑更改消息”从日志内容生成到队列中。
http://download.oracle.com/docs/cd/B19306_01/server.102/b14229/strms_over.htm#i1006309
回答by Suroot
If you are running in *nix, there is a perl module that you could use to tail the file; then break down the lines for yourself.
如果你在 *nix 中运行,有一个 perl 模块可以用来拖尾文件;然后为自己分解线条。