Hi Guys,
Does anyone perhaps have any idea how I can check when the database was last accessed?
I have this script but it only brings back whats currently connected to the database and not when was the last time all the databases where accessed:
select @@servername as ServerName, sd.name as DatabaseName,
sp.loginame as LoginName, sp.hostname as HostName,
sp.login_time as LoginTime, sp.last_batch as LastBatch,
getdate() as RunDate
from master..sysprocesses sp, master..sysdatabases sd
where sp.dbid = sd.dbid
GO
Can anyone please assist?
Regards
IC