October 7, 2009 at 1:03 am
what is the query to find the no of users ina database?
October 7, 2009 at 1:35 am
October 7, 2009 at 5:43 am
Vishal Singh (10/7/2009)
SELECT count(1) FROM sysusersUse only as applicable.
that isnt right, that count includes database roles as well. if you want to include public, dbo, guest and INFORMATION_SCHEMA as well.
you can say
select count(1) from sysusers where uid < 16384
or to do it in the old fashioned way
sp_helpuser
will give you the users in the current database.
--------------------------------------------------------------------------------------
[highlight]Recommended Articles on How to help us help you and[/highlight]
[highlight]solve commonly asked questions[/highlight]
Forum Etiquette: How to post data/code on a forum to get the best help by Jeff Moden[/url]
Managing Transaction Logs by Gail Shaw[/url]
How to post Performance problems by Gail Shaw[/url]
Help, my database is corrupt. Now what? by Gail Shaw[/url]
October 7, 2009 at 5:53 am
October 7, 2009 at 8:25 am
Are you talking about no of user currently connected on the server?
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply