0

I tried (and failed) using JDBC to get notifications on changes in database tables. When looking for answers here I discovered that Database Change Notification was removed from JDBC since 12c.

So - instead of asking why my code failed my question is - If I cant use the above method how can I get notified of changes in tables? With changes in table I mean inserts, updates and deletes, not changes in ddl.

Preferably I'd like to be able to register/add listeners programmatically instead of depend on dbadmin to add triggers or plsql scripts in the database.

Since the code is supposed to work at various client installations I cant be very specific with which Oracle version this is intended for. I'm guessing 19 is a reasonable version to aim for.

  • The feature is still there, but it was renamed from "Database Change Notification" to "Continuous Query Notification". The APIs haven't changed. – Jean de Lavarene Jan 29 '21 at 17:37

1 Answers1

1

Would Continuous Query Notification fit the bill?

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

Petr
  • 540
  • 1
  • 3
  • 9
  • Thank you. It turns out to be exactly the same process as Database change notification - not really sure of what the difference is? My previous code did actually work - when I ran it on same machine as Oracle server. It was probably the vpn that caused problems – Katarina Stubberud Jan 29 '21 at 14:30