This article is a mirror article of machine translation, please click here to jump to the original article.

View: 7645|Reply: 0

[Source] SQL Server cross-database migration data synchronization

[Copy link]
Posted on 7/13/2020 2:16:20 PM | | |
Some time ago, due to the need, the data in database A needs to be migrated to database B to make the data in both databases the same. I used SSIS to complete it, because it was a new table created by myself at that time, so when creating the table, I added the rowversion field to distinguish which data differences between A and B databases, and only migrated data with different version numbers, without copying the entire table to improve efficiency. However, it is not always necessary to operate on a new table, for example, when we need to operate an existing table, there is no rowversion field in this table to distinguish between the old and new data, what should we do then?

In fact, before contacting the SQL Server database, I used the Mysql database, which would have a binlog to record what data was manipulated, but the sqlserver did not have a binlog, it had a transaction log file baiTransaction Log File is a file used to record database updates, with the extension ldf. You can compress the logs and use a third-party tool to view the logs. For example, log explore to view SQL log files.

For a detailed look at the Thing Log, check out this blog https://www.cnblogs.com/CareySon/archive/2012/02/14/2351149.html




Previous:Alibaba Cloud ACA Test Questions - Typical Cloud Security Test Questions
Next:Angular 9 Series (XI) 5 Ways to Define Styles
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com