Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Other SQL Server Topics (2005)
 How to Debug My Stored Procedure.

Author  Topic 

SQLTeam_Sandy
Starting Member

4 Posts

Posted - 2007-03-20 : 07:58:11
Dear Sir,

I am from ASP.NET back ground now I am working in SQL Server 2005. I want to debug my stored procedure after coding end. In SQL 2000 there is an option of debug right click on the stored procedure but No such option present in SQL Server 2005 so I am unable to debug my Stored Procedure when any error occur.

Can you please guide me?

Regards

Sandeep Mishra
Bangalore


Have A Nice Day...!!!

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-03-20 : 08:13:23
Check if this article helps:
[url]http://sqljunkies.com/WebLog/nielsb/archive/2004/08/04/3758.aspx[/url]

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

Aviral
Starting Member

1 Post

Posted - 2007-03-21 : 01:24:25
Use the following command

EXEC <Procedure name> <Arguments as input>

Then Press F5

quote:
Originally posted by SQLTeam_Sandy

Dear Sir,

I am from ASP.NET back ground now I am working in SQL Server 2005. I want to debug my stored procedure after coding end. In SQL 2000 there is an option of debug right click on the stored procedure but No such option present in SQL Server 2005 so I am unable to debug my Stored Procedure when any error occur.

Can you please guide me?

Regards

Sandeep Mishra
Bangalore


Have A Nice Day...!!!



Aviral
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-03-21 : 01:25:58
Will that debug the procedure? or run it?

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

SQLTeam_Sandy
Starting Member

4 Posts

Posted - 2007-03-21 : 06:33:13
Hey Harsh,

I have gone through that link but it seems to be debug by Visual Studio 2005 and which need .net code but my requirement is diff. I wants to debug by step by step. and return output.

Please guide me other ways...

Regards

Sandeep
Bangalore

Have A Nice Day...!!!
Go to Top of Page

macker
Starting Member

1 Post

Posted - 2007-03-21 : 11:36:13
yeah, that will just run it, not debug it.

i am looking, have not found a way yet, but i have only been working with sql 2005 for about 3 months now....however, extensively!lol

If I find anything, I will be sure to post back.
Go to Top of Page

SQLTeam_Sandy
Starting Member

4 Posts

Posted - 2007-03-22 : 06:53:08
Can you provide some links relate to this topic
so i can find out the way

Regards

Sandeep Mishra
Bangalore


Have A Nice Day...!!!
Go to Top of Page

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2007-03-29 : 15:33:10
you can't debug a proc from SSMS. that feature was cut.

You can do it from VS 2005 though. have a look here:
http://www.google.com/search?q=debug+stored+procedure+sql+2005

The second search result has step by step instructions:
http://searchsqlserver.techtarget.com/tip/0,289483,sid87_gci1197403,00.html?Offer=SQLwntipb0116

moral: google first, ask questions later.






www.elsasoft.org
Go to Top of Page

rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2007-03-29 : 17:31:03
Curiosity...

On the subject of the thread, who many actually -debug- their stored procedures,
using the debugger.

I have used it a couple of times (in 2000) but seldom found it useful.
Currently we have a medium size dev team accessing the db, and they have produced well over 1000 sps, but so far I have never gotten
a request on how to -debug- an sp in SSMS or VS2005.

rockmoose
Go to Top of Page

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2007-03-29 : 18:50:17
I pretty much never do, because the hairiest parts of a proc (the actual queries) can be debugged outside of a debugger, with plain old QA. All you do is just replace the params with hard coded values and hit F5.

With compiled languages like C++, you can't do this so debuggers are essential there. windbg rules! So sad that you can't step into managed code with it...


www.elsasoft.org
Go to Top of Page

SQLTeam_Sandy
Starting Member

4 Posts

Posted - 2007-04-03 : 05:38:46
Hi,

It Seems little bit complex but can be achieved by using VS2005.
But for the new comer to VS2005 environment it is not easy?
I think it is not that easy to handle this stuff personally it can be achieved by team only.

Anybody can suggest me any alternative to resolve this issue

Regards,

Sandeep Mishra
Bangalore

Have A Nice Day...!!!
Go to Top of Page
   

- Advertisement -