Solved

Concurrent connected user in SharePoint Site and Database

Posted on 2011-02-17
4
592 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 500 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

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!
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

691 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