Using TSQL Debugger

  • I followed the instructions in bkelley's article about the Query Analyzer to open up and try out the debugger (object browser-> stored proc->right click->debug)

    I opened up the debugger with the SalesByCategory stored proc (NorthWind db), providing the input parameters through the dialog box, but when the debugger starts up, it shows me the sproc as executed and the results in the bottom pane. I cannot see the yellow arrow in the left and the step-into etc buttons are inactive. I guess the sproc has to be running for that to happen, but how can I get the sproc to run in the debug mode without executing in a flash.

    I tried using a breakpoint and re-executing but to no avail. I cannot see any locals or globals or anything in the callstack.

    This is my first taste of the debugger, so maybe I'm missing some step or have not set some option. Can somebody help me out here please?

  • Is your SQL Server set up to run under the Local System account or as a specific user (either Computer\User or Domain\User)?

    K. Brian Kelley

    http://www.truthsolutions.com/

    Author: Start to Finish Guide to SQL Server Performance Monitoring

    http://www.netimpress.com/shop/product.asp?ProductID=NI-SQL1

    K. Brian Kelley
    @kbriankelley

  • Firstly, Brian .....your article was very good! I'm surprised to be helped by the bigwigs 🙂 (I'm just a rookie u know....)

    I'm connecting to a remote development server... do I have to ascertain if that server is under a local system account?

    Thanks

    Nik

  • If the SQL Server service is running under the LocalSystem account, no debugging. It's typically the cause when people can't debug.

    K. Brian Kelley

    http://www.truthsolutions.com/

    Author: Start to Finish Guide to SQL Server Performance Monitoring

    http://www.netimpress.com/shop/product.asp?ProductID=NI-SQL1

    K. Brian Kelley
    @kbriankelley

  • Thanks a lot!......that seems to be it..

    Again, I appreciate your help.

  • You're welcome. It's one of those little known gotchas with debugging.

    K. Brian Kelley

    http://www.truthsolutions.com/

    Author: Start to Finish Guide to SQL Server Performance Monitoring

    http://www.netimpress.com/shop/product.asp?ProductID=NI-SQL1

    K. Brian Kelley
    @kbriankelley

  • I'm sorry.......I feel sheepish but that din't actually work. The remote server I was talking about is running under a domain account.

    When I log into the actual development box (thru terminal services) and run the QA under locally, the debugger works as it is supposed to. But when I'm connecting remotely, (with the same domain username, pwd) thru Query Analyzer from my desktop, the debugger will just execute the sproc.

  • What service pack is your SQL Server on (not the OS, but the SQL Server itself) and what service pack is applied to your client?

    K. Brian Kelley

    http://www.truthsolutions.com/

    Author: Start to Finish Guide to SQL Server Performance Monitoring

    http://www.netimpress.com/shop/product.asp?ProductID=NI-SQL1

    K. Brian Kelley
    @kbriankelley

  • The server properties shows :

    Product version: 8.00.760 (SP3) so that's service pack 3 I guess, running on Windows NT 4.0 (1381)

    I'm not sure what service pack my client tools are: The help button on EM on my machine shows :

    Microsoft Management Console 1.2

    Version 5.0 (Build 2195: Service Pack 3)

    (I hope that is the Service pack you are referring to on the client side)

  • Try applying the SQL Server 2000 SP 3 on your client computer. This will update your client tools to SP3 if they aren't already. There was a change in SP3 that disables debugging from earlier clients that aren't SP3 as well. Here's the KB article:

    http://support.microsoft.com/default.aspx?scid=kb;en-us;328151

    BTW, that SP you are seeing on the client side is related to the Windows 2000 Service Pack.

    K. Brian Kelley

    http://www.truthsolutions.com/

    Author: Start to Finish Guide to SQL Server Performance Monitoring

    http://www.netimpress.com/shop/product.asp?ProductID=NI-SQL1

    K. Brian Kelley
    @kbriankelley

  • I've been trying to install the SP3 on my machine- its running into some problems (been trying to install all the packs- for OLAP, desktop and well as the database engine but some installs dont go thru)....anyway that's something our system admin can fix. I'm sure, if installed, that should solve the problem.

    Thanks again for your kind help.

    From your articles you seem to be very passionate about SQL server ....hope to get there someday.

Viewing 11 posts - 1 through 10 (of 10 total)

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