views:

229

answers:

4

I have a stored procedure being executed from an ASP.NET application. Is it possible to attach to the procedure and step through it using SQL Server 2005?

Note, in this instance, I am not using a DataAdapter. I'm going in blind. The connection string is being created on the fly, so I don't have access to the schema from the Visual Studio 2005 designer.

I was hoping for a solution similar, for example, to how you attach to a process on a remote server and when a break point is hit, the debugger fires.

+1  A: 

absolutely

http://www.dotnetfunda.com/articles/article27.aspx is a link.

edit sorry realised the initial link was subscription only, this link is better

Pharabus
A: 

You can also use SQL Profiler to find out what is going on "behind the scenes".

JonH
+4  A: 

I don't think you can debug a stored procedure directly from your ASP.NET application (i.e. set a break point in your .NET code and the step into a stored procedure), but it is possible to debug it directly using visual studio.

Here is a great article on SQLTeam.com describing how to do that.

Oded
+1 for having The Fonz in the middle of the article :)
Jeff Dallien
+1 fonz was funny!
JonH