How to find execution of stored procedure from application.

  • all the interaction between my application and database are handled through stored procedure(s) . The database is sql 2000. I am just wondering if there is a way to find out which stored procedure(s) has been execute from my application. I would appreciate any command or suggestion.

  • SQL Profiler can tell you this.

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • This is how I do it: I write a log record in a table when it starts and updates the column [endtime] in that logtable when the procedure finishes. If you're interested, I'll send you an example.

    The following trick shows the current stored procedure being executed. It works in 2005, not sure if it works in 2000:

    select object_name(@@procid)

    Wilfred
    The best things in life are the simple things

  • I normally use SQL Profiler when I want to find out what is running.



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

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

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