数据库更改通知 - 如何获得 Oracle 表更改的通知

Database change notification - how get notified of changes in Oracle tables

我尝试(但失败了)使用 JDBC 获取有关数据库 table 更改的通知。在这里寻找答案时,我发现自 12c 以来,数据库更改通知已从 JDBC 中删除。

所以 - 我的问题不是问为什么我的代码失败,而是 - 如果我不能使用上述方法,我如何才能收到 table 中更改的通知? table 中的变化是指插入、更新和删除,而不是 ddl 中的变化。

我希望能够以编程方式 register/add 侦听器,而不是依赖 dbadmin 在数据库中添加触发器或 plsql 脚本。

由于代码应该适用于各种客户端安装,因此我不能非常具体地说明它适用于哪个 Oracle 版本。我猜 19 是一个合理的目标版本。

Continuous Query Notification 符合要求吗?

The JDBC drivers can register SQL queries with the database and receive notifications in response to the following:

DML or DDL changes on the objects associated with the queries

DML or DDL changes that affect the result set