将一台服务器的表复制到另一台服务器 [英] copy table one server to another server

查看:151
本文介绍了将一台服务器的表复制到另一台服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我在本地服务器中有12000条记录,我想将这些记录复制到远程服务器中,请问如何通过sql查询来解决我的问题,我不想一次又一次地备份和还原.在此先感谢

Hi,
I have 12000 records in local server and i want to copy those record into remote server how is it possible plz try to solve my question through sql query i do not want backup and restore again and again.Thanks in advance

推荐答案

尝试为此创建一个SSIS或DTS包.

检查一下.

http://msdn.microsoft.com/en-us/library/ms141026.aspx [ ^ ]

或者您可以使用

SQL Server Management Studio并通过右键单击数据库并转到Task>导出并选择源和目标来执行导出任务.
Try creating a SSIS or DTS package for this.

Check this.

http://msdn.microsoft.com/en-us/library/ms141026.aspx[^]

Or you can use

SQL Server Management Studio and do an Export Task by right-clicking the database and going to Task>Export and select source and destination.


如果您有几个表,则可以使用
select * into [server2.table1] from server1.table1.

如果您有大量表,则需要构建一个自动化脚本.
If you have a few tables you could just use
select * into [server2.table1] from server1.table1.

If you have a large number of tables, you would need to build an automated script.


您可以使用链接服务器,然后只需在表名中添加服务器
myserver2.mydatabase.myshema.mytable
You could use linked servers then you just need to add the server in your table name
myserver2.mydatabase.myshema.mytable


这篇关于将一台服务器的表复制到另一台服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆