?
Solved

Concurrent connected user in SharePoint Site and Database

Posted on 2011-02-17
4
Medium Priority
?
593 Views
Last Modified: 2012-05-11
Hi, I have 150+ Site Collection in SharePoint and each site collections having their own databases.
My query Is, How to find out total number and name of concurrent connected users in each SharePoint site collection?
I want both the ways means via SharePoint Site collection and via each database.
Is there any query to run on database or any code need to write for sites?
I am using SharePoint 2007 and SQL Server 2005.
Is it possible to get total number of users connected on SQL Server?
Kindly help.
0
Comment
Question by:Minesh Shah
[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
4 Comments
 
LVL 1

Expert Comment

by:lkammer
ID: 34925001
Hi,

You can select a count of the number of connected users to each database within an instance of SQL Server using something like this.

select count(distinct loginame), DB_NAME(dbid) from master..sysprocesses
Group by DB_NAME(dbid)
Having db_name(dbid) not in ('master', 'msdb')
order by db_name(dbid)

Open in new window


To obtain a list of usernames and the database(s) they are connected to

select loginame, DB_NAME(dbid) from master..sysprocesses
Group by loginame, DB_NAME(dbid)
Having db_name(dbid) not in ('master', 'msdb')
order by db_name(dbid)

Open in new window


Hope this helps.

Cheers

Leon
0
 
LVL 10

Author Comment

by:Minesh Shah
ID: 34931654
Sorry, what I want in result above queries are not giving those results.
I think it’s showing the Id by which the SQL Server is authenticated, means admin id.
I want user’s id’s that are login currently in sites.
Kindly help
0
 
LVL 1

Accepted Solution

by:
lkammer earned 1500 total points
ID: 34942853
Hi,
Sorry for not getting back sooner.

You are correct, this will display logins authenticated against the SQL Server instance and database.

You will need to use a DelegateControl to log users' activity on the sharepoint site.

You could try this
http://blog.furuknap.net/find-number-of-users-currently-logged-on-to-a-sharepoint-site

it explains how to create a solution to determine this.
I have not tried this with 2007.

Cheers

Leon

0
 
LVL 10

Author Closing Comment

by:Minesh Shah
ID: 35035283
ok
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

764 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