?
Solved

Get the Roles the actual user has in a SQL database

Posted on 2009-05-18
2
Medium Priority
?
354 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 2000 total points
ID: 24413282
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
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…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

718 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