远程查询

EXEC sp_configure 'show advanced options',1
GO

RECONFIGURE WITH OVERRIDE;
GO
EXEC sp_configure 'Ad Hoc Distributed Queries',1
GO

RECONFIGURE WITH OVERRIDE;
GO


select * from openrowset('SQLOLEDB','DRIVER={SQL Server};Server=47.52.90.38;PWD=47@jre2017;UID=sa;','select * from JRE..T_base') AS a

GO

EXEC sp_configure 'show advanced options',0
GO

RECONFIGURE WITH OVERRIDE;
GO
EXEC sp_configure 'Ad Hoc Distributed Queries',0
GO

RECONFIGURE WITH OVERRIDE;
GO

 

posted @ 2018-02-05 19:08  ransom  阅读(159)  评论(0编辑  收藏  举报