It is important for configuration to differentiate between the database monitoring on the DBMS instance level, overarching a whole AppMon installation described here, and statements and bind values monitoring on the System Profile/app level, provided by the JDBC, ADO.NET, and PHP DB sensors of the Java, .NET and PHP Agents respectively. Apart from SQL statements and bind values, hose sensors also capture their count and timing
In case of issues, see Database Agent Troubleshooting.
You can create Database Agent in two ways:
- The Database Agent Configuration dialog box, while working in the Application Environment Configuration wizard.
- In the AppMon Client, click the gear icon in the top right corner of the Monitoring dashboard, and select Configure Environment to access the wizard.
- Select your application type, and click Configure in the Databases section of the step 2.
- The Create Database Agent dialog box. To access it select Settings > Dynatrace Server > Databases and then click Create.
Select the type of the database, Collector for the Agent to connect to, and specify the Agent name in the appropriate fields. You won't be able to change those afterwards. Then configure the rest of the parameters. When specifying database user for the Agent, make sure to grant necessary permissions for it.
Automatic cluster discovery
You can use automatic cluster discovery to configure Oracle Databases with Real Application Clusters (Oracle RAC). To do this, select Oracle Database with Real Application Clusters (RAC) in the Database type field of the Create Database Agent or Database Agent Configuration dialog box and fill other data for any of your RAC node. After testing connection, confirm any discovered nodes.
For any issues with cluster automatic discovery, you can discover all cluster nodes one by one, as they are correlated with each other automatically. After adding AppMon Agents for cluster, they are visible as separate agents in all configuration screens and can be edited manually.
Oracle RAC 12c leaf nodes
With Oracle Database with Real Application Clusters (RAC) 12c, new type of base platform was introduced: Oracle Flex Clusters. It contains two types of nodes: Hub Nodes and Leaf Nodes. AppMon is able to monitor only nodes, where actual database instance is running — and it can run only on Hub nodes. Because of that, monitoring Leaf nodes with Database Agent is not possible. However, Host Agent can be installed on machine, in order to collect data like memory & CPU usage and more.
Edit Database Agent
You can edit Database Agent properties in the Client by selecting Settings > Dynatrace Server > Databases and clicking Edit. Note that Database type, Agent name, and Collector properties are not editable.
When specifying database user for the Agent, make sure to grant necessary permissions for it.
Grant necessary permissions for DB monitoring
The user that connects to the DB instance needs to be granted the following permissions:
|Database Platform||Permissions needed|
|MS SQL Server||Database login needs the following permissions:
Refer to the release notes for more details about supported versions.
SQL Server 2012 & 2014
CREATE LOGIN <dtagent> WITH PASSWORD = 'password'; GRANT CONNECT SQL TO <dtagent>; GRANT VIEW SERVER STATE TO <dtagent>; GRANT VIEW ANY DATABASE TO <dtagent>; USE master; CREATE USER <dtagent> FOR LOGIN <dtagent>; GRANT CONNECT TO <dtagent>; GRANT VIEW DATABASE STATE TO <dtagent>; -- for each monitored database USE <monitored_database>; CREATE USER <dtagent> FOR LOGIN <dtagent>; GRANT CONNECT TO <dtagent>; GRANT VIEW DATABASE STATE TO <dtagent>; GRANT VIEW DEFINITION TO <dtagent>;
Oracle Database 11g/12c
CREATE USER dtagent IDENTIFIED BY password default tablespace users temporary tablespace temp; GRANT CREATE SESSION, SELECT_CATALOG_ROLE TO <dtagent>;
DBMS_LOB package with granted EXECUTE permission is required to fetch queries' explain plans.
Dynamic Performance Views need to be granted for Oracle monitoring.
CREATE USER 'dtagent'@'%' IDENTIFIED BY 'password'; GRANT SELECT, EXECUTE, PROCESS, SHOW DATABASES on *.* to 'dtagent'@'%';
MySQL User created for the database agent must use default password encryption (
mysql_native authentication plugin). Other password encryption methods, like SHA256 (
sha256_password authentication plugin) are not supported.
To view SQL Execution plans when using MySQL Database Agent, the user must also have the SELECT privilege on the schema containing tables specified in the query
To use the database agent with MySQL releases prior to 5.7.7, the
sys schema (documentation) must be installed, see sys schema project page for installation instructions. Additionally, Performance Schema (documentation) must be enabled.