Monday, 20 August 2007

Database Change Notification in 11g JDBC driver

With the release of the 11g JDBC driver I decided to give Database Change Notification a test drive which is now part of the 11G JDBC driver. I tested this against a 10.2.0.3 database and it worked well, and I can see this being a very popular new feature.

An example and documentation can be found here:

http://download.oracle.com/docs/cd/B28359_01/java.111/b31224/dbmgmnt.htm#CHDEJECF

The 11g JDBC driver can be downloaded from here:

http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html

His some output of the database change event as a result of an INSERT into a table I had previously registered a change event for.

DCNListener: got an event (pas.jdbc.DCNListener@1a001ff)
Connection information : local=papicell-au.au.oracle.com/10.187.80.135:47632, remote=papicell-au2.au.oracle.com/10.187.80.136:15087
Registration ID : 6
Notification version : 0
Event type : OBJCHANGE
Database name : lnx102
Table Change Description (length=1)
operation=[INSERT], tableName=SCOTT.DEPT, objectNumber=101051
Row Change Description (length=1):
ROW: operation=INSERT, ROWID=AAAYq7AAEAAAGv+AAA

No comments: