Is there a tool that can analyze SQL Server databases for potential problems?
For instance:
- foreign key column that is not indexed
- index in a column
uniqueidentifierthat does not haveFILL FACTOR - a
LastModifiedDate DATETIMEwhich does not have a trigger UPDATEfor updating datetime - large index with high fragmentation
- unfragmented index that exists in several extents
- a trigger that does not contain
SET NOCOUNT ON(leaving it suspicious for "the trigger returned a result set and / or worked with SET NOCOUNT OFF, and another outstanding result set was active.") - database, table, stored procedure, trigger, view created with
SET ANSI_NULLS OFF - a database or table with
SET ANSI_PADDING OFF - database or table created using
SET CONCAT_NULL_YIELDS_NULL OFF - a highly fragmented index that can benefit from a lower
FILLFACTOR(i.e. more additions) - a table with a very wide cluster index (e.g. uniqueidentifier + uniqueidentifier)
- a table with a unique clustered index
- use
text/ntext, notvarchar(max)/nvarchar(max) - use
varcharin columns that may contain localized rows and should be nvarchar(e.g. Name, FirstName, LastName, BusinessName, CountryName, City) - use
*=, =*, *=*, not LEFT OUTER JOIN, RIGHT OUTER JOIN,FULL OUTER JOIN - trigger that returns a result set
- ,
timestamp, rowversion timestampimage, varbinary(max)- ( 100x )
FxCop SQL Server?
. Microsoft SQL Server 2008 R2 . p >