Database Sensor

<< Click to Display Table of Contents >>

Navigation:  Sensors > Misc Sensors >

Database Sensor

With the Database Sensor it is possible to connect to a database to frequently perform queries on a table or to execute a stored procedure.

Note about OleDB

For OleDB provider it is best to use the dialog which is reachable over the button next to the connection string.

Note about ODBC

The connection strings for ODBC connections can be for example:

To access a Microsoft Access database:

 Provider=MSDASQL; Driver={Microsoft Access Driver (*.mdb)}; DBQ=C:\pfad\dateiname.mdb;

To access a Microsoft Excel table:

 Provider=MSDASQL; Driver={Microsoft Excel Driver (*.xls)}; DBQ=C:\pfad\dateiname.xls;

Files with comma separated values (CSV):

 Provider=MSDASQL; Driver={Microsoft Text Driver (*.txt; *.csv)}; DBQ=C:\pfad\dateiname.csv;

There is a bug in older versions of the OleDB provider for ODBC. The following connection string would fail because of the whitespace before "Driver":

 Provider=MSDASQL; Driver={Microsoft Access Driver (*.mdb)}; DBQ=C:\path\filename.mdb;

Without the whitespace before "Driver" this works:

 Provider=MSDASQL;Driver={Microsoft Access Driver (*.mdb)}; DBQ=C:\path\filename.mdb;

Note aboud ADO.Net

To establish a connection using ADO.Net, it is necessary to prefix the connection string with the name of the DLL library and the concrete connection data type. The DLL library itself must be placed in the "bin" directory of ServerSentinel. A connection string MySQL could for example look like:



Sensor Tasks

Test Sensor

Tests the current sensor settings.

Get Help

Opens the ServerSentinel online help for the current sensor.

Basic Settings


The name of the sensor (max. 100 characters). Choose a meaningful name to clearly identify the sensor.

Sensor is Active

Toggles the sensor ON/OFF.

Check Interval

The interval or times at which which the sensor should perform its checks.


The sensor performs its checks every x time units, e.g. every 10 minutes.


The sensor performs its checks daily at one or more (max. 4) fixed times, e.g. daily at 0 and 12 o'clock.


The sensor performs its checks at certain days of the weeks at one or more (max. 4) fixed times, e.g. monday to friday at 12 o'clock.


The sensor performs its checks at certain days of the month at one or more (max. 4) fixed times, e.g. every 1st of the month at 12 o'clock.

Only check if this Sensor didn't fail

This sensor will only be checked, if the sensor in the drop down list didn't fail.

Further Information


Short additional information to the sensor (max. 255 characters).

Database Options

Connection String

Connection string for the database connection (max. 1024 characters).

Command Timeout (s)

The timespan in seconds after which a timeout should occur during the execution of the SQL statement.

SQL Statement

SQL statement which is executed on sensor check (max. 1024 characters).


Specifies the transaction locking behavior for the connection.


The pending changes from more highly isolated transactions cannot be overwritten.

Read Committed

Shared locks are held while the data is being read to avoid dirty reads, but the data can be changed before the end of the transaction, resulting in non-repeatable reads or phantom data.

Read Uncommitted

A dirty read is possible, meaning that no shared locks are issued and no exclusive locks are honored.

Repeatable Read

Locks are placed on all data that is used in a query, preventing other users from updating the data. Prevents non-repeatable reads but phantom rows are still possible.


A range lock is placed on the DataSet, preventing other users from updating or inserting rows into the dataset until the transaction is complete.


Reduces blocking by storing a version of data that one application can read while another is modifying the same data. Indicates that from one transaction you cannot see changes made in other transactions, even if you requery.


A different isolation level than the one specified is being used, but the level cannot be determined.

When using ODBC transaction, if you do not set Isolationlevel or you set Isolationlevel to Unspecified, the transaction executes according to the isolation level that is determined by the driver that is being used.


Meta Data Values

Data Value

Data Type




The time the dataset has been created.

Exception Message


The message of the error if any occurred.

Response Time


The response time needed to perform the check.



A status string that may contain arbitrary information that was collected by the sensor (max. 255 characters). Per default this value is empty.

Status Flag


The status of the sensor after the check has been performed.

Data Values

Data Value

Data Type


Records affected


Contains the number of records that were affected by the query.



The result set that is returned by the query.

Rows selected


Contains the number of rows that were selected by the query.

Apart from the above data values additionally each column of the result is displaced.