Resynchronizing a Replicate In-Memory or Relaxed-Durability Database with Bulk Materialization

You can use one of two bulk materialization methods to restore an in-memory or relaxed-durability database.

Prerequisites
Before you start bulk materialization, verify that the replication definitions and subscriptions exist.
Task
  1. To quickly empty the inbound and outbound queues, deactivate the subscriptions that have the in-memory or relaxed-durability database:
    deactivate subscription subscription_name
    for {table_repdef_name | func_repdef_name |{publication pub_name |
    database replication definition db_repdef_name}
    with primary at dataserver.database}
    with replicate at dataserver.database
    go

    After you deactivate the subscriptions, Replication Server does not propagate all the transactions in the inbound queue to the outbound queue of the in-memory or relaxed-durability database.

    In contrast, when you drop a subscription, all the committed transactions that have been written into the inbound queue are distributed downstream of Replication Server. You can deactivate a subscription even if the DSI is not running because the deactivation only happens at the primary site. When the deactivate marker arrives at the outbound queue, you can see this entry in the Replication Server log:

    The deactivate marker for subscription subscription_name arrives at outbound queue: data_server_name.database_name.

    After the deactivate marker arrives at the outbound queue, use sysadmin sqm_purge_queue to purge the outbound queue at the replicate site to quickly empty the outbound queue. See Replication Server Reference Manual > Replication Server Commands > sysadmin sqm_purge_queue.

  2. Execute check subscription at both the primary and replicate Replication Servers to verify that the subscription status is DEFINED at the primary Replication Server and VALID at the Replication Server.
  3. Use the "Simulate Atomic Materialization" or "Simulate Nonatomic Materialization" bulk materialization methods described in Replication Server Administration Guide Volume 1 > Manage Subscriptions > Subscription Materialization Methods > Bulk Materialization, to build the in-memory or relaxed-durability database. If you use:
    • Simulate atomic materialization — execute steps 4 to 9
    • Simulate nonatomic materialization — execute steps 4 to 13