• I have run into that too. Are there restrictions on compiling permanent or temporary stored procs into tempdb?

    If permanent procs are disallowed you could change the CREATE portion of the proc definition to one of these:

    -- only available in your session

    CREATE PROC #sp_WhoIsActive

    -- available to more than your session

    CREATE PROC ##sp_WhoIsActive

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato