Home > Archive > MS SQL Server > October 2006 > Check last access/update date on each database









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Check last access/update date on each database
Carlos Felipe França da Fonseca

2006-10-24, 6:29 pm

I need to check the date of the last update on each database on some
servers.
If the last update is many months ago, I'll need at least stop SQL Services.
How is the best was to do it?

Thanks folks!!!

Carlos Felipe França da Fonseca


Hari Prasad

2006-10-24, 6:29 pm

Hi,

SQL Server will not keep track of these info by itself. Only way is to
verify the modifiedon column in your table. If you do not have modified on
column
then you may need to setup a profiler trace and based on the log you need to
go further.

Thanks
Hari
SQL Server MVP

"Carlos Felipe França da Fonseca" <carlos@felipe.com.br> wrote in message
news:%23B0kfB52GHA.2196@TK2MSFTNGP06.phx.gbl...
>I need to check the date of the last update on each database on some
>servers.
> If the last update is many months ago, I'll need at least stop SQL
> Services.
> How is the best was to do it?
>
> Thanks folks!!!
>
> Carlos Felipe França da Fonseca
>



masri999@gmail.com

2006-10-24, 6:29 pm

Hello,

Alternative way is look into sysprocesses table in each server .
For SPID > 50 look for last_batch . Check the date and time .
Note this will provide database accessed time and not updated time .
You have to look into all user databases for last_batch before
stopping the service .

M A Srinivas


Carlos Felipe Fran=E7a da Fonseca wrote:
> I need to check the date of the last update on each database on some
> servers.
> If the last update is many months ago, I'll need at least stop SQL Servic=

es.
> How is the best was to do it?
>=20
> Thanks folks!!!
>=20
> Carlos Felipe Fran=E7a da Fonseca


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com