December 6, 2010 at 5:35 am
Hi Friends,
1. How do i find how many users are using my database?
2. It is possible how many users are loping through application or using the application?
Thanks & Regards
Satish Saidapur
December 6, 2010 at 5:54 am
Satish,
You should be able to get the requisite information using this query.
SELECT * FROM sys.dm_exec_requests where DB_NAME(database_id)='YourDBName'
Pradeep Adiga
Blog: sqldbadiaries.com
Twitter: @pradeepadiga
December 6, 2010 at 5:59 am
Hi Pradeep,
That query will work for internal user's or application user's
December 6, 2010 at 6:10 am
That query will list *all* sessions open on a given database. Just tweaked the query. In the output you can filter out the "internal" and "external" sessions based on the "program_name" column.
SELECT a.* FROM sys.dm_exec_sessions a
left outer join sys.dm_exec_requests b
on a.session_id=b.session_id
where DB_NAME(b.database_id)='YourDBName'
Pradeep Adiga
Blog: sqldbadiaries.com
Twitter: @pradeepadiga
December 6, 2010 at 7:09 am
Hi Pradeep,
It is possible through GUI for see the user........
Thanks & regards
Satish
December 6, 2010 at 7:12 am
Satish,
You can get that information using Activity Monitor
Pradeep Adiga
Blog: sqldbadiaries.com
Twitter: @pradeepadiga
December 6, 2010 at 7:54 am
Thank you Pradeep....
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply