Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

How to find out database role or server role in SQL 2005

 
   Database Forums (Home) -> Security RSS
Next:  Unkown MySQL process  
Author Message
MS Techie

External


Since: Dec 09, 2008
Posts: 26



(Msg. 1) Posted: Thu Jul 22, 2010 1:54 am
Post subject: How to find out database role or server role in SQL 2005
Archived from groups: microsoft>public>sqlserver>security (more info?)

Hi All,

Currently I have a scenario wherein a user has logged in via the Windows
Authentication to the SQL Server 2005 using SQL Server Management Studio. Now
the user does to what all database roles(like db_datareader,db_datawriter
etc..) he has access to and what all Server Roles he as access to.

(Since there are 2 kinds of roles (1)Database Roles (2) Server Roles )

Now When the user expands the logins folder in the SQL Server Management
Studio , he sees several Windows NT Active Directory Security Groups listed
over there , but does not see his windows NT login Id listed over there. This
means to see that he must be belonging to one of the Active Directory's
Security Group. Since Domain\Domain Users is one of the groups listed over
there, he would belong to that group and may be one more Security Group. Now
is there is any command or way to find out what Active Directory Security
Group he belongs to or what database roles and server roles he posses on that
SQL Server Instance.

Thanks in Advance

 >> Stay informed about: How to find out database role or server role in SQL 2005 
Back to top
Login to vote
Erland Sommarskog2

External


Since: May 30, 2004
Posts: 1649



(Msg. 2) Posted: Thu Jul 22, 2010 6:25 am
Post subject: Re: How to find out database role or server role in SQL 2005 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

MS Techie (MSTechie@discussions.microsoft.com) writes:
> Currently I have a scenario wherein a user has logged in via the Windows
> Authentication to the SQL Server 2005 using SQL Server Management
> Studio. Now the user does to what all database roles(like
> db_datareader,db_datawriter etc..) he has access to and what all Server
> Roles he as access to.
>
> (Since there are 2 kinds of roles (1)Database Roles (2) Server Roles )
>
> Now When the user expands the logins folder in the SQL Server Management
> Studio , he sees several Windows NT Active Directory Security Groups
> listed over there , but does not see his windows NT login Id listed over
> there. This means to see that he must be belonging to one of the Active
> Directory's Security Group. Since Domain\Domain Users is one of the
> groups listed over there, he would belong to that group and may be one
> more Security Group. Now is there is any command or way to find out
> what Active Directory Security Group he belongs to or what database
> roles and server roles he posses on that SQL Server Instance. >

To see what Active Directory groups he is, I think the AD is the place to
look in.

To see what a permissions a user has, you can use the function run
fn_my_permissions or has_perms_by_name. Note that they must be executed
in the context of that user.


--
Erland Sommarskog, SQL Server MVP, esquel DeleteThis @sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 >> Stay informed about: How to find out database role or server role in SQL 2005 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Questions creating new database role - When I execute the following for a fixed database role: EXEC sp_dbfixedrolepermission 'db_denydatawriter' the resultset is as follows: db_denydatawriter No DELETE permission on any object db_denydatawriter No INSERT permission on any object..

Execute Permission for Database Role - There are about 300 stored procedures and we are trying to separate EXECUTE permission for Readers and Writers. Here is the scenario: 1) Two Domain groups created named SQLWriters and SQLReaders consisting of respective users. 2) Two SQL logins created...

Which Server Role should I use? - Dear all, I am assigning security rights for some login ids. I would like to know if I allow some users to manage their jobs in SQL Server Agent themselves, but I don't want to give them "Server Administrators" role in Server Roles. Which S...

public role question - Using SS2000 SP4. I'm trying to lock down the database as much as possible. I created a new sql server login and gave the user no permissions other than public role. Why am I able to create a stored procedure with the new user. I thought Public had....

Security role problem - I have an SQL Server 2000 database with access project (.adp) front end. I have a security role that has the permission to run a stored procedure. The stored procedure does a select and an update on a table. To make the stored procedure run the..
   Database Forums (Home) -> Security All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]