Home | Previous Page | Next Page   Setting Up and Managing Enterprise Replication > Managing Replication Servers and Replicates > Performing Alter Operations on Replicated Tables >

Remastering a Replicate

The cdr remaster command redefines an existing master replicate, or turns an existing non-master replicate into a master replicate. You must run the cdr remaster command if you add a new replicated column or drop a replicated column. If you modify a replicated column, you should remaster, however, remastering is not mandatory.

Automatic Remastering

To use automatic remastering simply run the cdr remaster command for the replicate for which you want to update the definition.

To use automatic remastering, the master replicate definition must have been created with name verification turned on (--name option of the cdr define replicate command set to y). See Appendix A. Command-Line Utility Reference for details about the cdr remaster command and the cdr define replicate command.

Manual Remastering

You must use manual remastering if your participants to not have matching column names and they were created with name verification turned off (--name option of the cdr define replicate command set to n).

To manually remaster a replicate
  1. Use the cdr define replicate command to create a shadow replicate with the same attributes as the primary replicate and with the --mirrors option, but with a SELECT statement that is correct for the table after the alter operation. The SELECT statement can include newly added columns or omit newly dropped columns.
  2. Use the cdr swap shadow command to exchange the existing primary replicate and the newly created shadow replicate.

While performing the cdr swap shadow operation, Enterprise Replication stores the BEGIN WORK position of the last known transaction sent to the grouper as a swap log position for the current swap operation. Any transaction begun prior to the swap log position will use the original (old) replicate definition. Any transaction begun after the swap log position will use the new replicate definition.

The old replicate definition will be cleaned up automatically after the replicate definition is no longer required by Enterprise Replication.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]