SQL Server 跨域查询(权限、语句、过程)
1.开通分布式查询权限
exec sp_configure 'show advanced options',1 reconfigure
exec sp_configure 'Ad Hoc Distributed Queries',1 reconfigure
2.查询
select * from openrowset( 'SQLOLEDB ', 'IP地址(服务器名)'; '用户名'; '密码',[数据库名].[dbo].[表名]) a , openrowset( 'SQLOLEDB…