Sql Server 跨服務器查詢


開啓功能:
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 openrowset('SQLOLEDB','sql服務器名';'用戶名';'密碼',數據庫名.dbo.表名)




發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章