Check Usage | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Check Usage

There is anyway to run a query or sp_ that will tell me if somebody is using the database?
or
when was the last time it was used? thanks
sp_who — will tell you all the process that connected to the server. sp_who2 active will tell you active processes.
SQL doesn’t store information about when was the last time the database is used, in addition to above recommendation you need to deploy third party tools to audit such activities. If not the above would give you current access information. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
You can use the QA to apply to check the status of current activities. Check this Query to get the details of process sorted with highly CPU utilization with databases select sp.hostname,sp.cpu,sd.name,sp.waitresource,sp.physical_io, sp.memusage,
sp.login_time,sp.status,sp.hostprocess,sp.cmd,sp.loginame
from master..sysprocesses sp, master..sysdatabases sd
where sp.dbid=sd.dbid
order by sp.cpu desc Will this help you out? -Johnson
quote:Originally posted by indshri sp_who — will tell you all the process that connected to the server. sp_who2 active will tell you active processes.
Not entirely correct. EXEC dbo.sp_who returns all open connections.
EXEC dbo.sp_who2 returns all open connections, but with additional details. EXEC dbo.sp_who ‘Active’ returns only active connections.
EXEC dbo.sp_who2 ‘Active’ returns only active connections, but with additional details.

]]>