Use this bulk materialization method when you cannot suspend updates to the primary database or if you cannot lock the primary data during the select or dump operation that retrieves the subscription data.
This method allows a period of flux at the replicate site during which the replicate data may be inconsistent with the primary data. By the time the subscription becomes VALID, however, the data should be consistent. You must set autocorrection on during materialization so that inconsistencies resulting from continuing updates in the primary database can be resolved without errors.
WARNING! Do not use this method if the replicate minimal columns feature is set for the replication definition or if you execute applied functions or applied stored procedures from the primary database to modify data in the replicate database. In both cases, autocorrection cannot resolve the inconsistencies.
Verify that the entire replication system is working. Refer to Chapter 1, “Verifying and Monitoring Replication Server” in the Replication Server Administration Guide Volume 2 for details.
Execute the define subscription command at the replicate Replication Server.
Wait for the subscription to be defined at both the primary and replicate Replication Servers. Execute the check subscription command at both the primary and replicate Replication Servers to verify that the subscription status is DEFINED.
Execute the activate subscription command, using the with suspension clause, at the replicate Replication Server.
Wait for the subscription to become active at both the primary and replicate Replication Servers. Execute the check subscription command at the replicate Replication Server to verify that the subscription status is ACTIVE. When the subscription status is ACTIVE at the replicate Replication Server, the database connection for the replicate database has been suspended.
As soon as the subscription becomes active at the primary Replication Server, retrieve the data from the primary database using a select or a database dump.
Find the ID number (subid) for the subscription by querying the rs_subscriptions system table. See “Subscription example” for more information.
Execute the rs_marker stored procedure in the primary database:
rs_marker 'validate subscription subid'
WARNING! Be sure that you execute the rs_marker stored procedure with the correct subid number for the subscription. The subid column in the rs_subscriptions system table contains the unique ID number for each subscription. Entering any other number or character string may cause serious problems.
For more information on rs_marker see Replication Server Reference Manual.
Load the subscription data into the replicate database.
Enable autocorrection for the replication definition at the replicate database. See “Using autocorrection” for more information.
Use the resume connection command to resume the database connection for the replicate database.
Wait for the subscription to become valid at both the primary and replicate Replication Servers. Execute the check subscription command at the replicate Replication Server to verify that the subscription status is VALID. Once the subscription status is VALID, the replicate data is consistent with the primary data.
Disable autocorrection for the replicate database. See “Using autocorrection” for more information.
Now the subscription is created and replication is active.