In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article is to share with you about the SQLServer replication technology, the editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.
What are the SQLServer replication technologies?
1. Snapshot replication
A deletes all the data in the corresponding table in B at regular intervals, and then inserts all the data in its corresponding table into B. This method is obviously not suitable for our application and will not be considered.
two。 Transaction replication
For every transaction in A that meets the replication condition, An is applied to B at regular intervals, and vice versa. SQLServer modifies the data by passing it to three stored procedures (insert, delete, modify). We can rewrite this stored procedure according to our own application.
There are defects: if the replication conditions from A to B are the same as those from B to A, there will be a cycle of "kicking the ball". Not only will a series of transactions be applied to A, A, A will apply these transactions to B, B, after receiving this series of transactions, it will also be applied to A,. It's a cycle.
3. Merge replication
Every once in a while, replication will merge the data that needs to be replicated in database An AB B, so that the data in AB is exactly the same, and the data is all the data in the AB database. If there is a conflict between the data primary keys in An and B, only one piece of data is selected according to priority.
It is important to note that in order to distinguish where the data comes from, SQLServer adds an additional field to each table that needs to be copied, which should be noted when programming.
There are defects:
SQLServer replicates at regular intervals. If another Server cannot be found (for example, because of a network failure, or another SQLServer does not start), after n (default is 10) connections, its replication function will be down off until someone starts the replication function. If there is data in the table that needs to be replicated before the replication, it is troublesome to establish the replication (SQLServer does not provide a solution to this problem, which needs to be done manually). Therefore, the table structure of the table that needs to be copied cannot be changed frequently during use.
These are the SQLServer replication technologies, and the editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.