Submit a ticketCall us

Don’t fall victim to a ransomware attack
Backups are helpful, but sometimes that’s not enough to protect your business against ransomware. At our live webcast we will discuss how to protect against ransomware attacks with SolarWinds® Patch Manager and how to leverage log data to detect ransomware. Register now for our live webcast.

Home > Success Center > Database Performance Analyzer (DPA) > Missing statistics for SQL statements when DPA is monitoring a MySQL database instance

Missing statistics for SQL statements when DPA is monitoring a MySQL database instance

Created by Melanie Boyd, last modified by MindTouch on Jun 23, 2016

Views: 62 Votes: 0 Revisions: 4

Overview

If DPA is monitoring a MySQL database instance and you don't see statistics for SQL statements, use the following information to resolve the issue.

Environment

  • DPA 10.0 and later
  • MySQL

Cause 

There are some common reasons for why SQL data can be missing:

  • The MySQL performance schema is disabled.
  • MySQL does not provide statistics for SQL run in a stored procedure.
  • MySQL does not provide statistics for SQL run from a prepared statement.
  • SQL has been executed in batches.

If none of these reasons apply, SolarWinds DPA might not be getting a sufficient quantity of statement history from your MySQL instance to collate SQL statistics. We can extend the amount of statement history available by enabling a MySQL option from within SolarWinds DPA.

Resolution

Verify that the MySQL performance schema is enabled, and that the SQL is not run in a stored procedure, a prepared statement, or batches.

If none of those reasons apply, extend the amount of statement history available, by enabling the MySQL events_statements_history_long table. You can enable this table for all monitored database instances or for just a single database instance.

Enabling events_statements_history_long for all instances

  1. Log on to the SolarWinds DPA web console as an administrator.
  2. Go to the page Options > Administration > Advanced Options > System Options.
  3. Click MYSQL_ENABLE_HISTORY_LONG.
  4. From the New Value list, select Enable.
  5. Click Update.

Enabling events_statements_history_long for a single instance

  1. Log on to the SolarWinds DPA web console as an administrator.
  2. Go to the page Options > Administration > Advanced Options > DB Instance Options.
  3. Select a database instance from the list.
  4. Click MYSQL_ENABLE_HISTORY_LONG.
  5. From the New Value list, select Enable.
  6. Click Update.

 

 

Last modified
19:16, 22 Jun 2016

Tags

Classifications

Public