kind of log

  • Hi, can you help me? I am executing an sp that makes a lot of things, generate tables. how can I write a kind of log file so I can know where it is running, if it is at the middle of the sp.

    Thanks a lot I hope I explain myself

    Ana


    Ana

  • A few choices.

    Use another table and write updates to this table as things happen.

    Use Profiler to watch what happens and store this off. You can automate server side traces through T-SQL as well.

    If this is a one time thing, you can use the Log Explorer product from Lumigent to capture the activity from the log.

    Use print statements in the stored procedure.

    Steve Jones

    steve@dkranch.net

  • Hi Steve thanks for answering.

    I would like to try all of them and see how it works each one, and I can learn more things doing this.

    The first point I can do it, but the profiler how do I do it?

    the fourth point, I have print statements but How can I see them If I run the sp by VB

    Thanks for your help

    Ana


    Ana

  • Profiler, check books online for the syntax of starting. you can log to a table and then search the text of each command being run.

    For the print statements, ADO will support multiple recordsets, so I'd do selects instead of prints. You will have to walk them to get the results. Keep in mind, until the SP completes, you won't have the results, so if it hangs, your app will hang as well. Unless you can do some asynch programming.

    Steve Jones

    steve@dkranch.net

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

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