Using Database Query Analysis
KB1239 - Aug 02, 2018
Type: Best Practice
Description: This article explains how to use the database query analysis effectively.
Additional Keywords: Database Query
Introduction
Monitoring Studio provides a flexible feature to query data from any database. In this article, you will learn how to query a database using its name or its service name. The example is based on an Oracle database.
Procedure
Configuring Using the Database Name
To query an Oracle database using its name:
- Right-click the monitored host and click KM Commands > New > Monitor
-
Select the Database Query: Oracle Data Server Monitor
-
Provide the Database name and Port number and click Next
-
Provide the Credentials to connect to the database, the SQL query to be executed and click Next
-
Configure the Monitor Settings and click Next
Configuring Using the Service Name
To query an Oracle database using the service name:
- Right-click the monitored host and click KM Commands > New > Monitor
-
Select the Database Query: Other (JDBC) Monitor
-
Enter the URL to use for connecting to the JDBC database. The format to use is:
jdbc:oracle:thin@<hostname>:<port>/<ServiceName>
You can use application constants to replace for the
<hostname>
if you are planning to save your configuration as a template.You can refer to this [article](https://stackoverflow.com/questions/22399766/how-to-find-oracle-service-name) to know how to find the Oracle service name. -
Provide the Credentials to connect to the database, the SQL query to be executed and click Next
-
Configure the Monitor Settings and click Next