Constraint metadata
There are five types of constraint in SQL Server, and they fall into three categories - programmable constraints, local key constraints and foreign key constraints. So let's look at the programmable...
View ArticleSQL Module metadata
So what are SQL modules? Simply put, SQL modules are objects in the database that are programmed in SQL. This isn't entirely accurate, as there are a few SQL programmable object types that don't fall...
View ArticleProcedure and Trigger Metadata
There are a couple of extra views which give us some more information about SQL Modules. They relate to specific types of SQL Modules, namely procedures and triggers.Let's look at [sys].[procedures]...
View ArticleAssembly and Assembly Module Metadata
So, let's look at assembly, or CLR, objects. There are four principal types of CLR object - Aggregate Functions, Stored Procedures, Table Functions and Scalar Functions. Of course, there are also...
View ArticleDatabase and Server Principal Metadata
So, let's have a look at principals. There are two levels of principals - those that participate in the database (users and roles) and those that have access to the server (logins). Let's look at the...
View ArticleData space metadata
Ok, so I lied. I said next time we'd look at key and certificate based catalog views. But, quite frankly, they're intensely boring and my brain started to wander. So, I thought I'd just skip that...
View ArticlePartition function metadata
So, we need to know about partition functions, and how they are represented in meta-data. We have three tables to look at, [sys].[partition_functions] which gives us information about the partition...
View ArticleIndex metadata
Ok, so it's been a while, but we're finally onto index metadata. We have three types of indexes in SQL Server, Relational, XML, Spatial. Okay, so that's really only three types of index and last time I...
View ArticleStatistics metadata
So, statistics. The information relating to statistics comes from [sys].[stats] and [sys].[stats_columns], so let's get straight in and have a look at those two tables:object_idThis is the ID of the...
View ArticleWhat's new in Denali CTP3, DMV-wise?
Ok, so for researching what's new in Denali CTP3, and therefore what schema inspector has to cope with, I have had to look at the DMV differences between CTP3 and 2008. So, here's a summary of the...
View Article