1.配置使用允许跨库查询

EXEC sys.sp_configure N'show advanced options', N'1'  RECONFIGURE WITH OVERRIDE
EXEC sys.sp_configure N'Ad Hoc Distributed Queries', N'1'
RECONFIGURE WITH OVERRIDE

2.使用跨库查询

SELECT *
FROM OPENDATASOURCE('SQLNCLI',
'Data Source=zyg;UID=sa;PWD=sasa;')
.gzrs.dbo.AB01

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-26
  • 2022-01-08
猜你喜欢
  • 2021-08-13
  • 2022-02-27
  • 2022-12-23
  • 2021-11-20
  • 2022-02-05
  • 2022-02-08
相关资源
相似解决方案