SQL 2000 Database Availabily

  • Hi

    I want to extract out some pretty simple statistics about each database on my SQL 2000 Instance; Database availability (online, accessible) and the last time the status of the database changed.

    Is this at all possible in 2000? I'm struggling as I'm more used to 2008! 😀

  • Availability, yes, you'll need to decode the status and status2 columns in sysdatabases. Should be info in Books Online. As for when the status last changed, not unless you're tracking that information somehow.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • I found a quicker way to find out that status, I query DATABASEPROPERTYEX, this gives me what I need (simply whether the database is ONLINE/OFFLINE). Now just working out how to wrap in one SELECT, so I can quickly identify the status of each database on the instance.

  • SELECT DATABASEPROPERTYEX .... FROM sysdatabases

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply