Subscription Materialization Methods

Replication Server offers four methods for creating subscriptions, so you can regulate the effects of materialization on the replication system.

Subscription Materialization Methods

Method

Description

Atomic materialization (default)

This method, invoked using the default form of the create subscription command, copies subscription data through the network in a single atomic operation. Replication Server executes the rs_select_with_lock function to retrieve the primary data. This method provides complete consistency throughout the materialization process, but may temporarily obstruct transactions using the primary or replicate data. Do not use this method for large subscriptions if a long-running transaction is unacceptable in the primary database.

Nonatomic materialization

This method, invoked using the create subscription command with the without holdlock clause, is similar to the atomic method, except that consistency constraints during materialization are relaxed to allow clients at the primary database to process transactions during materialization. Replication Server executes the rs_select function to retrieve the primary data. Subscription data is copied in a series of transactions. Because users are allowed to update primary data, this method may result in transactional inconsistency and incomplete data during materialization. When materialization is complete, all inconsistencies are fully corrected. Autocorrection for the replicate table must be enabled to resolve inconsistencies.

Direct load materialization

This method, invoked using the create subscription command with the without holdlock direct_load clause, differs from nonatomic materialization method in that:
  • Data is loaded directly from a primary table into a replicate table.
  • During the autocorrection phrase, subscriptions fail if there are primary key updates.
  • Replication of other tables is not suspended during direct load materialization.
  • The replicate DSI does not go down if there is an error for a subscription.
  • Multiple tables can be materialized concurrently.
  • Multiple threads can be used to load data from one primary table to a replicate table.

No materialization

This method, invoked using the create subscription command with the without materialization clause, allows you to create a subscription when the subscription data already exists at the replicate database. You can use this method to create subscriptions to table replication definitions, function replication definitions, and database replication definitions.

Bulk materialization

This method is appropriate when there is too much data to copy through the network. This is a “manual” materialization method that allows you to load the subscription data from media such as magnetic tape.

Use this method for subscriptions to database replication definitions and to function replication definitions when data must be initialized at the replicate database.

The commands used for bulk materialization are define subscription, activate subscription, and validate subscription.