The STRDBMON command starts the collection of database performance statistics for a specific job or all jobs on the system. The statistics are placed in an output database table and member specified on the command. If the output table and/or member does not exist, one is created based upon the table and format definition of model table QSYS/QAQQDBMN. If the output table and/or member exist, the row format of the output table must be named QQQDBMN.
You can specify a replace/append option that allows you to clear the member of information before writing rows or to just append new information to the end of the existing table.
You can also specify a force row write option that allows you to control how many rows are kept in the row buffer of each job being monitored before forcing the rows to be written to the output table. By specifying a force row write value of 1, FRCRCD(1), monitor rows will appear in the log as soon as they are created. FRCRCD(1) also ensures that the physical sequence of the rows are most likely, but not guaranteed, to be in time sequence. However, FRCRCD(1) will cause the most negative performance impact on the jobs being monitored. By specifying a larger number for the FRCRCD parameter, the performance impact of monitoring can be lessened.
Specifying *DETAIL on the TYPE parameter of the STRDBMON command indicates that detail rows, as well as summary rows, are to be collected. This is only useful for non-SQL queries, those queries which do not generate a QQQ1000 row. For non-SQL queries the only way to determine the number of rows returned and the total time to return those rows is to collect detail rows. Currently the only detail row is QQQ3019, in Appendix A, Database monitor: DDS. While the detail row contains valuable information, it creates a slight performance degradation for each block of rows returned. Therefore its use should be closely monitored.
If the monitor is started on all jobs, any jobs waiting on job queues or any jobs started during the monitoring period will have statistics gathered from them once they begin. If the monitor is started on a specific job, that job must be active in the system when the command is issued. Each job in the system can be monitored concurrently by only two monitors:
When a job is monitored by two monitors and each monitor is logging to a different output table, monitor rows will be written to both logs for this job. If both monitors have selected the same output table then the monitor rows are not duplicated in the output table.