SqlServer跨域查询
SELECT * FROM OPENDATASOURCE('SQLOLEDB','Data Source=192.168.1.14;User ID=sa;Password=sql.com').eBuilder.dbo.GXTPlan
sp_configure
EXEC sp_addlinkedserver 'Builder','','MSDASQL',NULL,NULL,'DRIVER=192.168.1.14;SERVER=远程名;UID=sa;PWD=sql.com;'
exec sp_addlinkedsrvlogin @rmtsrvname='别名',@useself='false',@locallogin='sa',@rmtuser='sa',@rmtpassword='密码' GO
exec sp_configure 'show advanced options',1
reconfigure
exec sp_configure 'Ad Hoc Distributed Queries',1
reconfigure
select * from openrowset( 'SQLOLEDB', '192.168.1.14'; 'sa'; 'sql.com',eBuilder.dbo.GXTPlan) a