• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 8. Designing SQL Server Stored P... > Debugging the Stored Procedures That...

Debugging the Stored Procedures That You Build

It is not always easy to determine what is wrong with a stored procedure. Fortunately, SQL Server 2000 includes a very good debugger that allows you to easily step through the stored procedures that you build. To debug a stored procedure:

1.
Launch Query Analyzer.

2.
Open the Object Browser.

3.
Locate the stored procedure that you want to debug.

4.
Right-click and select Debug. The Debug Procedure dialog box appears (see Figure 8.28).

Figure 8.28. The Debug Procedure dialog box allows you to set the values of the parameters in your stored procedure.


5.
Click each parameter and type the appropriate value in the Value text box.

6.
Click Execute to execute the stored procedure. The T-SQL Debugger window appears (see Figure 8.29). Here, you can step through the stored procedure, watch the value of variables, set breakpoints, and more.

Figure 8.29. The T-SQL Debugger allows you to step through the stored procedure, watch the value of variables, set breakpoints, and more.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint