SQL跨域连接数据库表

EXEC master.dbo.sp_addlinkedserver 
@server = N'RIS_T',
@srvproduct='',  
@provider=N'SQLOLEDB',
 @datasrc=N'192.168.20.3'
 /* For security reasons the linked server remote logins password is changed with ######## */
EXEC master.dbo.sp_addlinkedsrvlogin 
@rmtsrvname=N'RIS_T',
@useself=N'False',
@locallogin=NULL
,@rmtuser=N'sa',
@rmtpassword='123456'




exec sp_helpserver




 select * from  RIS_T.A.dbo.b.id

你可能感兴趣的:(SQL跨域连接数据库表)