Groups | Blog | Home
all groups > sql server programming > june 2004 >

sql server programming : How do I resolve roles with just the userid (uid) in the sysusers table ?


steve mew
6/19/2004 10:31:03 PM
I have a reporting assignment that requires the need to find out which roles
a user has.
I have the userid (uid) and with this I can look up the user in the sysusers
table.
How do I find out what roles this user has ?

Any help greatly appreciated.
Thanks

s

Vishal Parkar
6/20/2004 6:30:00 AM
to check the database role to which user has been added run sp_helpuser
Ex:
sp_helpuser <user>

to report with information about user permissions for an object, or
statement permissions, in the current database
run sp_helprotect
Ex:
sp_helprotect @username=<username>


--
Vishal Parkar
vgparkar@yahoo.co.in | vgparkar@hotmail.com

Hari Prasad
6/20/2004 8:16:21 AM
Hi,


Use the below procedure to list roles assigned for the user in all the
datbases.

sp_helplogins <Login_name>

To see the database user role, see

sp_helpuser <user_name>

Thanks
Hari
MCDBA


[quoted text, click to view]

AddThis Social Bookmark Button