January 10, 2007 at 7:07 am
Hello,
I'm trying to find information on how I would get a list of users in a database and their rights. I don't what to see their roles (can do that already) but their rights. Departments want to know each users rights that are not in a role/group.
Any help would be great.
Thanks in advance for your time and efforts.
Rudy
January 11, 2007 at 5:15 pm
Something like this?
select left(u.name,20),
cast(o.name as varchar(45))as 'object',
case p.action
when 193 then 'SELECT'
when 195 then 'INSERT'
when 196 then 'DELETE'
when 197 then 'UPDATE'
when 224 then 'EXECUTE'
else ' '
end as 'permission'
from sysprotects p join sysobjects o
on o.id = p.id
join sysusers u
on p.uid = u.uid
order by u.name
Greg
Greg
January 12, 2007 at 7:02 am
Thanks Greg but not really. Below is the output I'm looking for
DB_Name: Northwind2
User_Name: jsmtih
Table_Name Access_Type
Customers INSERT/UPDATE/DELETE
Sales SELECT
Address SELECT
Something like this. What I don't understand is that auditors and managers alway as for this information yet there is very little on the net.
Thanks again for your efforts,
Rudy
Rudy
January 12, 2007 at 10:28 am
sp_helprotects?
January 12, 2007 at 11:27 am
Yes! Thank you for all your time on this. Now I can make the auditors happy.
Rudy
Rudy
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply