SQL Server servisinin başlatıldığı tarihten bu yana kullanılmayan stored procedure’leri aşağıdaki sorgu ile bulabilirsiniz:
select schema_name(schema_id) as SchemaName,p.name as SpName from sys.procedures as p except select schema_name(schema_id) as SchemaName,p.name as SpName from sys.procedures as p inner join sys.dm_exec_procedure_stats as qs on p.object_id = qs.object_id