Debugging SQL Server

  • My SSIS debugging seems to be different from most.

    In the Control Flow, you can set breakpoints on any object, which can kick in at different points (before execute, after execute etc.) – no need for MessageBox when you can see all of the variables' values using this technique.

    If I am debugging a script task, I use the C# debugger to step through the code as it executes.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • PRINT, IF APP_NAME() LIKE "%QUERY%" BEGIN...END, DECLARE @Debug variable

    I remember being SOOO excited when SQL2K came with a debugger... and the crushing disappointment at its unmitigated clunkiness.

     

     

     

     

     

  • I mostly use PRINT and temp tables. One other thing I do in all multi-step stored procedures is to declare a variable called @ErrorLocation that is incremented before each step. The value of the variable is included in the error message I build in the catch block of the stored procedure. This really helps narrow down where things are going wrong.

Viewing 3 posts - 31 through 32 (of 32 total)

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