According to this running sp_recompile forces the object to be recompiled the next time that it is run
I need it to be recompiled the moment I run the sp-recompile command, mainly to check for syntax errors and existence of objects on which the stored procedure depends.
—
on sql 2008 there’s sys.sp_refreshsqlmodule module…
Probably the simplest way to do this is to re-deploy the stored procedure, which would (as far as I’m aware) remove the need to recompile the procedure.
Something along these lines: