I've come up against this before.All our Sprocs "Phone Home" [insert a row in a Logging table] so I know which are used, how often, duration, etc.I wonder whether it would be possible to rename ALL the SProcs, prefixed with, say, "xxx", and put a "wrapper" in place of each one; the "wrapper SProc" would rename the "original" back to itself, and execute it.So for an SProc:CREATE PROCEDURE MySproc @Param1 varchar(10), @Param3 varchar(10), @Param2 varchar(10)ASSELECT [1] = @Param1, [2] = @Param2, [3] = @Param3GO
We would [mechanically generate code to] do:EXEC sp_rename 'MySproc', 'xxx_MySproc'CREATE PROCEDURE MySproc @Param1 varchar(10), @Param3 varchar(10), @Param2 varchar(10)ASEXEC sp_rename 'xxx_MySproc', 'MySproc'EXEC MySproc @Param1, @Param3, @Param2GO
and then after a week or so we see how many are left called "xxx_..."Would that work?Kristen