Use the Debian freetds-dev and sqsh packages to connect to MS SQL targets and execute the desired query. (Note:In addition to installing the freetds-dev and sqsh packages, you must place the included mssql.sh script in the InterMapper Settings/Tools directory on the Debian machine running InterMapper. The cli script will also search the result for the desired return value and return either 0 for a match and 1 for no match. You must add a DSN into /etc/freetds/freetds.conf for every server that will be probed.)
This command-line probe uses a Visual Basic script to test a Windows Fileshare. In addition, it provides a nice example of calling a Visual Basic script from a command line probe.
This command-line probe monitors an Oracle database. It uses the TNSPing utility that is part of the Oracle distribution to query an Oracle instance for the availability of a particular database. It also offers a good example of how to create a Command-line probe.