Export (0) Print
Expand All
2 out of 9 rated this helpful - Rate this topic

Catalog Views (Transact-SQL)

Updated: 12 December 2006

Catalog views return information that is used by the Microsoft SQL Server 2005 Database Engine. We recommend that you use catalog views because they are the most general interface to the catalog metadata and provide the most efficient way to obtain, transform, and present customized forms of this information. All user-available catalog metadata is exposed through catalog views.

ms174365.note(en-US,SQL.90).gifNote:
Catalog views do not contain information about replication, backup, Database Maintenance Plan, or SQL Server Agent catalog data.

Some catalog views inherit rows from other catalog views. For example, the sys.tables catalog view inherits from the sys.objects catalog view. The sys.objects catalog view is referred to as the base view, and the sys.tables view is called the derived view. The sys.tables catalog view returns the columns that are specific to tables and also all the columns that the sys.objects catalog view returns. The sys.objects catalog view returns rows for objects other than tables, such as stored procedures and views. After a table is created, the metadata for the table is returned in both views. Although the two catalog views return different levels of information about the table, there is only one entry in metadata for this table with one name and one object_id. This can be summarized as follows:

  • The base view contains a subset of columns and a superset of rows.
  • The derived view contains a superset of columns and a subset of rows.
ms174365.note(en-US,SQL.90).gifImportant:
   In future releases of SQL Server, Microsoft may augment the definition of any system catalog view by adding columns to the end of the column list. We recommend against using the syntax SELECT * FROM sys.catalog_view_name in production code because the number of columns returned might change and break your application.

The catalog views in SQL Server 2005 have been organized into the following categories:

CLR Assembly Catalog Views

Objects Catalog Views

Databases and Files Catalog Views

Partition Function Catalog Views

Database Mirroring Catalog Views

Scalar Types Catalog Views

Data Spaces and Full-text Catalog Views

Schemas Catalog Views

Endpoints Catalog Views

Security Catalog Views

Extended Properties Catalog Views

Service Broker Catalog Views

Linked Servers Catalog Views

Server-wide Configuration Catalog Views

Messages (For Errors) Catalog Views

XML Schemas (XML Type System) Catalog Views

Release History

12 December 2006

New content:
  • Added the Important note.

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.