Welcome to Professional ASP.NET - Chris Love's Official Blog Sign in | Join | Help

Chris Love's Official ASP.NET Blog

Chris Love's Helpful tips, tricks and pragmatic development knowledge for the ASP.NET world.
Add to Technorati Favorites


ASP Insider
EXECUTE permission denied on object 'sp_sdidebug', database 'master', owner 'dbo'.

I hit a snag this mroning trying to work on a site that accesses a remote third party SQL Server.  I was trying to debug a the code to track down an error.  To my surprise I kept throwing a different exception and at a different location in the code when I debuged.

EXECUTE permission denied on object 'sp_sdidebug', database 'master', owner 'dbo'.

sp_sdidebug errorI quickly determined that this must be due to the fact that I obviously do not own the stored procedure I am trying to execute and for some reason Visual Studio is trying to step into the SQL Code.  But I knew I did not specify this option when I defined the debug options for the web site.  Now, remember how I mentioned that I like to attach to an existing process to debug my web sites?  That was the culprit.

When you attach to an existing process, you are by default debugging into the SQL code.  This has to be selected by itself by clicking the 'Select' button in the middle of the dialog.  You only need to have the 'Managed' option checked.  Too bad this was not real obvious, but now you know!

Posted: Tuesday, March 14, 2006 11:17 AM

by Chris Love
Filed under: ,

Comments

Richard yanwei said:

这是因为当你debug一个已经运行的进程时,确省是包括SQL debug功能的。而SQL Server 2000的SP3增加了一个安全性措施,即只有存储过程的所有者才可以bebug。
# April 10, 2006 1:16 AM

thomasmox said:

That was excellent!

I was having a similar problem, allthough when attaching to a windows service. But I had never thought about altering the debug options as you describe, so excellent! Thanks a lot! :o)

Thomas

# January 12, 2007 5:44 AM

Lucas Goodwin said:

Thanks for this! Saved me hours of scouring to figure out why the debugger was trying to step into SQL when I only wanted to debug managed code. Even better, now I know I can use VS.NET instead of Query Analyzer to do SQL debugging (when setup properly, ofcourse).
# April 14, 2008 6:25 PM

Tanuj said:

Saved a hour for me :-) Tanuj
# July 1, 2008 10:19 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS