MSSQL Query Issue
Posted: Fri Sep 07, 2012 1:07 am
Hi,
I have set up an MSSQL query against one of our databases, it seems to connect to the DB OK but I get the following error:
"CRITICAL: Could not execute the query."
I've tried to search around this forum for this same error but I haven't located anything specifically the same, the details of my query are:
-H XXX.XXX.XXX.XXX --port 1433 --username XXX --password "XXX" --database XXXXX --query 'SELECT COUNT(*) from XXXXX..bax_taskq (NOLOCK) where status in ('u','p')' --result '0' --warning 2 --critical 5
From the command line I input the following in many different connotations but I always get the same message:
./check_mssql -H XXX.XXX.XXX.XXX -p 1433 -u XXX -P "XXX" -D XXXXX 'SELECT COUNT(*) from XXXXX..bax_taskq' -w 1 -c 5
OK: Connect time=0.095323 seconds.
Is there anything that I am doing wrong maybe? Any advice would be great!
Many thanks
I have set up an MSSQL query against one of our databases, it seems to connect to the DB OK but I get the following error:
"CRITICAL: Could not execute the query."
I've tried to search around this forum for this same error but I haven't located anything specifically the same, the details of my query are:
-H XXX.XXX.XXX.XXX --port 1433 --username XXX --password "XXX" --database XXXXX --query 'SELECT COUNT(*) from XXXXX..bax_taskq (NOLOCK) where status in ('u','p')' --result '0' --warning 2 --critical 5
From the command line I input the following in many different connotations but I always get the same message:
./check_mssql -H XXX.XXX.XXX.XXX -p 1433 -u XXX -P "XXX" -D XXXXX 'SELECT COUNT(*) from XXXXX..bax_taskq' -w 1 -c 5
OK: Connect time=0.095323 seconds.
Is there anything that I am doing wrong maybe? Any advice would be great!
Many thanks