May 3, 2005 at 6:38 am
Hi,
can anybody please update if we have any procedure to find out the permissions for any login,any user,any role on different objects like tables/sps/views etc.
Thanks
May 3, 2005 at 8:44 am
select user_name(b.uid)as username ,object_name(id) as objectname , case when action = 26 then 'References'
when action = 178 then 'CREATE FUNCTION'
when action = 193 then 'SELECT'
when action = 195 then 'INSERT'
when action = 196 then 'DELETE'
when action = 197 then 'UPDATE'
when action = 198 then 'CREATE TABLE'
when action = 203 then 'CREATE DATABASE'
when action = 207 then 'CREATE VIEW'
when action = 222 then 'CREATE PROCEDURE'
when action = 224 then 'EXECUTE'
when action = 228 then 'BACKUP DATABASE'
when action = 233 then 'CREATE DEFAULT'
when action = 235 then 'BACKUP LOG'
when action = 236 then 'CREATE RULE' end as Permission , case when protecttype = 204 then 'GRANT_W_GRANT'
when protecttype = 205 then 'GRANT'
when protecttype = 206 then 'REVOKE' end as permissiontype From sysusers a join sysprotects b on a.uid = b.uid and objectproperty(b.id,'IsSystemTable') = 0 order by Permission
May 3, 2005 at 10:52 am
thank you very much
May 4, 2005 at 1:17 pm
you might also try sp_helprotect.
MG
"There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies."
Tony Hoare
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply