views:

454

answers:

3

I'm looking for a tool to enforce coding styles, validation check for T-SQL script. And it recommends best-practice when appliable.

In .net code domain, the tool for this purpose is FxCop. Is there a counterpart for T-SQL? It will be best it is free or open source tool.

Anyone can shed some light?

+3  A: 

Power Tools is your best bet.

Also, here is a Microsoft tool for verifying best practices. The documentation specifies it checks T-SQL. It may or may not do what you want.

2000

2005

colithium
I use the Power Tool for VS 2008 DB Pro. It is cool.
Ken Yao
A: 

Hi,

You may wish to look at the RedGate suite of tools, particularly SQL Refactor and SQL Prompt.

This will layout your T-SQL code in a standard fashion and also provide you the ability to customise the standards that are used for your specific shop.

http://www.red-gate.com/products/SQL_Refactor/index.htm

Cheers, John

John Sansom
A: 

You may looka at SQL Enlight. The tool can analyze SQL code for defects, identify potential performance and design related issues in your SQL Server databases.

Ilian