Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
sixside
Starting Member
12 Posts |
Posted - 2011-05-12 : 22:15:06
|
How can use T-SQL to find all stored procedures (non-system sprocs) that a specific user does NOT have Execute privileges on?Thanks |
|
latch
Yak Posting Veteran
62 Posts |
Posted - 2011-05-13 : 10:54:03
|
U can try these:SELECTdp.Class,dps1.Name As Grantee,dps2.Name As Grantor,so.Name,so.Type,dp.Permission_Name,dp.State_DescFROM sys.database_permissions AS dpJOIN Sys.Database_Principals dps1ON dp.grantee_Principal_ID = dps1.Principal_IDJOIN Sys.Database_Principals dps2ON dp.grantor_Principal_ID = dps2.Principal_IDJOIN sys.objects AS soON dp.major_id = so.object_idWHERE so.Name = 'UpdateStock'source:http://dbaspot.com/sqlserver-programming/462251-find-users-permission-sp.html |
 |
|
|
|
|