DaveB
DaveB

Reputation: 9530

How Can I Find All The Stored Procedures That A Certain User Has Execute Rights To

I am migrating some stored procedures from SQL Server 2000 to SQL Server 2005 and setting up the permissions. How can I get a list of the stored procedures that a certain user in SQL Server 2000 has execute rights to?

Upvotes: 1

Views: 1382

Answers (1)

RichardTheKiwi
RichardTheKiwi

Reputation: 107826

This should be close

select u.name, o.id, o.name
from sysobjects o
cross join sysusers u 
left join syspermissions p on p.id = o.id and u.uid = p.grantee
where o.xtype='P' and
 (u.roles & 1 = 1 or p.actadd = 32)

User name, and procs that the user can execute

Upvotes: 1

Related Questions