<< Click to Display Table of Contents >> Navigation: Monitoring Tools > checkdb |
CheckDB verifies a database connection through ODBC to ensure that a connection to a database can be established. You can optionally also run a single SQL statement after a successful connection has been established. A connection can be specified either through a DSN (Data Source Name) or a connection string. The output from CheckDB can either be displayed in the command line or logged to the event log.
CheckDB can verify that:
•a database server is available
•the database specified in the DSN / connection string is online
•the specified user has permission to log into the database server and database
•the optionally specified SQL statement executed successfully
As with all ODBC-based utilities, you will need to ensure that the necessary ODBC drivers are installed on the machine from which you run this utility. Non-Windows platforms also need the respective ODBC framework (see "Prerequisites" below) installed. |
Return Code (%ERRORLEVEL%)
CheckDB returns 0 when no errors have been encountered, and returns 1 if an error (e.g. database is unavailable, SQL query cannot execute) was encountered. Use event logging (/le) for detailed troubleshooting information.
Interface
Command-line
Files
checkdb(.exe)
Prerequisites
OS X: iODBC
Linux / FreeBSD: unixODBC
Supported Platforms
Windows (64-bit version available)
Linux
FreeBSD
OS X