Pages

Sunday, August 12, 2012

Find disabled indexes in the SQL Server

Query to find the disabled indexes in a particular database of SQL Server


Use DBNAME
Go
select
sys.objects.name,sys.indexes.name from sys.indexes inner join sys.objects on sys.objects.object_id = sys.indexes.object_id where sys.indexes.is_disabled = 1 order by sys.objects.name,sys.indexes.name