You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Overview

Monitoring Database Connections is essential to maintaining a reliable and efficient system. By keeping track of Database Connections, you can ensure your data is accessed and updated correctly. This page will present the methods used to maintain an efficient platform.

On this page:


Monitoring Databases Connections

There are 3 used methods to ensure correct data access.

  • Is Started

  • Query Execution Time

  • Connection String

See each one of them in more detail in the sections below.

Is Started

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, see the example code below. 

Example
bool isStarted = @Dataset.DB.YourDatabaseName.IsStarted;

Query Execution Time

You can measure the execution time of a query by checking the time before and after executing the query. See the example code below.

Example
DateTime startTime = DateTime.Now; @Dataset.Query.YourQueryName.SelectCommand(); DateTime endTime = DateTime.Now; TimeSpan executionTime = endTime - startTime;

Connection String

You can check the connection string used for the database to ensure it is configured correctly. See the example code below.

Example
string connectionString = @Dataset.DB.YourDatabaseName.ConnectionString;

Please note that these are just examples, and you will need to replace YourDatabaseName and YourQueryName with the actual names of the database and query you are working on within the platform.


In this section...

The root page @parent could not be found in space v10.

  • No labels