Replication Monitor operation

Source: Internet
Author: User

Replication Monitor operation has three operations: reinitialize Subscriptions,validate replicated Data and Subscription expiration and Dea Ctivation

1,reinitialize Subscriptions

Reinitialize a subscription refers to making a subscription for reinitialization after subscription is created, or the Requires a reinitialization, the subscription is reinitialized to ensure that the data and schema of publication and subscription are the same.

Description of the MSDN Initialize a Subscription:

Subscribers in a replication topology must is initialized, so that they has a copy of the schema from each article in the Publication they has subscribed to and any replication objects that is required, such as stored procedures, triggers, a ND metadata tables. In addition, the subscriber typically receives an initial dataset. The default initialization method uses a full snapshot this includes schema, replication objects, and data, but Publicatio NS can also is initialized without a full snapshot.

The Initialize check box refers to whether Initialize a subscription is required. If the Initialize check box is not selected, publication is non-immeidate_sync_publication by Mark and cannot be reinitialize to subscription.

Reinitializing a subscription involves applying a new snapshot of one or more articles to one or more subscribers

Reinitialization occurs for one of the reasons:

    • You explicitly mark a subscription for reinitialization.
    • You perform an action, such as a property change, that requires a reinitialization.

In both cases, the most recent snapshot are applied to the subscriber of the next time the distribution Agent or the Merge age NT runs. For snapshot and transactional replication if reinitialization occurs, any changes made at the subscriber, but not yet Synchronized with the Publisher, is overwritten by the application of the new snapshot.

IF, you specified that no initial snapshot is to is applied to the subscriber when you created the subscription, and you Then mark the subscription for reinitialization, a snapshot was not applied.

After a publication have been created, an initial snapshot are typically created and copied to the snapshot folder. It's then applied to the Subscriber by the distribution Agent (for transactional and snapshot publications).

On the publication side, Mark Reinitialization

On the subscription side, Mark Reinitialization

For Non-immeidate_sync_publication, cannot reinitialize.

2,subscription Expiration and deactivation

Data synchronization with Subscription and publication may be expire. Data synchronization must be completed within a specified time, i.e. retention period.

The maximum distribution retention period, which is set at the Distributor end, refers to the time distribution DB stores transaction, in hour units.

On the publisher side, view the property of the publication. There are two kinds of behavior of Subscription expiration,


Subscriptions can be deactivated or can expire if they is not synchronized within a specified retention period. The action, occurs depends on the type of replication and the retention period, is exceeded.

If a subscription is not synchronized within the maximum distribution retention period (default of A. hours) and there are Changes in the distribution database that has not been delivered to the Subscriber, the subscription would be marked DEAC Tivated by the distribution clean up job, that runs on the Distributor. The subscription must be reinitialized.

If a subscription is not synchronized within the publication retention period (default of 336 hours), the subscription wil L expire and is dropped by the Expired subscription clean up job, that runs on the Publisher. The subscription must be recreated and synchronized.

If A push subscription expires, it is completely removed and pull subscriptions was not. You must the subscriptions at the Subscriber.

3,validate Replicated Data

In transactional and merge replication, you can validate whether the data for Subscriber and publisher match.

On publication, right click on the popup shortcut menu "Validate subscriptions ..."

Transactional and merge replication allow you to validate that data at the Subscriber matches data at the Publisher. Validation can performed for specific subscriptions or for all subscriptions to a publication. Specify one of the following validation types and the Distribution Agent or Merge agent would validate data the next time I T runs:

    • Row count only. This validates whether the table at the Subscriber have the same number of rows as the table at the Publisher, but does not Validate that content of the rows matches. Row Count Validation provides a lightweight approach to validation the can make your aware of issues with your data.
    • Row count and binary checksum. In addition to taking a count of rows at the Publisher and Subscriber, a checksum of all the data is calculated using the Checksum algorithm. If the row count fails, the checksum is not performed.

How Data Validation Works

SQL Server validates data by calculating a row count or a checksum at the Publisher and then comparing those values to the Row count or checksum calculated at the Subscriber. One value is calculated for the entire publication table and one value are calculated for the entire subscription table, BU T data in text, ntext, or image columns are not included in the calculations.

While the calculations is performed, shared locks is placed temporarily on tables for which row counts or checksums is Being run, but the calculations is completed quickly and the shared locks removed, usually in a matter of seconds.

When binary checksums is used, 32-bit redundancy check (CRC) occurs on a column-by-column basis rather than a CRC on the Physical row on the data page. This allows the columns with the table to is in any order physically on the data page, but still compute to the same CRC F or the row. Binary checksum validation can be used when there is row or column filters on the publication.

If The validation failure is a issue, manually update the data so it's synchronized, or reinitialize the Subscripti On.

Reference Documentation:

https://msdn.microsoft.com/en-us/library/ms152771 (v=sql.110). aspx

https://msdn.microsoft.com/en-us/library/ms151188 (v=sql.110). aspx

https://msdn.microsoft.com/en-us/library/ms152578 (v=sql.110). aspx

https://msdn.microsoft.com/en-us/library/ms152758 (v=sql.110). aspx

https://msdn.microsoft.com/en-us/library/ms151705 (v=sql.110). aspx

https://msdn.microsoft.com/en-us/library/ms151795 (v=sql.110). aspx

Replication Monitor operation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.