How to know which user is having Exec permissions on my procedure?

  • Hi All,

    If I have to know who are all having (users) execute permissions for my stored proceudre, I can see this in Enterprise Manager.  But from Query Analyzer how can I know? 

    Please send me queries which shows all authorised users for my procedure.

    Thanks in Advance,

    Mahesh

  • Mahesh

    Try this.  But beware: if you have procedures of the same name owned by different owners then this will need a bit of refinement.

    John

    select o.name, user_name(p.grantee) from syspermissions p

    join sysobjects o on p.id = o.id

    where o.xtype = 'P'

      and o.name = 'MyProc' -- Comment out to see all stored procedures

    order by o.name

  • Mahesh,

    Use the system proc, sp_helprotect:

    exec sp_helprotect 'dbo.MyProc'

  • Thanks Karl.

    Mahesh

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply