Duplicate detection for system transactions

truncate table and certain supported DDL commands are not logged, although they can be replicated to standby and replicate databases. Refer to “Supported DDL commands and system procedures” for a list of DDL commands supported for replication. Refer to the Adaptive Server Enterprise Reference Manual for information about each DDL command.

Replication Server copies these commands as system transactions, in which Replication Server “sandwiches” the truncate table or similar command between two complete transactions. Execution of the first transaction is recorded in the replicate database in the secondary_qid column of the rs_lastcommit table and in the origin_qid column of that table. If Replication Server records the second transaction, the system transaction has completed, and Replication Server clears the secondary_qid column.

If there is a system failure, and you see the following error message when the system restarts:

5152 DSI_SYSTRAN_SHUTDOWN,"There is a system
transaction whose state is not known. DSI will be
shutdown."

a system command has not completed, and the connection shuts down. You must verify whether the command within the system transaction has executed at the replicate database.

You must include the skip transaction or execute transaction clause with resume connection. Otherwise, Replication Server does not reset the secondary_qid correctly, and the error message reappears.