Subscriptions pass through phases before they are fully set up or removed from the replication system. The phases for setting up a subscription are:
Definition – create subscription or define subscription add the subscription to the RSSD for the primary and replicate Replication Servers.
Activation – takes place after subscription resolution. The primary Replication Server adds the subscription to the Subscription Resolution Engine (SRE). The SRE compares log records to the current subscriptions to determine where changes to replicated tables must be distributed.
Materialization – for atomic and nonatomic subscriptions, the primary Replication Server retrieves subscription data from the primary database and copies it to the replicate Replication Server to be applied to the replicate database.
Validation – both the primary and replicate Replication Server completely materialize the subscription and verify it is consistent with the primary data.
The phases for removing subscription data, using the drop subscription command, are:
Dematerialization – stops sending updates for the subscription to the replicate database and, if the with purge clause is specified, deletes the subscription data from the replicate database (if the data is not included in other subscriptions). If the without purge clause is specified, then Replication Server does not delete the data from the replicate database.
Removal – deletes the subscription from the RSSD for both the primary and replicate Replication Servers.
Materialization or dematerialization can fail during any of these stages. This is why you need to monitor the progress of a subscription using the check subscription command. See “Using the check subscription command” for more information. In addition to the check subscription command, you can use the admin who command to check the status of the Replication Server threads processing the subscription. For atomic and nonatomic materialization, Replication Server builds a materialization queue that contains rows to be added to the replicate table. The admin who, sqm command can monitor queue activity, and the admin who, dsi command can show you whether the DSI thread is running.
Refer to Chapter 3, “Replication Server Commands,” in the Replication Server Reference Manual for information about executing admin who and interpreting its results.
Refer to the Replication Server Troubleshooting Guide for comprehensive troubleshooting information that details the status of a subscription and suggested actions.