Is there a tool out there that can analyse SQL Server databases for potential problems?
For example:
uniqueidentifier
column that has no FILL FACTOR
LastModifiedDate DATETIME
column that has no UPDATE
trigger to update the datetimeSET NOCOUNT ON
(leaving it suspectible to "A trigger returned a resultset and/or was running with SET NOCOUNT OFF while another outstanding result set was active.")SET ANSI_NULLS OFF
SET ANSI_PADDING OFF
SET CONCAT_NULL_YIELDS_NULL OFF
FILLFACTOR
(i.e. more padding)text/ntext
rather than varchar(max)/nvarchar(max)
varchar
in columns that could likely contain localized strings and should be nvarchar
(e.g. Name, FirstName, LastName, BusinessName, CountryName, City)*=
, =*
, *=*
rather than LEFT OUTER JOIN
, RIGHT OUTER JOIN
, FULL OUTER JOIN
timestamp
rather than rowversion
timestamp
columnimage
rather than varbinary(max)
Is there an FxCop for SQL Server?
Note: The Microsoft SQL Server 2008 R2 Best Practices Analyzer doesn't fit the bill.
SQL Server Data Tools (SSDT) A modern development tool for building SQL Server relational databases, Azure SQL databases, Analysis Services (AS) data models, Integration Services (IS) packages, and Reporting Services (RS) reports.
An index contains keys built from one or more columns in the table or view. These keys are stored in a structure (B-tree) that enables SQL Server to find the row or rows associated with the key values quickly and efficiently.
A SQL database is a collection of tables that stores a specific set of structured data. The SQL database has long been the tried and true workhorse of the backend enterprise and at the heart of everything we do in this electronic age.
There's SQLCop - free, and quite an interesting tool, too!
There is a tool called Static Code Analysis (not exactly a great name given its collision with VS-integrated FxCop) that is included with Visual Studio Premium and Ultimate that can cover at least the design-time subset of your rules. You can also add your own rules if the in-box rule set doesn't do everything you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With