Re: permission denied on object 'sp_sdidebug', database 'dbname',

From: Jeff Kish (jeff.kish_at_mro.com)
Date: 03/01/05


Date: Tue, 01 Mar 2005 09:34:59 -0500

When I installed ms sql server with sp3 I found I could not run the debug
on stored procedures. It was grayed out.

Once I did some research, I determined (I "think" from MSDN) that
I needed to GRANT to run the debugger logged in as this user.
I got an error doing the GRANT. Looking around a bit more, I saw that
I also needed to run in legacy mode for this object.
I submitted a script for that, but I still could not GRANT.

After substantially more investigation, I saw one user was able to get the
debugger running if he added his user as a db_owner to the master
database.

After I did this, I still could not do the GRANT, but was able to run the
debugger on stored procedures.

Now I'm trying to figure out if what I did was a reasonable solution, and
why I could not do the GRANT. Finally, I'm casting about for an explanation
and some level of confidence for what I did to "fix" the problem.

Also, I wanted to figure out how to run the LEGACY script at startup so I
don't need to do it every time.

Thanks

On Mon, 28 Feb 2005 16:49:04 -0800, "Alejandro Mesa"
<AlejandroMesa@discussions.microsoft.com> wrote:

>Jeff,
>
>Why do you need to GRANT execute on this sp?
>
>
>AMB
>
>
>"Jeff Kish" wrote:
>
>> Hi.
>> I have seen lots of discussion.
>> My starting problem was that after installing sql server 2000 and sp3, I could
>> not debug stored procedures.
>>
>> I thought I saw the solution in MSDN, but
>> it did not work for me (I could not grant execute
>> on sp_sdidebug to my user).
>>
>> short end is.. I had to do something else.
>>
>> I'm developing on a local mssqlserver 2000 sp3
>> windows 2000 is the o/s
>>
>> I logged in as the sp and ran this:
>> EXECUTE sp_sdidebug 'LEGACY_ON'
>>
>> Then I tried to enter this:
>>
>> GRANT EXECUTE
>> ON sp_sdidebug
>> TO MYUSER
>>
>> But I got an error about not being able to set permissions for objects owned
>> by others.
>>
>> I'm obviously clueless, but I did find a blurb from someone who said they
>> had to add the users to the MASTER database as users with db_owner checked.
>>
>> After I did this, I could debug sp's, but still could not do the 'GRANT
>> EXECUTE ON sp_sdidebug'.
>>
>>
>> So
>>
>> 1 - what is the best way to get the (EXECUTE sp_sdidebug 'LEGACY_ON')
>> executed each time the db starts up? (if I need to put it in some sp, how
>> exactly do I get that called at startup?)
>> 2 - any idea what I'm boffing here to prevent the 'GRANT EXECUTE ON
>> sp_sdidebug' from working?
>> 3 - any thoughts about the MASTER.db_owner "solution"?
>>
>> Thanks for your patience as I am sure this is a well trampled ground.
>>
>> Jeff Kish
>>

Jeff Kish



Relevant Pages

  • Re: Execute premmition
    ... Here's a script like the one Russell alluded to. ... 'GRANT EXECUTE ON ' + ... >> There is not a predefined role for stored procedures, ...
    (microsoft.public.sqlserver.security)
  • Re: Stored Procs and db_owner
    ... > I have some users that I need to run stored procedures, ... > How do I give them access to run the stored procs without giving them ... and then grant access to the role instead. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (comp.databases.ms-sqlserver)
  • Re: SQL Server 2005 Database Security
    ... There are several ways you can achieve this in SQL Server 2005: ... You can have the procedures signed with certificates that grant them ... and then you just need to grant execute permission on ... login just to call a set of stored procedures in the database and not be ...
    (microsoft.public.sqlserver.security)
  • RE: permission to review jobs and settings
    ... and then grant the permissions to the user. ... stored procedures will call other system stored procedures. ...
    (microsoft.public.sqlserver.security)
  • Re: Grant EXECUTE ALL?
    ... work around the problem by runnning a query to generate the GRANT EXECUTE ... You need to review the grant statements very carefully. ...
    (microsoft.public.sqlserver.security)