Subscription re-creation procedure

Follow this RSSD recovery procedure if you have created new subscriptions or other DDL since the last transaction dump, and you have not created new routes. DDL commands in RCL include those for creating, altering, or deleting routes, replication definitions, subscriptions, function strings, functions, function-string classes, or error classes.

WARNING! Do not execute any DDL commands until you have completed the subscription re-creation recovery procedure.

As with the subscription-comparison RSSD recovery procedure, following this procedure makes the failed RSSD consistent with upstream RSSDs or with the most recent database and transaction dumps (if there is no upstream Replication Server). It then makes downstream RSSDs consistent with the recovered RSSD.

In this procedure, however, you also either delete or re-create subscriptions that are in limbo due to the loss of the RSSD.

If DDL commands have been executed at the current Replication Server since the last transaction dump, you may have to reexecute them.

To restore an RSSD that requires that lost subscriptions be re-created, follow these steps:

  1. To prepare the failed RSSD for recovery, perform steps 1 through 4 of “Basic RSSD recovery procedure”.

  2. To prepare the RSSDs of all upstream and downstream Replication Servers for recovery, perform step 2 through 3 of “Subscription comparison procedure”.

  3. Shut down all upstream and downstream Replication Servers affected by the previous step. Use the shutdown command.

  4. Restart all upstream and downstream Replication Servers in standalone mode, using the -M flag.

    All RepAgents connecting to these Replication Servers shut down automatically when you restart the Replication Servers in standalone mode.

  5. To reconcile the failed RSSD with all upstream RSSDs, perform step 4 of “Subscription comparison procedure”.

    The failed RSSD should now be recovered.

  6. To reconcile all downstream RSSDs with the RSSD for the current Replication Server, perform step 5 of “Subscription comparison procedure”.

  7. If the recovering Replication Server is an ID Server, to restore the IDs in its RSSD, perform step 6 of “Subscription comparison procedure”.

  8. If the recovering Replication Server is not an ID Server and a database connection was created at the recovering Replication Server after the last transaction dump, perform step 7 of “Subscription comparison procedure”.

  9. Query the rs_subscriptions system table of the current Replication Server for the names of subscriptions and replication definitions or publications and their associated databases.

  10. For each user subscription in the rs_subscriptions system table, execute the check subscription command using the information obtained in step 9.

  11. For each Replication Server that has a non-VALID subscription with the current Replication Server as the primary:

    For each system table, rs_subscriptions and rs_rules:

  12. For each primary Replication Server for which the current Replication Server has a non-VALID user subscription:

    For each system table, rs_subscriptions and rs_rules:

  13. At both the primary and replicate Replication Server, execute the sysadmin drop_queue command for all existing materialization queues for subscriptions deleted in steps 17 through 19.

  14. Restart in normal mode all Replication Servers, and their RepAgents, that had subscriptions to primary data managed by the current Replication Server or with primary data to which the current Replication Server had subscriptions.

  15. Perform steps 5 through 13 of “Basic RSSD recovery procedure”.

  16. Reexecute any DDL commands that executed at the current Replication Server since the last transaction dump.

  17. Enable autocorrection for each replication definition.

  18. Re-create the missing subscriptions using either the bulk materialization method or no materialization.

    Use the define subscription, activate subscription, validate subscription, and check subscription commands for bulk materialization.

  19. For each re-created subscription, restore consistency between the primary and replicate data in either of two ways:

Refer to Chapter 7, “Executable Programs,” in the Replication Server Reference Manual for more information on the rs_subcmp program. Refer to Chapter 8, “Replication Server System Tables,” in the Replication Server Reference Manual for more information on the RSSD system tables.