// Register each table for database events, this is done by executing a select from the table.
for (DatabaseTable table : this.descriptorsByTable.keySet()) {
OracleStatement statement = (OracleStatement)connection.createStatement();
statement.setDatabaseChangeRegistration(this.register);
try {
statement.executeQuery("SELECT ROWID FROM " + table.getQualifiedName()).close();
databaseSession.log(SessionLog.FINEST, SessionLog.CONNECTION, "dcn_register_table", table.getQualifiedName());
} catch (Exception failed) {
// This will fail if the table does not exist,
// just log the error to allow table creation to work.
databaseSession.logThrowable(SessionLog.WARNING, SessionLog.SQL, failed);