1.0

Table Of Contents
If the table has any constraint (primary key, unique) dened, the following types of DML operations do
not cause out-of-synch problems when they are reapplied during failover:
A create operation that is reapplied to a table with a primary key. A primary key constraint violation occurs
and a SQLException is thrown, but DBSynchronizer ignores the exception.
A create or update operation that causes a unique constraint violation. Reapplying a create or update operation
causes a duplicate value, violating the unique constraint. DBSynchronizer ignores the SQLException that is
thrown in this situation.
A create or update operation that causes a check constraint violation. Reapplying create or an update (for
example, incrementing or decrementing a column value) may cause a check constraint to be violated.
DBSynchronizer ignores the SQLException that is thrown in this situation.
In the preceding cases, the constraints prevent the tables from going out of synch with the SQLFire data.
Reapplying certain update operations (such as update T1 set Col1 = 5 where col2 =7) and
delete operations (such as delete from T1 where col1 = 5) do not cause out-of-synch problems.
However, the following types of DML operations do cause out of synch issues when they are reapplied
during failover:
Create operations on a table without a primary key constraint.
In this case, reapplying a create operation creates additional rows.
Update operations that modify the column value relative to its current value.
Reapplying update operations such as update T1 set col1 = col1 +? where col2 = ? cause the
external database to go out-of-synch with the SQLFire data.
Restrictions and Limitations
This release of SQLFire has several restrictions and limitations on the use of DBSynchronizer..
Triggers
Using triggers with DBSynchronizer is not supported. Triggers that are dened on both the external database
and in the SQLFire system can cause multiple executions of trigger-generated DML.
Handling database connectivity problems
If DBSynchronizer encounters an exception while updating or committing to the database, the batch is retained
and the DBSynchronizer thread will continue trying to apply the batch until it is successful.
Concurrent DML operations
If DML operations are executed concurrently on a SQLFire System that has a foreign key relationship based
on parent and child table, a foreign key violation may occur while applying DML operations to the external
database. This can occur even if the SQLFire system successfully executed the DML. Although inserts into
the parent and child table occur in order in the SQLFire system, the inserts may reach DBSynchronizer in
reverse order. To avoid this behavior, perform updates to parent and child tables in a single application thread.
See How the AsyncEventListener Works on page 185.
Queuing DML operations
There is a window in which a DML operation executed on the SQLFire system has not yet been placed into
the internal queue of DBSynchronizer. The record is guaranteed to be placed into the internal DBSynchronizer
queue only when the DML operation is completed.
This restriction also applies to DML operations placed on a gateway sender queue for WAN replication.
Case-insensitive identiers required
vFabric SQLFire User's Guide192
Caching Data with vFabric SQLFire