-- 开启组件
exec sp_configure 'show advanced options',1
reconfigure
exec sp_configure 'Ad Hoc Distributed Queries',1
reconfigure

-- 关闭组件
exec sp_configure 'Ad Hoc Distributed Queries',0
reconfigure
exec sp_configure 'show advanced options',0
reconfigure
-- 查询远程数据库
SELECT *  FROM OPENDATASOURCE('SQLOLEDB','Data Source=192.168.7.137;User ID=sa;Password=8818522').PanelData.dbo.Channel

 

相关文章:

  • 2021-08-13
  • 2021-04-12
  • 2021-06-30
  • 2021-11-27
  • 2022-01-14
  • 2021-12-30
猜你喜欢
  • 2021-12-05
  • 2021-08-07
  • 2022-12-23
  • 2021-12-10
相关资源
相似解决方案