Detailed SQL Server database synchronization problems

This paper to introduce a SQL Server database synchronization issues to everyone to show through specific content, I want to learn SQLServer database help.

Replicated database and synchronization is a very important aspect of data storage. We can replicate data across local area network through, Internet in different

The database server maintains multiple copies of a plurality of the above data, while in synchronous or asynchronous manner to ensure data consistency between the various copies.

SQL Server provides a complete built-in data replication, it is a very important part of the core SQL Server engine.

 

SQL Server replication is divided into three ways:

 

Snapshots: For photographic data published in the database, and then copy it to the server to order at some point in time. General static tables for replication.

Transactional replication: transactional replication is to copy the contents of multiple statements and stored procedures, so that the database is only read data ordered modifications of the database, and to reflect this change.

          General users update high frequency database.

Powerhouses Copy: allows to order and publisher of the bi-directional modification, Bing modified to reflect on both the database. If the data there is a conflict, the conflict will be processed according to certain rules.

 

Currently the unit is useful to a web site, database are located in the United States, the Netherlands and Shenzhen. On the site of the infrastructure we use

It is 3DNS and BigIP intelligent DNS and load balancing. But because the three have their respective databases (SQL Server), need

Ensure data consistency of each database. We need to do data replication. According to the user's requirements we do is transactional replication in the site

The first two versions are normal, but after two weeks updated the web page version, often found in transactional replication errors. Re-do transactional replication

Still appear after a short time interval. After checking the error log findings suggest that:

The query processor could not produce a query plan from the optimizer because a query cannot update a text, ntext, or image column and a clustering key at the same

 

Check the database table after investigation, to determine a table (XXX_article) problems.

After confirmation and programmers find this form attribute is changed to ntext type, and will also update this field and clustered index 欗 bit of this table.

Therefore suspected to be due in doing transactional replication will also modify the position of these two causes, consult the relevant data could not find a clear official explanation

But there are other programs have found similar problems in the program code in which the solution is divided into two two 欗 update this site. Specific technical details, has not been clearly explained. On the transactional replication We can not interfere with the process, so we do not xxx_article transactional replication. Then for xxx_article do snapshot replication, This avoids this problem. After testing and application, this problem has been resolved.

This article compiled by the post coordinate and publish, the students want to learn SQL Server help, please pay attention to more functional coordinate database SQL Server database Channel!

Guess you like

Origin www.cnblogs.com/SyncNavigator8-4-1/p/10974075.html