Re: testing t-sql commands



Wendy Elizabeth (WendyElizabeth@xxxxxxxxxxxxxxxxxxxxxxxxx) writes:
My goal is to debug some t-sql commands. To do this, I have setup a
project as a database project. The insturctions on the microsoft website
url says that I need to attach to a process and the process that I need
to attach to is 'sqlserver.exe'. However, I can not find this process to
connect so. Thus, I can not attach to it if it is not in the drop down
list.

I doubt that you should attach sqlservr.exe to debug stored procedures.
Possibly you would do that if you were to debug extended stored procedures.
(Which is about C++ and not T-SQL.)

I'm not sure that VS 2005 even supports debugging SQL 2000. Then again,
if you can get it work with QA, it's ont going to work with QA either.

2. I have tried to use query analyzer 2000 from my workstation so that I
can debug a stored procedure. I select the stored procedure I want
from the object browser and right click to debug. The debug window does
show up and the only icons that are not grayed out are the set
breakspoints, and start to run. It does not allow me to set through or
'step into'. What is wrong here?

Probably a whole lot of things. Getting the T-SQL debugger to work with
a remote server requires a lot of patience. If you run Windows XP SP2,
or have some other firewall, you need to open port 135 - but you should
open it only for the SQL Server boxes! If your client is XP SP2, you need
to have SQL 2000 SP4, both on server and client. The account under
which SQL Server needs to have permission to write to your machine. And
it probably does not stop there.

Myself, I've given up on the T-SQL debugger, and rely on adding SELECT
and PRINT to debug my code.


--
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, ... 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: visutal studio.net 2005 debugging question
    ... 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.vsnet.debugging)
  • Re: Cant write to folder
    ... To debug without running via studio, click Tools / Attach to Process. ... ensure in the attach to block that SQL Server is not selected. ... inpFileUpNIIN.PostedFile.SaveAs(strBaseDir & strFileName) ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Attach to Process
    ... Actually my question has to do with how to debug and step through managed CLR code applications that are running by themselves - not in visual studio debugger. ... If you are using a wizard, you cannot attach after you start the wizard, as some of the context is not available to the debugger. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Attach to Process
    ... Actually my question has to do with how to debug and step through managed CLR code applications that are running by themselves - not in visual studio debugger. ... If you are using a wizard, you cannot attach after you start the wizard, as some of the context is not available to the debugger. ...
    (microsoft.public.dotnet.framework.aspnet)