One of the new features of Microsoft SQL Server 2000 is to support XML, so users can directly access the SQL
Server2000 database with XML function through HTTP. The implementation method is introduced below.
System environment: Windows2000 Server (including IIS) MS SQL
Server2000
Database: Classic database sample included with SQL Server2000: NorthWind
1. Configure IIS and SQL
Server virtual
domains ;
1. Create a new file directory
Open Windows Explorer and create a new directory northwind under Inetpubwwwroot:
C:Inetpubwwwroot
orthowind
Create 2 more subdirectories in the northwind directory: template and schema:
C:Inetpubwwwroot
wind template, used to place XML templates;
C:InetpubWwwroot
windschema, used to place schema files.
2. Map the virtual directory of IIS
Select "Configure
SQL XML Support in
IIS" in the SQL program group, select "New" -> "Virtual Path" under the default site; then proceed to the five-step standard configuration.
(1) In the "General" page, enter the virtual path name "northwind" and map it to the actual hard disk path. The result is shown in the figure.
alt="" hspace=0 src="/upimg/20070212/11G214QPEF1NW.jpg" align=baseline
border=0>
(2) in On the "Security" page, select the corresponding login account and password. In this example, the system account sa is used, and the results are shown in the figure.
align=baseline border=0>
(3) In the "Data Source" page, select SQL
Server name or IP address, and select the database. The results are shown in the figure.
align=baseline
border=0>
(4) In the "Settings" page, select "Allow URL query", "Allow template query", "Allow XPath" and "Allow Post" respectively. The results are shown in the figure.
align=baseline border=0>
(5) In the "Virtual
Names" page, define Template, Schema and Dbobject respectively, and specify the actual hard disk path. The results are shown in the figure.
align=baseline border=0>
Then, OK and close the window. The results are shown in the figure.
align=baseline width=500
border=0>