set transaction isolation level snapshot
use hub_200
;with RecentlyExecutedStoredProcedures as (
select
(select name from sys.schemas where "schema_id" = sys.objects."schema_id") + '.' + "Name" as RecentlyUsedStoredProcedure
from sys.objects
where "object_id" in (select "object_id" from sys.dm_exec_procedure_stats stats)
),
AllStoredProcedures as (
select
(select name from sys.schemas where "schema_id" = sys.objects."schema_id") + '.' + "Name" as StoredProcedure
from sys.objects
where type_desc = 'SQL_STORED_PROCEDURE'
)
select * from AllStoredProcedures
except
select * from RecentlyExecutedStoredProcedures
order by StoredProcedure