Re: Can i debug/watch on the trigger's INSERTED and DELETED records/values?



serge (sergea@xxxxxxxxxxxxxxxxx) writes:
> Sometimes I do debug remotely (maybe often). Are you saying it is not
> always a safe approach to debug remotely? "There is so much red tape":
> these are known issues that happen frequently or in the very rare cases?
> Would you know if there are MS KB on these problems or personal
> experiences led you to stop debugging remotely?

Unsafe? Yes, a little, although that was not really what I meant with
red tape. What I mean is simply that there are so many things have to
be aligned for it to work, that I don't find it worth the hassle.

Some time back, we found that debugging did not work when you had Windows
XP SP2 installed. I did some investigation, and found that hotfix
8.00.944 addressed this problem. (This hotfix is included in SP4.) I
installed hotfix on client and server. I also had to open port 135 in
Windows firewall. Now, port 135 is not any port: this is RPC, and a
prime attack surfaces for viruses. So opening port 135 is a little unsafe,
so there is all reason to only open it for the SQL Servers you want to
debug. (If is possible to open a port only for a certain IP address in
Windows firewall.) Eventually I got it working.

Then some months later, I felt like debugging again, but now I was out
of luck again. I did some inquires, and apparently our Windows admin had
decided to cut the number of permissions for the SQL Server service
account. I don't know exactly what permissions that are required, but
as it writes back to the client, it needs more than plain-user rights.

At this point, I just gave it up. These are not the only thing that
can stop debugging from working. And after all, what you can dig out
from the debugger can easily be achieved in other ways. Of course,
code that uses iterative approaches can be painful to debug that
way. But good SQL should not have much such code anyway. :-)

And, oh, there is one more possible issue with the debugger. Single-
stepping through a transaction is not that friendly if other users
needs to access the data.


--
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: testing with sql server
    ... Regarding your SQL Server 2000 debugging problems, ... that your client tools and your server are at the same Service Pack. ... SP3a and could no longer step through the debugging process. ... My goal is to debug some t-sql commands. ...
    (microsoft.public.sqlserver.setup)
  • Can not debug SQL sever 2005 Stored procedure from Visual Studio 2005
    ... I am trying to debug a SQL server 2005 SP in VS 2005. ... Direct database debugging where in we select SP and use 'Step Into ... It prompts me for parameters etc but then no window with SP ...
    (microsoft.public.dotnet.general)
  • Debugging in VS.NET
    ... I am attempting to debug a few stored procedures I created using the VS.NET ... After clicking "Run Stored Procedure" the IDE starts debugging, ... "Cannot debug stored procedures because the SQL Server database is not setup ...
    (microsoft.public.sqlserver.msde)
  • Re: Query Analyzer Debuging
    ... They put SP4 on the SQL server and debugging is so ... I hope it is not such a mission to debug in SQL 2k5. ... >server upgraded from SQL SP3 to SQL SP4: ...
    (microsoft.public.sqlserver.tools)
  • Re: Office or InDesign breaks VS 2005 debugging?
    ... Given tha I was using and debugging the sub-projects in this solution before ... some getting used to) and the debug symbols for the child project are no ...
    (microsoft.public.vsnet.debugging)