Navigation: Command Line Applications > CheckDB > Usage |
Command Line Parameters
checkdb <DSN|ConnectionString> /u <USER> /p <PASS> /q <SQLQUERY> /lc /le
Examples
Example 1: Check whether the database defined in DSN EventSentry is available and log output to the console checkdb EventSentry /u eventsentry_web /p !$^&3jdk3 /lc
Example 2: Check whether the database defined in the connection string is available and log output to the event log checkdb "driver={SQL Server};server=mssqlserver;Network=DBMSSOCN;database=EventSentry;uid=eventsentry_svc;pwd=1234" /le
Example 3: Check whether the database defined in DSN EventSentry is available, verify that the table ESEventlogLog exists and log output to the console and event log checkdb EventSentry /u eventsentry_web /p !$^&3jdk3 /q "select top 1 * from ESEventlogLog" /lc /le
Sample Output
C:\>checkdb SQLSERVER /u eventsentry_web /p password /q "select top 1 * from ESEventlogLog" /lc /le --------------------------------------------------------------- CheckDB v1.0 by NETIKUS.NET ltd [ compiled on May 8 2008 ] (support@netikus.net) --------------------------------------------------------------- Verify a database connection through ODBC, optionally execute SQL statement.
Connect : OK DB Type : Microsoft SQL Server Time : 1 second(s) SQL Query: select top 1 * from ESEventlogLog -> OK
Example event from the event log |