Tuesday, February 14, 2012

Database last accessed

We have a Windows 2000 server with SQL 2000 on it and a ton of databases
(300+). Is there a way to find out which databases are still being used
(last time accessed) so I can archive some of them an only have the databases
that are actually being used.
No, SQL Server doesn't log all access to a database...
Aaron Bertrand
SQL Server MVP
http://www.sqlblog.com/
http://www.aspfaq.com/5006
"spinkid" <spinkid@.discussions.microsoft.com> wrote in message
news:C8A5C8AE-8671-41D7-A4B0-5FF6B3D1EBD3@.microsoft.com...
> We have a Windows 2000 server with SQL 2000 on it and a ton of databases
> (300+). Is there a way to find out which databases are still being used
> (last time accessed) so I can archive some of them an only have the
> databases
> that are actually being used.
|||Too bad you aren't on sql2005. You could possibly use
sys.dm_db_index_usage_stats, or login triggers for your needs.
TheSQLGuru
President
Indicium Resources, Inc.
"spinkid" <spinkid@.discussions.microsoft.com> wrote in message
news:C8A5C8AE-8671-41D7-A4B0-5FF6B3D1EBD3@.microsoft.com...
> We have a Windows 2000 server with SQL 2000 on it and a ton of databases
> (300+). Is there a way to find out which databases are still being used
> (last time accessed) so I can archive some of them an only have the
> databases
> that are actually being used.
|||> Too bad you aren't on sql2005. You could possibly use
> sys.dm_db_index_usage_stats, or login triggers for your needs.
For logon triggers, that won't capture things like logging into database A
(or the default database) and running SELECT foo FROM databaseB.dbo.table;
|||Hi
In this case you may try to run SQL Server Profiler , so you can order by
database , see BOL for details
"spinkid" <spinkid@.discussions.microsoft.com> wrote in message
news:C8A5C8AE-8671-41D7-A4B0-5FF6B3D1EBD3@.microsoft.com...
> We have a Windows 2000 server with SQL 2000 on it and a ton of databases
> (300+). Is there a way to find out which databases are still being used
> (last time accessed) so I can archive some of them an only have the
> databases
> that are actually being used.

No comments:

Post a Comment