The process of SQL Server 2005 data synchronization

Source: Internet
Author: User

There are some conflicts in SQL Server2005 for adding, deleting, modifying and querying, which can easily cause deadlock. Now there is a database of the Filedetail table is two sets of procedures to operate, a set of procedures to increase, delete, change, another set of procedures responsible for inquiries, the results when the volume of data, it is easy to query the set of procedures to query the data is very slow, and even caused the deadlock situation. The reason is that the design mechanism in SQL Server2005 is inserted, the deadlock record will only be a certain one, does not affect the next and the previous one, but the tangle of the situation came, you inserted the time is cool, does not affect you, but when I query, if a record is found to be deadlocked, So the result of my T-SQL query is all deadlocks, and nothing is queried.

In order to solve this problem, we can use synchronization to solve this problem, separate this database, we set up two Filedetail table, one to add, delete, change the program to use, another to query the program to call, this can solve the above problems.

In SQL Server2005, synchronization data is required: Publisher, distributor, and Subscriber, the server on which the source data resides is the publisher, responsible for publishing data. The publisher replicates changes to the data or objects that are replicated to the distributor, which is used by the Distributor to receive all changes to the data, contains a distribution database, saves the changes, and distributes the changes to subscribers. During the replication process, the publisher is a database instance that provides data to other locations through replication, and the Distributor is also a database instance, which acts as a storage area. A Subscriber is a database instance that receives replicated data. A subscriber can receive data from multiple publishers.

The following example because I do not have so many resources, only use this machine to do the test, I also tested the operation between the two, we are interested in can get more units to try.

Now we're going to implement data synchronization through SQL Server2005:

First we turn on the SQL Server Agent (which is disabled by default)

Starting--"launch successful"

Now we're going to replicate the database.

Click siccdb Right-task-copy database, the following interface appears

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.