Two ways to synchronize SQL Server 2008 databases (publish, subscribe)

Source: Internet
Author: User

In the previous article, we described the synchronization of the database through SQL job, which as a continuation of the previous section provides for synchronizing operations between databases by publishing subscriptions. Publish a subscription for two steps: 1, release. 2, subscription. You first publish the data that needs to be synchronized on the data source database server, and then subscribe to the above publication on the target database server. A publication can publish part of a table's data, or it can publish an entire table. The following describes the process of publishing, subscribing, respectively.

First, release. The publication requires an actual server name and cannot be performed using the server's IP address. The information that can be published includes "table", "Stored procedure", "User function" if using IP there will be an error, such as:

The specific release process is as follows:

1. Locate "Copy" under the database server--"local publishing" and select "New publication". Such as:

2. Select the database you want to publish. Such as:

3. Select the type of publication. The default type of "Snapshot publication" is selected here. Several types of publishing differ, and SQL Server gives instructions below. Such as:

4. Select the class capacity to be published. Such as:

The right side of the filter is the filtered SQL statement.

5. Set up the Snapshot Agent. Such as:

Change the sync frequency as follows:

6, set agent security. Such as:

7. Fill in the publication name

8, complete the release. Such as:

Second, subscription. A subscription is a snapshot of a database publication that synchronizes the published data source data to the target database. The specific subscription process is as follows;

1. Locate "Copy"--"local subscription" under the database server and select "New Subscription". Such as:

2. Select the publication of the subscription. Such as:

3. Select the location of the Distribution Agent, such as:

4. Select one or more target databases on the subscriber that hold the synchronized data. Such as:

To add multiple subscription databases, tap add Subscriber. Such as:

5. Set the security of the Distribution Agent. Such as:

6. Set the synchronization schedule. Such as:

7, complete the subscription. Such as:

This completes the entire process of publishing and subscribing.

Here, together with the previous section, we've covered two ways to synchronize SQL Server database, and I hope it works for you.

Two ways to synchronize SQL Server 2008 databases (publish, subscribe)

Related Article

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.