Monitoring the Dataset module you keep track of Database Connections to ensure your data is accessed and updated correctly.
On this page:
When monitoring the Dataset module, you will be monitoring the bahavior of connected DBs. The execute the monitoring, you will use 3 methods to ensure the Database is connected you have data access:
Is Started: Check if your Database is running.
Query Execution Time: Evaluates the Queries reponse time.
Connection String: Verifies if the Dabase is connected.
Each one of these methods are describe in more detail next.
This property indicates if the Dataset is initialized and connected to the database. You can use it to check if the dataset is currently running. The code block below shows an example of how to execute this method using Scripts.
bool isStarted = @Dataset.DB.YourDatabaseName.IsStarted; |
Note that the returning value is a boolean. If the received value is true
,
You can measure the execution time of a query by checking the time before and after executing the query. See the example code below:
DateTime startTime = DateTime.Now; @Dataset.Query.YourQueryName.SelectCommand(); DateTime endTime = DateTime.Now; TimeSpan executionTime = endTime - startTime; |
You can check the connection string used for the database to ensure it is configured correctly. See the example code below:
string connectionString = @Dataset.DB.YourDatabaseName.ConnectionString; |
Please note that these are just examples, and you will need to replace |