Using catalog views in SQL Server 2005

Did you know that the catalog views in SQL Server 2005 exposes metadata for various objects in a database and at the server-level? This is the preferred method of accessing metadata. It is a much richer mechanism that doesn't require access to system tables or undocumented columns or status bits. If you want standard and portable access to metadata then you can still use the INFORMATION_SCHEMA views but it is limited to standard specific features, data types and views.

 

I have posted several topics in the past that shows how to use the information in various catalog views. And the Books Online Documentation has a topic that has answers to several frequently asked questions. It shows you how to use the catalog views to get answers to following questions for example:

 

How do I find the LOB data types of a specified table?
How do I find the CHECK constraints that depend on a specified CLR user-defined type?

How do I find the dependencies on a specified function?

How do I find all the owners of entities contained in a specified schema?

 

You can find the topic using the links below:

 

Books Online in MSDN: https://msdn2.microsoft.com/en-us/library/ms345522.aspx

Books Online Client: ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/ca202580-c37e-4ccd-9275-77ce79481f64.htm

 

Please check it out and send your feedback using the Books Online feedback mechanism if you want to see additional questions. You can also post such questions here and I will write the queries using the catalog views.

--

Umachandar