如何使用sql脚本将一个表的数据从一台服务器复制到另一台服务器 [英] How to copy data of one table from one server to another server using sql script

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

问题描述

如何使用sql脚本将一个表的数据从一台服务器复制到另一台服务器..
由于我想做一个日常存储程序,我不想通过右键单击导入/导出功能.

请帮我.

谢谢.

How to copy data of one table from one server to another server using sql script..
As i want to make a sproc for daily run,bcz i dont want to go through the right click import/export functinality.

Plz help me.

Thanks.

推荐答案

您可以使用bcp:

http://msdn.microsoft.com/en-us/library/aa337544%28v = sql.105%29.aspx [ ^ ]

看起来它可以与T-SQL一起使用,因此您可以轻松地将其集成到存储过程中.通过浏览文档,您可以将其批量导出到数据文件中,然后将数据文件的内容批量导入到另一台服务器中.
You could use bcp:

http://msdn.microsoft.com/en-us/library/aa337544%28v=sql.105%29.aspx[^]

It looks like it can be used with T-SQL, so you could easily integrate this into a stored procedure. From glancing at the documentation you would bulk export into a data file and bulk import the contents of the data file to the other server.


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

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