+ Reply to Thread
Results 1 to 5 of 5

Database last accessed

  1. 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.

  2. Re: Database last accessed

    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" 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.




  3. Re: Database last accessed

    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" 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.




  4. Re: Database last accessed

    > 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;



  5. Re: Database last accessed

    Hi
    In this case you may try to run SQL Server Profiler , so you can order by
    database , see BOL for details





    "spinkid" 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.




+ Reply to Thread