• rbarryyoung (8/5/2008)


    Jeffrey Williams (8/5/2008)


    You would do this:

    Execute sp_MS_marksystemobject sp_mytest;

    And that should setup the procedure so it runs in the context of the database where it is executed.

    Very nice, Jeffrey! I have been wondering about this for a while...

    I should have also mentioned that this little procedure is undocumented. But, it has been around for a while and I don't see MS getting rid of it. Anyways, use at your own risk. 😉

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs