Solved

Get the Roles the actual user has in a SQL database

Posted on 2009-05-18
2
332 Views
Last Modified: 2012-05-07
Hello,
In a C# program, I'm seeking to find a way to determine which roles the actual user (the one with I am connected to the database) has.

I know taht this command will tell me the name of the actual user : "SELECT SUSER_SNAME()".

... but now I wnat to know what are its roles in the database, is it possible ?
0
Comment
Question by:Bulle
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 5

Expert Comment

by:dhobale
ID: 24413278
try the following stored procedure:

sp_helpsrvrole [[@srvrolename =] 'role']
0
 
LVL 5

Accepted Solution

by:
dhobale earned 500 total points
ID: 24413282
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
Azure Functions is a solution for easily running small pieces of code, or "functions," in the cloud. This article shows how to create one of these functions to write directly to Azure Table Storage.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question