Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Deregistration for data change notification fails sometime due to RAC usage

900246Nov 15 2011 — edited Nov 15 2011
We are using the database change notification feature of Oracle to implement caching for our application (Currently we are registering queries only for object change notification). We tried out the sample program given at [http://download.oracle.com/docs/cd/E14072_01/java.112/e10589/dbchgnf.htm#CHDCJFGJ] with a few changes to understand how to integrate with this feature. We have not enabled query change notification, as we do not require it. The rest of the flow remains the same.

We are using Oracle RAC (Standard Edition 11.2.0.2.0) and Oracle JDBC driver (ojdbc6_g.jar)

While the deregistration works fine usually, it sometimes fails with an error:
java.sql.SQLException: an attempt was made to delete a registration that is using a different database instance than the one currently connected to.
at oracle.jdbc.driver.PhysicalConnection.unregisterDatabaseChangeNotification(PhysicalConnection.java:19528)

When this failure occurs, we have observed that the connection obtained during registration is for a different instance than the one obtained during deregistration. Note that this works fine on single instance Oracle server.

We think that the deregistration should be done transparently for the user of the change notification feature, and the user should not be concerned about the fact whether the application uses a RAC or a single instance server. Also, when our application will be used in a production environment, the setup will use a RAC. Hence any suggestions on how to handle this issue will be highly appreciated.

Edited by: 897243 on Nov 14, 2011 9:42 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 13 2011
Added on Nov 15 2011
0 comments
271 views