The Virtual Directory Management Utility


A SQL Server virtual root is exactly like a virtual root of a Web server. You can configure a root directory anywhere in the directory structure and access a file in it with a simple URL call to the name of the root directory and file. The main reason for doing this on SQL Server is to point the ISAPI.DLL dynamic library to the proper starting point it needs to access template and schema files. After the virtual root is properly registered and virtual names are set up, it is possible to generate XML documents from data stored in SQL Server 2000 through queries in a URL. It is necessary to specify the names of the IIS and virtual directory in the URL; however, login, password, permissions, and other necessary information are contained in the virtual directory. This information grants us the ability to establish a connection to a predetermined database and execute the query contained in the URL.

Queries that can be contained in the URL include

  • Verbatim SQL statements utilizing SELECT.

  • Template files, valid XML documents consisting of one or more SQL statements that are executed when the template file is specified in the URL.

  • XPath queries, queries that produce an XML document. (We'll talk about these in depth in Chapter 6,"Using XPath Queries.")

System Requirements

The IIS Virtual Directory Management for SQL Server Utility runs on any edition of Microsoft Windows NT 4.0 or Microsoft Windows 2000.The following are Windows NT 4.0 requirements:

  • Microsoft IIS 4 or higher. (If you are running Windows NT Workstation 4.0, Peer Web Services 4.0 or higher is required.)

  • Microsoft Management Console 1.2. (This is installed by the Windows NT Option Pack, or when you install SQL Server 2000.)

Those of you using Microsoft Windows 2000 Professional need to install the Administrative Tools Pack (Adminpak.msi). This file can be found on Windows 2000 Server editions in the %winroot%\System32 directory. Windows 2000 Server itself has no additional requirements.

Virtual Names

A virtual name must be one of three different types:

  • template

  • schema

  • dbobject

This virtual name is the entity that allows a template file, mapping schema, or database object (table or view) to be part of the URL used to generate XML documents. The URL then executes a template file or an XPath query against a mapping schema file, or it directly accesses a database object.

The type of virtual name specified in the URL determines the type of file specified in the URL. For example, http://IISServer/northwind/TemplateVirtualName/Template.xml demonstrates that because TemplateVirtualName was previously defined as having the virtual name type template, file Template.xml is a template file.

The ability to define virtual name types is strictly an enhancement to IIS provided by SQL Server 2000. IIS by itself does not have the capability of doing this, although as mentioned previously, it can create virtual directories.



XML and SQL Server 2000
XML and SQL Server 2000
ISBN: 0735711127
EAN: 2147483647
Year: 2005
Pages: 104
Authors: John Griffin

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net