Using IIS Virtual Directory Management for SQL Server Utility
Before accessing a Microsoft® SQL Server™ 2000 database using HTTP, you must set up an appropriate virtual directory. Use the IIS Virtual Directory Management for SQL Server utility (click Configure SQL XML Support in IIS in the SQL Server Tools program group) to define and register a new virtual directory, also known as the virtual root, on the computer running Microsoft Internet Information Services (IIS). This utility instructs IIS to create an association between the new virtual directory and an instance of Microsoft SQL Server. For information about the user interface for this utility, see IIS Virtual Directory Management Utility.
The name of the IIS server and the virtual directory must be specified as part of the URL. The information in the virtual directory (including login, password, and access permissions) is used to establish a connection to a specific database and execute the query.
The URL can be specified to:
- Directly access the database objects, such as tables.
In this case, the URL would include a virtual name of dbobject type.
- Execute template files.
A template is a valid XML document consisting of one or more SQL statements. When a template file is specified at the URL, the SQL commands stored in the template file are executed. SQL queries can be directly specified at the URL, but this is not recommended for security reasons.
- Execute XPath queries.
The XPath queries are executed against an annotated mapping schema file specified as part of the URL.
To allow a template file, mapping schema file, or a database object (such as a table or view) as part of the URL, virtual names of type template, schema, and dbobject must be created. The virtual name is specified as part of the URL to execute a template file, an XPath query against a mapping schema file, or to access a database object directly.
The type (template, schema, dbobject) of the virtual name specified at the URL is also used to determine the file type specified at the URL (template file or a mapping schema file). For example, this URL accesses a SQL Server database using a template:
TemplateVirtualName is a virtual name of template type, which identifies that the specified file (Template.xml) is a template file.