SQL Server 2005 Debugging

Soldato
Joined
7 Jun 2005
Posts
3,035
Location
SE London
Can anyone tell me how to debug a stored procedure in SQL Server 2005? Is this done through the Management Studio, or Visual Studio 2005? I have VS2005 Standard Edition, is this even possible to do it through there?

Can't find any debug options in either. Please help!
 
could you tell me how I do this exactly? I don't see any debugging options and i have tried following steps from several sites.. Am I missing something?

How do i attach to the SQL Server 2005 process then? Can this be done in VS2005 Standard at all?
 
Last edited:
in VS 2005 professional (the only one I have acces to I'm afraid)

it's under tools -> connect to database

connect to your server, insert a break point in the stored procudre and bob's your mum's brother iirc.

I don't have a 2005 database instance about at the moment (I'm using Sybase for the current project) but if that doesn't work let me know and I'll try and have a dig around when i get chance

HT

edit a search for debug stored procedure on MSDN results in:

http://msdn2.microsoft.com/en-us/library/ms165034.aspx

so it looks like you'll need to use the managerment studio pos or pay more money to uncle bill :(
 
Last edited:
OK so you can only create database projects and debug stored procedures in VS2005 Pro, not in Std.

I have tried finding out how to debug SP's in the SQL 2005 Mgmt. Console but I think this functionality has been moved to VS 2005 now, unless someone can tell me how to do this?

Looks like i'm stuck with a non-debuggable environment here... ;-(
 
what is your stored procedure written in SQL, VB or C# ?

can't you just throw a load of debug outputs into the stored procedure and have a look?

Paul
 
T-SQL. I just tried attaching to the "sqlserv.exe" process but nothing, can't set any breakpoints either.

Strange you have to have Visual Studio to be able to debug SQL Server code.

I rather not do it the old-fashioned way (outputting variable values etc..) so I'm looking for some advice from someone who's been able to do this.. if there is..
 
Back
Top Bottom