现在的位置: 首页 > 综合 > 正文

MS sql两个不同数据库之间 进行数据倒换

2018年05月05日 ⁄ 综合 ⁄ 共 361字 ⁄ 字号 评论关闭

在数据sql2005中 一个远程的库需要建一个表aaa 并且需要和 另一个远程的库里的aaa一样,可采用:

 

exec sp_configure 'show advanced options',1
reconfigure
exec sp_configure 'Ad Hoc Distributed Queries',1
reconfigure

--启用组件

 

select * into aaa from openrowset( 'SQLOLEDB', '192.168.13.5'; 'sa'; '',Logistics.dbo.aaa)

--数据倒换

 

exec sp_configure 'Ad Hoc Distributed Queries',0
reconfigure
exec sp_configure 'show advanced options',0
reconfigure

--关闭组件 

抱歉!评论已关闭.