一条语句实现跨服务器查询
exec sp_configure 'show advanced options',1 go reconfigure go exec sp_configure 'Ad Hoc Distributed Queries',1 go reconfigure go select * from OPENROWSET ( 'SQLOLEDB', 'SERVER=host;uid=user;pwd=pwd', 'select * from dbname..tbname' ) exec sp_configure 'Ad Hoc Distributed Queries',0 go reconfigure go exec sp_configure 'show advanced options',0 go reconfigure
**********初心不改,方得始终。