Was this helpful?
CreateKeys Options
The CreateKeys option creates replicated transaction keys for every row in the base table and populates the shadow table. It can optionally populate the input queue. You must use CreateKeys if you install Ingres Replicator on an existing database that contains data. If you install Ingres Replicator on empty databases, replicated transaction keys are created and the shadow table is populated automatically when you insert data.
How you use CreateKeys varies depending on the contents of your databases. There are two options when using CreateKeys:
ShadowTableOnly
This option populates the local shadow table. You need to copy the populated shadow table to all Full Peer or Protected Read-only targets that are part of the table’s CDDS.
Note:  Once you use ShadowTableOnly on a database, you need to use the copydb utility to copy the resulting shadow table to other databases in the CDDS. In other words, you cannot use ShadowTableOnly against the same table in two different databases, because the resulting replicated transaction keys do not match.
BothQueue&ShadowTable
This option populates the shadow table and the input queue. Use this option if your databases are not synchronized; the altered rows are placed in the input queue for reconciliation or distribution. This option also needs to be used if the table is horizontally partitioned.
The following table explains when to use which CreateKeys option:
Databases
How To Use CreateKeys
Both are empty
Do not need to use CreateKeys. Because there are no rows of data, no replicated transaction keys can be generated.
One contains data, one is empty
Only use BothQueue&ShadowTable option of CreateKeys if your database is very small. The recommended procedure is to unload the tables with data and reload them into the empty database.
Both contain data and are synchronized
Use the ShadowTableOnly option of CreateKeys. This option populates the shadow tables so that Ingres Replicator does not detect collisions when manipulating rows for the first time.
Both contain data but are not synchronized
If a table to be replicated is rather large, attempt to synchronize the databases through some other means or use the BothQueue&ShadowTable option of CreateKeys. Ingres Replicator populates the shadow tables and sends the rows from the local database to the target database. Nonmatching rows cause collisions, which need to be resolved manually or by using collision resolution. For more information on collision handling, see Collision Design.
Note:  If the BothQueue&ShadowTable option of CreateKeys is used, the rows placed in the input queue are not immediately transferred to the distribution queue. To effect the transfer, ensure that all users disconnect from the database. The transfer takes place when you re-connect.
Create Replicated Transaction Keys
To create the replicated transaction keys for the table
1. Open the Table Registration Summary window, place the cursor on the table where keys are to be created, and choose CreateKeys.
The following menu line appears:
ThisTable     AllTables    End
2. Choose ThisTable to create replicated transaction keys for the selected table, or choose AllTables to create keys for all registered tables that have support objects.
The following menu line appears:
ShadowTableOnly   BothQueue&ShadowTable   Cancel
3. Choose ShadowTableOnly or BothQueue&ShadowTable.
The replicated transaction keys are created and placed in the shadow table. The input queue is populated, if appropriate.
Last modified date: 08/14/2024