`
mybwu_com
  • 浏览: 179856 次
  • 性别: Icon_minigender_1
社区版块
存档分类
最新评论

Sql Server查询远程db 表数据到本地

 
阅读更多
step 1:


sp_configure 'show advanced options', 1;
RECONFIGURE;
sp_configure 'Ad Hoc Distributed Queries', 1;
RECONFIGURE;
GO



step 2:



insert into table_name
columns


SELECT 
columns


 FROM OPENROWSET('SQLNCLI', 
'Server=XXXX,1433;uid=XXXX;pwd=XXXX;Database=cb_name;','SELECT * FROM table_name') 



分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics