Today, I got a task about checking data in MSSQL and send alert email if there is something wrong with it. Of course you can do it with nagios plugin but i just don't want to implement with nagios. No why :) This what i did to finish this little task. ------------------------------------------------------------------------------------------------------------------------- A Batch script: ------------------------------------------------------------------------------------------------------------------------- @echo off @setlocal enableextensions enabledelayedexpansion del result.txt cd C:\Program Files\Microsoft SQL Server\100\Tools\Binn SQLCMD.EXE -U username -P password -S ipaddress -i D:\Scripts\check_match_active.sql -o result.txt findstr /m "1 rows affected" result.txt if %errorlevel%==0 ( cscript "sendemail_ok.vbs" ) else ( cscript "sendemail_fail.vbs" ) ----------------------------------------------------------------------------...