SQL Server 2000 透過 IIS 虛擬目錄支援 HTTP 直接存取資料庫,讓資料庫成為可透過 URL 存取的資源。本文詳細示範虛擬目錄建立步驟(Configure SQL XML Support in IIS → 新增虛擬目錄 → 設定真實路徑 → 設定安全性:Basic/Integrated/匿名驗證)、HTTP 查詢語法(sql=、template=、contenttype=)、以及 HTTP 存取能力(SELECT/預存程序/範本/UPDATEGRAM/XPath 查詢)。
Configure SQL XML Support in IIS。VirtualRoot)、本機實體路徑(存放範本、對應結構描述檔)。IUSR_ServerName)。-- 直接 SQL 查詢
https://server/VirtualRoot?sql=SELECT+*+FROM+Customers+FOR+XML+AUTO&root=ROOT
-- 使用範本檔
https://server/VirtualRoot/template/getCustomers.xml