SQL Server - Schema/Code Analysis Rules - What would your rules include?
Posted
by Randy Minder
on Stack Overflow
See other posts from Stack Overflow
or by Randy Minder
Published on 2010-04-23T15:43:26Z
Indexed on
2010/04/23
16:53 UTC
Read the original article
Hit count: 407
We're using Visual Studio Database Edition (DBPro) to manage our schema. This is a great tool that, among the many things it can do, can analyse our schema and T-SQL code based on rules (much like what FxCop does with C# code), and flag certain things as warnings and errors.
Some example rules might be that every table must have a primary key, no underscore's in column names, every stored procedure must have comments etc.
The number of rules built into DBPro is fairly small, and a bit odd. Fortunately DBPro has an API that allows the developer to create their own. I'm curious as to the types of rules you and your DB team would create (both schema rules and T-SQL rules). Looking at some of your rules might help us decide what we should consider.
Thanks - Randy
© Stack Overflow or respective owner