将记录从一个表插入到服务器不同的另一个表中 [英] Insert the records from one table to another where Servers are different
本文介绍了将记录从一个表插入到服务器不同的另一个表中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
谁能告诉我,如何将记录从一个表插入到另一个表中,服务器是不同的,假设我有一个表名服务器'开发'上的公司现在包含数千条记录我想将此表的所有数据插入到另一个服务器质量分析师的另一个表中。
问候
拉曼
Hi All,
Can anyone tell me, how to insert the records from one table to another table, where servers are different, Suppose I have one table name Company on Server 'Development' which consist thousands of records now I want to insert all the data of this table to another table which is on another server Quality analyst.
Regards
Raman
推荐答案
试试这个
Hi,
try this
insert into SourceServer\instance.Database.Table
select * from DestinationServer\instance.Database.Table with (nolock)
或
您可以通过链接服务器或使用SSIS或其他集成工具建立连接。建立该链接后,您可以使用表格
Or
you can establish a connection via linked server or using SSIS or some other integration tool. Once that link is established, you can use the form
insert into dbo.mytable
select * from [LinkedServer].[Database].[Schema].[Table]
试试这个
插入[database_name] .. [table_name]
从[database_name]中选择[columns_to_be_inserted] .. [table_name]
希望这会工作。
请标记是否有效。
谢谢
Try this
Insert into [database_name]..[table_name]
select [columns_to_be_inserted] from [database_name]..[table_name]
Hope this will work.
Please mark if it work.
Thanks
这篇关于将记录从一个表插入到服务器不同的另一个表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文