debugging stored procedure

  • i have a stored procedure, which has tons of line of code, iam debugging it using sql-profiler

    but how can i found out , about the variables, what values they have, they get set in the procedure,

    any cool tool to debug stored procedures

     

    <a href="http://www.websolsoftware.com"> For IT jobs click here</a>

    *Sukhoi*[font="Arial Narrow"][/font]

  • One way...

    Go to SQL Query Analyzer, click on the object browser, click on your database, then stored procedures.  Right click on your stored procedure and click on debug from the menu.  A window will prompt you to enter any variables.

    This tool allows you to step through your code and view variables.  You'll have to learn to use it on your own.

  • Another way... also cool because it's the hardcore way

    Run the code in the procedure section-wise, if possible, and use print or select statements to output the contents of the variables. Either print to console, to file, or insert into a logging table.

    /Kenneth

  • really cool, i did not knew this

    <a href="http://www.websolsoftware.com"> For IT jobs click here</a>

    *Sukhoi*[font="Arial Narrow"][/font]

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

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