将数据库服务器上的导出表导入到sql中的另一个表 [英] import export table on db server to another in sql

查看:71
本文介绍了将数据库服务器上的导出表导入到sql中的另一个表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过sql server 2008中的过程将数据库服务器上的表导入/导出到另一台服务器。

谢谢

解决方案

如果两个服务器在SQL Server中设置为链接服务器,则可以使用完全限定名称。

 插入 进入 Server1.Database1.dbo.Table1(Col1,Col2)
选择 Col1 ,Col2 From Server2.Database2.dbo.Table2



对于链接服务器 http://msdn.microsoft.com/en-us/library/ms190479.aspx [ ^ ]

尝试此链接.. HTTP://www.mssqlt ips.com/sqlservertip/1207/different-options-for-importing-data-into-sql-server/ [ ^ ]

http:// www .mono-software.com / blog / post / Mono / 168 /不同方式导入数据到SQL服务器/ [ ^ ]

http: //msdn.microsoft.com/en-us/library/ms190923(v=sql.105).aspx [ ^ ]

http://blog.sqlauthority.com/ 2007/08/21 / SQL服务器2005年创建脚本到复制数据库架构和所有的对象,存储过程,函数,触发器,表,视图,约束和 - 清一色其他数据库对象/ [ ^ ]


i want to import/export table on db server to another server through procedure in sql server 2008.
thank you

解决方案

If the two servers are set up as Linked Servers in SQL Server then you can use the fully qualified name.

Insert Into Server1.Database1.dbo.Table1 (Col1, Col2)
Select Col1, Col2 From Server2.Database2.dbo.Table2


For Linked servers http://msdn.microsoft.com/en-us/library/ms190479.aspx[^]
Try this links.. http://www.mssqltips.com/sqlservertip/1207/different-options-for-importing-data-into-sql-server/[^]
http://www.mono-software.com/blog/post/Mono/168/Different-ways-of-importing-data-into-SQL-Server/[^]
http://msdn.microsoft.com/en-us/library/ms190923(v=sql.105).aspx[^]
http://blog.sqlauthority.com/2007/08/21/sql-server-2005-create-script-to-copy-database-schema-and-all-the-objects-stored-procedure-functions-triggers-tables-views-constraints-and-all-other-database-objects/[^]


这篇关于将数据库服务器上的导出表导入到sql中的另一个表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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