Sql Server查询远程db 表数据到本地
时间:2014-10-20 15:10:00
收藏:0
阅读:158
step 1:
step 2:
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‘)
评论(0)