[英]SQL Server copy/replicate data from one table to another
I have 2 servers. 我有2台服务器。 I need to copy some columns from 4 different tables from server 1 into the corresponding (empty) tables in server 2.
我需要将服务器1的4个不同表中的某些列复制到服务器2中的对应(空)表中。
So basically, it's about replicating data from one table to another. 因此,基本上,这是关于将数据从一个表复制到另一个表。 How is this done best (and easiest)?
如何做到最好(最简单)? Also, how do I make sure that the copied/replicated data is updated at the same frequency as the source (which runs completely fine and automatically)?
另外,如何确保复制/复制的数据以与源相同的频率(完全正常且自动运行)更新?
I want to avoid using Linked Server. 我想避免使用链接服务器。
How is this done best (and easiest)?
如何做到最好(最简单)?
For a one time replication consider a SQL Server Import and Export Wizard . 对于一次性复制,请考虑使用SQL Server导入和导出向导 。 This approach can also be scheduled by saving a final package and schedule it by SQL Agent
也可以通过保存最终程序包并由SQL Agent计划该方法来计划该方法
Example: Simple way to import data into SQL Server 示例: 将数据导入SQL Server的简单方法
For a continuous, low latency data syncronization - SQL Server Transactional Replication . 为了实现连续的低延迟数据同步-SQL Server事务复制 。
Further read: Tutorial: Configure replication between two fully connected servers (transactional) Worth to mention, that transactional replication is not the easiest topic, however, it fits quite good to a requirement. 进一步阅读: 教程:配置两个完全连接的服务器之间的复制(事务性)值得一提的是,事务复制不是最简单的主题,但是,它非常适合一项要求。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.