473,320 Members | 2,054 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

is there a quick way to get a list of roles a user is a member of?

What I'm looking for is a list of roles a particular user is a member
of.

the closest I've found so far is sp_helprolemember without any
arguements. but this gives me all the roles and all the users. I want
this same list filtered on a specific user.
something like sp_??? 'user'

Jul 23 '05 #1
2 1838
Hi

Maybe:

CREATE TABLE #UserRoles (
DbRole sysname,
MemberName sysname,
MemberSID varbinary(85) )

INSERT INTO #UserRoles (
DbRole ,
MemberName ,
MemberSID )
EXEC sp_helprolemember

SELECT * FROM #UserRoles WHERE MemberName = 'dbo'

John

"IndianaJonesWB" <jr***@lcra.org> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
What I'm looking for is a list of roles a particular user is a member
of.

the closest I've found so far is sp_helprolemember without any
arguements. but this gives me all the roles and all the users. I want
this same list filtered on a specific user.
something like sp_??? 'user'

Jul 23 '05 #2
Perfectamundo! Thanks

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Marty Underwood | last post by:
Okay the subject line explains a scenario I just had to tackle but I am looking for a better way. The current way: 1) Use forms authentication. 2) Query Active Directory and bind to a user...
1
by: Brian Shannon | last post by:
If you are using roles and assigning them from a SQL 2000 DB to the generic principal can you still use the web.config file to check authorization? All the articles I have read has the code...
3
by: charles | last post by:
Hi, I am trying to port my ASP application to ASP.Net 2.0 My application is sold to large corporations that have many thousands of users. So I do not use Forms authentication. To make it more...
9
by: Mike Hofer | last post by:
BACKGROUND: We've designed a Website for a client that will be deployed across multiple physical locations. The site will be hosted from a corporate NOC, and administered by the IT group there. ...
1
by: John | last post by:
Hi I have looked in help but am not clear how to do the following in vb.net code. 1. Check if a user belongs to a specific role. 2. Change user's password. Is it possible to do it without...
5
by: JP.Gantlin | last post by:
I want to have a login page where the new user self-registers, giving some simple info like Real Estate Agent #. Do I need to used the membershiop/roles thing, or profiles? Are profiles part...
1
by: jesibl | last post by:
Hi All, I have an ASP .NET 2.0 web based app which should change content based on a variable passed in the query string. Let's say the variable is called ID and the variations are A, B and C. ...
2
by: mark4asp | last post by:
This is a simplified version of my site. There are Premium users who have access to the Premium directory. Anyone else attempting to access it should be logged and then redirected to the...
1
by: John | last post by:
Hi When I try to get a list of roles using RolesArray = Roles.GetAllRoles() the array returned is Nothing. However if I assign a user to a role as below Roles.AddUserToRole(User.UserName,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.