Last Time An SP Was Run

  • I have a huge project that is now boiled down to 12 SP's, sp 2 should not be ran until SP 1 is completed.

    What piece of script can I run to see when SP1 was ran last?

    Thanks,

    Richard

  • Unless there is logic within your stored procedure to write a run history to an audit table, there is really no way to know the last time a SP has run.  Can you tell us a bit more on what you are trying to accomplish?  Please include an example if you can.

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • An audit history table is what I am going to have to create.

    What I am trying to do run my stored procedures and then go back and we when it was run last.  There are so many SP's for this project that once in a while, one does not get run and since they are interdependant, if step 3 does not get run correctly and then I proceed to step 4, everything is wrong. 

    In hindsight, what I really need is a table that does row counts and last run date, this will allow me to tell if the tables that I run my reports against are completly created in addition to the sp running.

     

    Richard

  • Richard,

    Are you running these stored procedures from a job or is this an OLTP system?

    Greg

    Greg

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply