Thursday, November 15, 2012

My new index scripts for SQL Server 2008

Please be free to try out my new script concerning indexes in SQL Server 2008 and above. These scripts won't work in SQL Server 2005 environment.

This procedure will show you everything you want to know about the indexes in your database.

This procedure will show you the duplicates within your database.

Both can be used with a parameter to define the table or view you want to use.


exec sp_sql2008_helpindex

exec sp_sql2008_helpindex 'tablename'

exec sp_sql2008_finddupes

exec sp_sql2008_finddupes 'tablename'

Please leave some comments if you find a bug in one of these two procedures.

No comments:

Post a Comment