Need a way to find all tables without a clustered index in SQL Server? Running this script every once in awhile will help ensure best practices are being followed and every table has a clustered index. This script is compatible with SQL Server 2005 and SQL Server 2008.
--Tables without a clustered index
OBJECT_SCHEMA_NAME(object_id) AS SchemaName,
OBJECT_NAME(OBJECT_ID) AS TableName
INDEX_ID = 0
AND OBJECTPROPERTY(OBJECT_ID, 'IsUserTable') = 1