EXECUTE permission denied on object 'sp_sdidebug', database 'master', owner 'dbo'.
Posted on 2006-04-10 13:37 Programmer 阅读(2122) 评论(0) 编辑 收藏 举报I developed a web application that uses SQL Server 2000 as the data store. It worked fine. However, when trying to debug the code to track down an error, I got exceptions:
EXECUTE permission denied on object 'sp_sdidebug', database 'master', owner 'dbo'.
I noticed that the exceptions were thrown when trying to excecute a SQL query, that is, something was wrong in the SQL Server. That made me completely confused, since I never called "sp_sdidebug" in my own stored procedures.
Then I had to ask Google search for help. After searching the keywork "sp_sdidebug", I gradually knew that "sp_sdidebug" was an extended stored procedure, and was designed for debugging stored procedures. Now, I think you propably know why I got those exceptions. When debugging, Visual Studio tried to step into a stored procedure with the help of "sp_sdidebug" for some reason, but the current account of the sql connection didn't have apropriate permissions to execute "sp_sdidebug".
To correct the error, we have two methods:
- The first, also the simpler one is that we don't debug the stored procedures. we just need to disable the "Enable SQL Server debugging" option in project properties, or only have "Managed" option checked if you attach to an existing process.
- The second one is that we give EXECUTE permission to the sql server user. Use the Enterprise Manager shipped with SQL Server or consult your database administrator to solve the problem.