With the
Database Sensor it is possible to connect to a ADO database to frequently perform queries on a table or to execute a stored procedure.
A note on the ConnectionString, for OleDb Providers, it is best to use the Dialog that's shown if you click on the ".." button. The sensor is also capable
of performing an ADO.Net connection. For this, prepend the name of the Dll-File of the Net/Connector and the datatype to the regular connection string:
MySql.Data.dll;MySql.Data.MySqlClient.MySqlConnection;Server=SERVER;Database=DB;Uid=USER;Pwd=PASSWORD;
Above, the MySql Connector is used. The Library "MySql.Data.dll" needs to be placed into the "bin" folder of ServerSentinel, the Datatype in that case is "MySql.Data.MySqlClient.MySqlConnection", after that the connection string is appended (see e.g. connectionstrings.com).
Since version 1.3 of ServerSentinel, connection strings to ODBC-Drivers are also supported, this feature has been tested to work with Microsoft Access Databases. Here is a possible connection string:
Provider=MSDASQL; Driver={Microsoft Access Driver (*.mdb)}; DBQ=C:\path\filename.mdb;
For further details, see below.
Side Panel |
Sensor Tasks
Basic Settings
Further Information
Database
|
Main Panel |
Setting |
uses value |
Records affected |
Integer |
Rows selected |
Integer |
Result |
String |
Check Time |
Date |
Response Time (ms) |
Integer |
Status Flag |
Enum |
Notes on the ODBC Connection Drivers
| • | To access excel files: |
Provider=MSDASQL; Driver={Microsoft Excel Driver (*.xls)}; DBQ=C:\path\filename.xls;
| • | Files containing comma separated values: |
Provider=MSDASQL; Driver={Microsoft Text Driver (*.txt; *.csv)}; DBQ=C:\path\;
There is a bug in older versions of the OLE DB Provider for ODBC. This would fail:
Provider=MSDASQL; Driver={Microsoft Access Driver (*.mdb)}; DBQ=C:\path\filename.mdb;
without the space before 'Driver=' this works:
Provider=MSDASQL;Driver={Microsoft Access Driver (*.mdb)}; DBQ=C:\path\filename.mdb;

