Re: Debugging Stored Procedures with Query Analyzer



Stephan Zaubzer (stephan.zaubzer@xxxxxxxxxx) writes:
I have the following problem:
When trying to debug a stored procedure with query analyzer it does not
stop at the first line of code. Instead it runs throug the whole
procedure and I cannot stop it! Am I missing something?
Without being able to interrupt the procedure I want to debug, the
debugger is useless...

Getting the debugger to work requires so much red tape that I have
essentially given up on it. The only exception is possibly if QA and
SQL Server is on the same machine.

First check in Help->About in Query Analyzer which version of QA you have.
Then compare that with @@version. If QA has less than 8.00.760 and
@@version is 8.00.760, you need to upgrade your client tools to SP3.

If you are running Windows XP SP2, with or without firewall enabled,
you need SP4 on both server and client, and configure your firewall
to permit the server to connect to you. (But I don't think you have
this problem, as you usually get an error message as I recall.)

Also, the service account under which SQL Server runs needs some
rights on your machine.

There is a section "Troubleshooting the Transact-SQL Debugger" on
Books Online that may give further tips.



--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.



Relevant Pages

  • Re: Need answer to this
    ... To debug a Stored Procedure in QA ... SQL Server Programmer ... > Query Analyzer ... > Profiler Troubleshooter ...
    (microsoft.public.sqlserver.programming)
  • Re: query plan in clear text
    ... Personally, I do almost all tasks from Query Analyzer, and about the only ... Enterprise Manager is to deal with jobs. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • Re: testing with sql server
    ... Regarding your SQL Server 2000 debugging problems, ... version to debug with a sql server 2000 database. ... My goal is to debug some t-sql commands. ... attach to a process and the process that I need to attach to is ...
    (microsoft.public.sqlserver.setup)
  • Re: Can i debug/watch on the triggers INSERTED and DELETED records/values?
    ... > Sometimes I do debug remotely. ... we found that debugging did not work when you had Windows ... Now, port 135 is not any port: ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (comp.databases.ms-sqlserver)
  • Re: Interpreting the execution plan results
    ... > On Query Analyzer.. ... > I can figure out a little what the information on the execution plan means ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (microsoft.public.sqlserver.tools)