Trigger Transactional Replication Settings

Enable Transactional Replication wizard or the Manage Transactional Log Settings dialog

The information in this topic applies to trigger-based replications supported for databases as described in Source and Target Options. It explains how to configure the transactional replication settings for trigger-based replications in the Enable Transactional Replication wizard or the Manage Transactional Log Settings dialog available from the Transactional Setup> Manage option on the connection in the Metadata Explorer.

Your system administrator needs to create and define appropriate table spaces and databases to hold the log tables. They should be large enough to handle the expected amount of replication data. The login you are using for the source connection should have appropriate authorizations to create tables.  More about trigger-based replication.

If using IBM Db2 as a source database, the following versions are supported:

  • Db2 UDB v. 7.2 or higher

  • Db2  for OS390 v6 or higher

If using SQL Server as a source database, the following restrictions apply for transactional replications with triggers:

  • Data types "image", "text" and "ntext" are not supported. If you create a transactional replication on a table with fields where these data types defined, the Management Center warns you that the fields will not be replicated. In SQL Server 2005 and SQL Server Express, these types have been replaced by "varbinary(max)", "varchar(max)", and "nvarchar(max)". Microsoft recommends replacing the old data types with the new ones. The new data types are supported when using the Triggers option.

  • The source table does not need a primary key set in SQL Server but it must have a primary key defined in Syniti DR. See  Primary Key Settings for Mirroring and Synchronization for an explanation on how to create a primary key in Syniti DR.

If using SAP Sybase SQL Anywhere triggers option, and you have triggers already defined on your source table, you can use the Trigger Order option to set the value that DBMOTO passes to the ORDER clause in the CREATE TRIGGER statement. In most cases, the default value of 100 works appropriately.

Master Table

Either specify an existing qualified table name, or click Change to create a new table to hold general information about replication transactions including user name, timestamp, table name for each transaction.

There are two tables associated with each replication: a Master table, common to all replications using that connection, and a Log table for each replication source table. The Master table keeps track of all the transactions affecting the source tables and it records general transactional information.

Master and Log tables are created in the schema specified when you set the Master table name. You can choose a Master table name, or use the default _DBM__MASTERLOG. Log tables are automatically generated by Syniti DR and the names are _DBM__LOG_#, where # is a number. The selected schema for the Master and Log tables must not contain other non-Syniti DR tables with names _DBM__LOG_# It is recommended that you create a new schema to use specifically for the Syniti DR Master and Log tables.

Tablespace

It is recommended that you assign a tablespace for the Master table and Log Tables so that it is easier to control log table sizes. If you leave this field blank, the default tablespace value for your login ID will be used. Your system administrator should be able to provide you with the appropriate value for this field.

If you are using SAP HANA, tablespace is not available and schemas are used instead.

If you are using IBM Db2, the value can be entered as dbname.tablespace.

Retention Time

The amount of time in hours that a transaction is kept in the log tables. The default value is 72 hours. When the amount of time a transaction resides in the log exceeds the retention time, the transaction is permanently removed from the log tables. Tuning the retention time provides control over the size of the log tables.

Delete Block Size

Based on the retention time, Syniti DR deletes items from the log. This field specifies the maximum number of records to delete from the Syniti DR log tables with a single SQL statement. The default value is 10,000 records. You do not typically need to edit this value.

Trigger Order

For Sybase SQL Anywhere users only. See note above.

Uncommitted TID Wait Cycle

For SAP HANA users only. This property is used when reading transactions from the master table. The master table is read using read uncommitted, but some databases do not support this isolation level. It is therefore possible that a transaction t2 is committed before t1 (where t1 < t2) and that the transaction ID of the replication is moved ahead before t1 has been replicated. To prevent this issue, whenever a gap in the TID column is identified in the master table, the replication holds for the number of mirroring intervals (as set in the Replication Properties dialog) specified in this property.

Lower-case Trigger Identifiers

When checked, Syniti DR creates objects for the trigger-based replications with lower case names. When unchecked, mixed case is used. This option should be checked if the database default case for identifiers is lower-case.

Ucommitted Transactions Recovery Option

For Oracle and SAP HANA trigger-based replications only. This section can be used to indicate how uncommitted transactions should be handled during replication.

None

No gap conditions handled. Uncommitted transactions may cause data to be skipped in replication.

Wait

Set a number of mirroring intervals to hold all replications on the connection to wait when a gap is found due to an uncommitted transaction. All replications in the connection will hold and wait for the number of cycles specified to see if the gap is filled. If after the number of cycles, a transaction is still not committed, it will be skipped.

Continue and Process when Committed

Instead of pausing all replications in case of a gap, replication proceeds with all currently committed transactions. During the next mirroring cycle, the trigger log table is checked for earlier transactions that now have been committed, and any identified transactions are processed.

Skip Uncommitted Transactions Older Than

If wait or continue are selected, this property sets a limit on the amount of time to wait for uncommitted transactions. For instance, a value of 15 minutes means that, no matter which option you choose, transactions opened and not committed for more than 15 minutes will be skipped.