lausser/check_mssql_health — pull request #3 by julthomas (2013-06-25 21:45:28+00:00)
Title: Fix mode backup-age on SQL Server 2000

SQL query used in mode backup-age does not work in SQL Server 2000
(version 8.0). On this version, column recovery_model does not exist
in table master.dbo.sysdatabases.

Mon Jun 24 14:21:01 2013: bumm DBD::Sybase::st execute failed: \
Server message number=207 severity=16 state=3 line=2 \
server=mssql-2b text=Invalid column name 'recovery_model'. \
at /tmp/check_mssql_health line 3158.

CRITICAL - unable to aquire database info

This patch is based on the following post:
http://www.sqlservercentral.com/Forums/Topic1182788-5-1.aspx#bm1182799

> In SQL 2000, the recovery model is not displayed in the system
> catalogue like it is in 2005. However, thanks to the magic of
> functions you can retrieve it by using the following script.
>
> select name, databasepropertyex(name, 'Recovery') as RecoveryModel
> from master.dbo.sysdatabases
> order by name