Solved

Get the Roles the actual user has in a SQL database

Posted on 2009-05-18
2
322 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
  • 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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

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

Suggested Solutions

As technology users and professionals, we’re always learning. Our universal interest in advancing our knowledge of the trade is unmatched by most industries. It’s a curiosity that makes sense, given the climate of change. Within that, there lies a…
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
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…

860 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