开发者

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

开发者 https://www.devze.com 2023-02-17 19:36 出处:网络
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开发者_如何学Python

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

精彩评论

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