Oracle table change notification in Java

I need to run the method in Java every time a specific Oracle database table is updated (any kinds of updates, including records, additions and changes to records).

What is the most efficient way to β€œquery” a table for changes with Java, which has good performance and does not put too much pressure on the database?

Unfortunately, I have many limitations:

  • I cannot create additional tables, triggers, stored procedures, etc., because I do not have control over the administration / design of the database.
  • I would rather avoid the Oracle Change Notification , as suggested in post , as it seems to include C / JNI.
  • Just counting records is not good enough, as I can skip the changes and add / remove at the same time.
  • a delay of up to 30/60 seconds between the actual change and the notification is permissible.
  • The tables that I want to track usually have 100k + records (about 1 m +), so I don’t think pulling all the tables is an option (in terms of database load / performance).
+4
source share
1 answer

Starting with oracle 11g you can use Oracle Change Notification using a regular JDBC driver Link

+5
source

Source: https://habr.com/ru/post/1414865/


All Articles