Querying SQL Server System Catalogs

Dynamic applications that are not hard-coded to work with a specific set of tables and views must have a mechanism for determining the structure and attributes of the objects in any database to which it connects. The applications may need information such as:

The Microsoft® SQL Server™ system catalog provides this information for SQL Server databases. The core of the SQL Server system catalogs are a set of system tables containing metadata describing the objects in a SQL Server database. Metadata is data that describes the attributes of objects in a system.

SQL Server applications can access the information in the system catalogs in several ways by using:

It is not recommended that users query the system catalog tables directly; this should only be done if none of the methods above supply the needed information. The structure of the system catalog tables is dependent on the underlying architecture of SQL Server and changes from one version to another. Even an application that only issues SELECT statements may have to be at least partially rewritten when migrating to a new version of SQL Server if it directly queries system tables that change or are not present in the new version.

Updating, deleting, or inserting data in a system table can cause unpredictable effects in a SQL Server system. Such updates are not supported by Microsoft.


(c) 1988-98 Microsoft Corporation. All Rights Reserved.