开发者

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 SQ开发者_如何学PythonL Server 2000 has execute rights to?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜