SQL 2012 Publishing and subscription implementation data synchronization plot (resolve error 22022)

Source: Internet
Author: User

Original: SQL 2012 publish and subscribe to implement data synchronization plots (resolve error 22022)

Concept See also: https://msdn.microsoft.com/zh-cn/library/ms151170.aspx

Push subscriptions

  changes can be pushed to subscribers on demand, continuously, or on a schedule. The Distribution Agent or Merge Agent runs at the Distributor.

  • Typically, data is synchronized continuously or in accordance with a schedule that is frequently repeated.

  • Publishing requires data to be moved approximately in real time.

  • High processor overhead at the distributor does not affect performance.

  • Typically used with snapshot and transactional replication.

Pull Subscription

pull subscriptions allow users at the subscriber to determine when to synchronize data changes. The Distribution Agent or Merge Agent runs at the Subscriber.

  • Data is typically synchronized on demand or on a schedule, rather than in continuous synchronization.

  • Publishing has a large number of subscribers, and/or running all agents at the distributor consumes a significant amount of resources.

  • Subscribers are autonomous, disconnected, and/or mobile. The Subscriber determines when the connection and synchronization changes are made.

  • Typically used in conjunction with merge replication.

1. Environmental preparedness

1.win7+sql 20,122 Machines

such as: 10.58.8.114 login Account testb 10.58.8.96 login Account TestA

2. Create a new two DB instance:

Example: 10.58.8.114 instance name Testb 10.58.8.96 Instance Name TestA

3. Two machines create the same login account and password, and add it to Administrator privileges (resolve error 22022)

4. Set the SQL Server service login account to the current administrator account (both the Publisher and Subscriber are set) (Resolve error 22022)

5. Set the SQL SERVER Agent login account as the current administrator account and start automatically (both the Publisher and Subscribers are set) (Resolve error 22022)

6. Ensure that both machines can ping and the ports are interoperable

7. Two machines CREATE database Testpublisha

8. The Publisher creates the table TableA and writes the data to it, creating the view Viewa

The preparation is complete, the following implementation of the publishing body

2. Implementing the publishing body

Principal database >> replication >> Local Publishing >> right-click

Select the published Database Testpublisha

Snapshot Publishing

Select Publish objects, tables, views, stored procedures, and so on.

View project Issues ignored

Filter Table rows ignored

Snapshot Agent, I'm not planning on this side, I'm planning to sit at the Subscriber.

Agent security Settings I have configured the agent service to start as the current computer administrator. \tx

Create a publication

Complete

3. Implementing a subscription Principal

Subscription database >> replication >> Local Subscriptions >> right-click >> New Subscription

Next

Find Publishers

Select Publish

Set up Subscription Wizard

Setting up a subscription database

Set Distribution Agent Security

Set up a synchronization schedule

Subscription initialization

Complete

4. Publish and Subscribe Status View

1, Publisher Right-click >> Start Replication Monitor

You can see its running status as follows

2. Subscribers

Right-click >> View sync Status

Monitoring

5. Data validity

Adding data at the publisher

Adding data at the Subscriber

After the subscription synchronization is complete, we can see that the data after the subscription is published in the following

This article comes from http://www.cnblogs.com/woxpp/p/4293955.html, a bitter monk

SQL 2012 Publishing and subscription implementation data synchronization plot (resolve error 22022)

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.