1.1

Table Of Contents
separated by columns, and it does include those values as part of the connection URL (using
?user=username&password=password). Using the comma-separated arguments ensures that the password
value does not appear in external exception messages.
The LISTENERCLASS argument must specify the built-in SQLFire DBSynchronizer implementation.
Note: You can optionally install and start the AsyncEventListener conguration after you associate
a table with the listener name. Make sure that you use the same listener name with both the CREATE
ASYNCEVENTLISTNER command and the CREATE TABLE command.
5. Start the AsyncEventListener
Use the SYS.START_ASYNC_EVENT_LISTENER procedure to start the new DBSynchronizer
implementation:
sqlf> call sys.start_async_event_listener('TESTLISTENER');
Note: The AsyncEventListener name is a SQL identier and should be entered in uppercase letters
with this procedure.
6. Create identical schema and tables in SQLFire
After you create the DBSynchronizer listener in SQLFire, create tables and associate them with the listener
to have DBSynchronizer propagate subsequent table DML operations to the third-party database. The tables
you create should use the same schema, table name, and table denitions as those you used in the third-party
database. For example:
sqlf> create schema sqlfdb;
sqlf> set schema sqlfdb;
sqlf> create table sqlftest
> (id int not null, name varchar(10))
> asynceventlistener(testlistener);
Notice that the table denition is the same as that used in MySQL, except that includes the
ASYNCEVENTLISTENER clause to associate the table with DBSynchronizer.
Note: Because the associated listener conguration does not have to be available at the time you
create the table, SQLFire does not display an error message if the specied listener name does not yet
exist. Make sure that you use the same listener name with both the CREATE ASYNCEVENTLISTNER
command and the CREATE TABLE command.
7. Execute DML and verify synchronization
After you associate the table with a DBSynchronizer implementation, SQLFire queues DML operations that
are executed against the table to the third-party database specied in the DBSynchronizer INITPARAMS
argument. For example, while still in sqlf, execute:
sqlf> insert into sqlftest values (1, '1st Entry');
Then return to the mysql client and verify that the DML was propagated to your database:
mysql> select * from sqlfdb.sqlftest;
203
Using DBSynchronizer to Apply DML to an RDBMS