When operating and maintaining Service Desk, you may encounter the AHD50060:Database check FAILED or sql_check_db -c Exit Code 99 errors. This document describes what this error is and potential root causes
Release: All releases of Service Desk running on SQL Server
The above error is a generic message which merely indicates that Service Desk is unable to access its database. You may find references to it in the configure.log, configure.out, stdlog, and checkdb logs, all located in the SDM install directory. Error usually arises while trying to run pdm_configure or starting up SDM Services.
Under working conditions, a manual execution of sql_check_db will result in a result such as:
C:\>sql_check_db -c
SUCCESS - pri table exists, and has 6 rows
DB_OK
Another variation
C:\>sql_check_db -t -s XXXX -n XXXX -o mdbadmin -d mdb -U mdbadmin -p XXXX
SUCCESS - Test connection was successful.
CONN_OK
Note: The second test assumes the default owner and DB userid to be "mdbadmin", and that the database is the default "mdb"
An execution that does not run successfully may result in a response such as:
C:\>sql_check_db -t -s XXXX -n XXXX -o mdbadmin -d mdb -U mdbadmin -p XXXX
ERROR: AHD50072:Unable to log in to SQL Server
Review of the install is needed to determine the specific cause of the connection problem.
Root causes can vary. The most likely overall cause is that an update which modifies the database connectivity was not tested in a non-prod instance before applying in production or was not communicated or coordinated appropriately. A very simple example would be the backend database user mdbadmin password was changed without updating Service Desk
Additional possible causes:
sql_check_db.exe is a binary supplied by Service Desk to confirm that SDM is able to connect to the backend database via the SQL API components. Using another product to compare connectivity, such as an ODBC connection or SQL Server Management Studio, is not a valid method to compare connections as these tools rely on different connection methods than sql_check_db and Service Desk, though these components are listed as requirements for SQL server installation.
This article also provides a tutorial on how to troubleshoot this error scenario.