Situatie
Mai jos este o procedura ce returneaza toate permisiunile de tip Deny de pe baza de date MSSQL pe care este rulata.
Solutie
alter procedure ListDenyPermissions_prc
as
SELECT
l.name as grantee_name,
p.state_desc,
p.permission_name,
o.name
FROM sys.database_permissions p
JOIN sys.database_principals l ON p.grantee_principal_id = l.principal_id
JOIN sys.sysobjects O ON p.major_id = O.id
WHERE p.state_desc =’DENY’
Leave A Comment?