473,473 Members | 1,552 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How Can i know how many USERS are in agroup.

HI all
I just wana know that is there is any TSQL Statement which will give me
the list of all user groups,names of user in each group and thier
Permssions in any database/server.
Actually I have to create a report in wich i have to show that how
many groups we have any whi is the member of wich group with such
permissions.I ckeck through Interprise Manager but i guess it will take
alot of time to note every user group then users and their permissions.
So please any HELP will be greatly Appriciated.

Thanks

Arman

Jan 14 '07 #1
4 2799
(ch*********@gmail.com) writes:
I just wana know that is there is any TSQL Statement which will give me
the list of all user groups,names of user in each group and thier
Permssions in any database/server.
Actually I have to create a report in wich i have to show that how
many groups we have any whi is the member of wich group with such
permissions.I ckeck through Interprise Manager but i guess it will take
alot of time to note every user group then users and their permissions.
So please any HELP will be greatly Appriciated.
Before I try anything, I would like some clarification. With "groups" do
you mean what is normally called "roles" in SQL Server? That is grouping
of users within a database?

Or do you mean Windows groups as in DOMAIN\OFFICEUSERS?
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Jan 14 '07 #2
Erland Sommarskog wrote:
Before I try anything, I would like some clarification. With "groups" do
you mean what is normally called "roles" in SQL Server? That is grouping
of users within a database?

Or do you mean Windows groups as in DOMAIN\OFFICEUSERS?

Even if Arman meant roles, I'd like to ask you similar question
according to Windows groups. Is it possible to list Windows group
members using T-SQL? Let's assume that I'm a sysadmin, but not domain
admin.
--
Best regards,
Marcin Guzowski
http://guzowski.info
Jan 15 '07 #3

Marcin A. Guzowski wrote:
Erland Sommarskog wrote:
Before I try anything, I would like some clarification. With "groups" do
you mean what is normally called "roles" in SQL Server? That is grouping
of users within a database?
Question #1:

Answer : Yes

sp_helpuser
Or do you mean Windows groups as in DOMAIN\OFFICEUSERS?


Even if Arman meant roles, I'd like to ask you similar question
according to Windows groups. Is it possible to list Windows group
members using T-SQL? Let's assume that I'm a sysadmin, but not domain
admin.

Question #2:

Answer: Yes, set up a linked server with your pdc server / active
directory and use open query to query this information from the linked
server.

http://www.fits-consulting.de/blog/P...e73b00faa.aspx
--
Best regards,
Marcin Guzowski
http://guzowski.info
Jan 15 '07 #4
je********@gmail.com wrote:
Question #2:

Answer: Yes, set up a linked server with your pdc server / active
directory and use open query to query this information from the linked
server.

http://www.fits-consulting.de/blog/P...e73b00faa.aspx

I found much easier way:
exec master.dbo.xp_logininfo 'DOMAIN\GROUP','members'

It will list all members of desired Windows group*, without the need
of setting up a linked server.
[*] only groups granted access to SQL Server are concerned
--
Best regards,
Marcin Guzowski
http://guzowski.info
Jan 16 '07 #5

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

Similar topics

24
by: Greg N. | last post by:
Sorry if this topic has been discussed before: Is there any statistical data available about what percentage of browsers run with JS disabled? Thanks for any and all insights, Greg
9
by: Lara | last post by:
Hello freaks, we have many problems with our online reorg and no idea how to resolve it. We had to do an online reorg beacause of 24 h online business. We start the reorg-statements (table by...
1
by: narayana | last post by:
how to know about how many tables i created in that database.if the database is connected to many users. i want the query in this way that i want creater,number of tables,time,updates . the...
3
by: Shane Suebsahakarn | last post by:
I have a rather odd problem that I'm at a loss to explain. The mdb is in A2K2 format, and has many tables linked to around 3-4 different back end mdbs. It is running on a Win2K3 server (set up as...
5
by: Steph | last post by:
Hi, I would like to be able to know who is actually connected on the website i am creating. The users are stored in a sql server table (to enter, they have to be identified on the login.aspx...
13
by: the other john | last post by:
The trouble currently with 3 tables. I'm excluding non-relevant fields... tbl_users PK_user_ID tbl_developers PK_developer_ID FK_developer_user_ID FK_developer_project_ID
136
by: 1001 Webs | last post by:
Every respected Web-authoring Guru says that. This is the era of table-less design, CSS code, XHTML compliant websites. Separate layout from content. There's no reason to use tables any more....
1
by: princemasud | last post by:
Hi, I want to know how many times a object of a database was used by the various users,its something like "hit counter".I am using MSSQL 2000. I just want to find the number of users ,who used that...
1
by: redcodeheaven | last post by:
Hi everybody,I would like to know what the commands given to the terminal that will let you know how many users are allready in your system account,I am using Ubuntu,thanks for anybody help.
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.