Start of change

Database monitor examples

The iSeries™ navigator interface provides a powerful tool for gathering and analyzing performance monitor data using database monitor. However, you may want to do your own analysis of the database monitor files.

Suppose you have an application program with SQL statements and you want to analyze and performance tune these queries. The first step in analyzing the performance is collection of data. The following examples show how you might collect and analyze data using Start Database Monitor (STRDBMON) and End Database Monitor (ENDDBMON) commands. Performance data is collected in LIB/PERFDATA for an application running in your current job. The following sequence collects performance data and prepares to analyze it.

  1. STRDBMON FILE(LIB/PERFDATA) TYPE(*DETAIL). If this table does not already exist, the command will create one from the skeleton table in QSYS/QAQQDBMN.
  2. Run your application
  3. ENDDBMON
  4. Create views over LIB/PERFDATA using the SQL DDL. Creating the views is not mandatory. All of the information resides in the base table that was specified on the STRDBMON command. The views simply provide an easier way to view the data.

You are now ready to analyze the data. The following examples give you a few ideas on how to use this data. You should closely study the physical and logical view formats to understand all the data being collected so you can create queries that give the best information for your applications.

Related information
Start Database Monitor (STRDBMON) command
End Database Monitor (ENDDBMON) command
End of change