If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Sybase > command to show users of a role

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-31-08, 21:19
tiger66 tiger66 is offline
Registered User
 
Join Date: Dec 2007
Posts: 32
command to show users of a role

Hi
I am just wondering if there is any sybase command to show the name of the users that a role has?

I have a role "SUPPORT" and I want to know what users have been assigned to that role

Thanks in advance for your help
Reply With Quote
  #2 (permalink)  
Old 01-05-09, 06:31
Martijnvs Martijnvs is offline
Registered User
 
Join Date: Jan 2004
Location: The Hague/Utrecht, NL
Posts: 396
There is no specific command, but you can use this query:
Code:
select sr.name, sl.name
from syssrvroles sr, syslogins sl, sysloginroles slr
where sl.suid = slr.suid
and sr.srid = slr.srid
and sr.name like "sa_role"
In the last line, you can substitute sa_role with any role-name you want to know the members of.
__________________
I'm not crazy, I'm an aeroplane!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On