Fix for EXECUTE permission denied on object ’sp_sdidebug’, database ‘master’, owner ‘dbo’ error
![]()
If you are developing web services with ASP.NET you must have faced this error,
EXECUTE permission denied on object ’sp_sdidebug’, database ‘master’, owner ‘dbo’.
It’s a pretty vague error with misleading and confusing information. Even if you search online you wouldn’t be able to find a solution that’s convincing. But here is a solution that worked for me. There is no guarantee that it would work for you but you can certainly give this a try.
Please note that this solution may only be effective if you are debugging your ASP.NET web page or web service and are manually attaching the worker process.
1. Attach to the ASP.NET worker process.


Click on the “Debug” menu and click on the “Attach to Process…” menu option. Then in the dialog box choose “aspnet_wp.exe” process and click on the “Select…” button at the top.
2. Choose to debug Managed Code.

You will get the “Select Code Type” dialog with the “Automatically determine the type of code to debug” selected. Instead choose the “Debug these code types” option and then choose the “Managed” checkbox.
Try to recreate the problem again and I’m sure it works this time without the “EXECUTE permission denied on object ’sp_sdidebug’, database ‘master’, owner ‘dbo’.” error.
Hope it helps. Let us know in comments of any other alternate solutions to this issue.



June 29th, 2009 at 3:20 pm
Thanks! This debugging not being limited to managed code was exactly the problem I was running into.