Using the T-SQL Debugger

If none of the previous techniques helps to solve the problems in the procedure, there is one tool you can use that will definitely help. Microsoft SQL Server 2000 provides a debugging tool within the Query Analyzer that will assist you in finding the problems. The T-SQL debugger provides the traditional functionality that most current debugging tools support, such as the following:

  • Assigning parameter values

  • Single-stepping through the stored procedure

  • Observing the changes to the variables during execution

  • Setting breakpoints on any statement to stop when executing

The T-SQL debugger will assist you when testing your procedure with valid or invalid data. In addition, if the procedure is returning the wrong result with valid ...

Get Sams Teach Yourself Transact-SQL in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.