Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SQL 2000 Database Availabily Expand / Collapse
Author
Message
Posted Thursday, January 9, 2014 2:38 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, July 31, 2014 9:28 AM
Points: 68, Visits: 318
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!
Post #1529253
Posted Thursday, January 9, 2014 2:43 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 8:05 AM
Points: 42,829, Visits: 35,959
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 2008, MVP
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

Post #1529254
Posted Thursday, January 9, 2014 4:42 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, July 31, 2014 9:28 AM
Points: 68, Visits: 318
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.
Post #1529286
Posted Thursday, January 9, 2014 5:51 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 8:05 AM
Points: 42,829, Visits: 35,959
SELECT DATABASEPROPERTYEX .... FROM sysdatabases


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
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

Post #1529297
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse