Running a statistics monitor profile
When a statistics monitor profile is run, Db2® Automation Expert calls the ADMIN_UTL_MONITOR stored procedure using the parameters and criteria specified in the profile.
About this task
- On demand (immediately)
- Schedule the run via the Db2 administrative task scheduler
Procedure
- To run the statistics monitor profile immediately, enter X in the line command area next to the profile and press Enter. The Executing Statistics Monitor window displays while the profile is running.When the profile finishes running, the results are displayed in a panel, and the information is stored in the Db2 catalog table SYSIBM.SYSAUTORUNS_HIST. The following figure shows the Maintwindow Execution Output panel:
Figure 1. Maintwindow Execution Output panel AUTOXPRT V1R1 ------ Maintwindow Execution Output ------ 2023/10/21 21:25:30 Option ===> Scroll ===> CSR Db2 Subsystem: SS1A Row 13 of 238 -+ ------------------------------------------------------------------------------- Stored Procedure Output 2023-08-18 12:07:57.563784> Executing SYSPROC.ADMIN_UTL_MONITOR 2023-08-18 12:07:57.563795> with options: RESTRICT-TS="DBNAME LIKE 'DLCDB%' AND INSTANCE = 1",STAND-ALONE=NO,STATISTICS-SCOPE=PROF ILE-CONSISTENCY,SAMPLING-THRESHOLD=500000,NUM-CHANG ES=0,NUM-MASS-DELETES=0,PCT-CHANGES=20,COLGROUP-CAR D-GREATER-THAN-SUPERSET-COLGROUP-CARD=0.1,DIFFERENT -COLGROUP-CARD-FROM-COLDIST-AND-INDEX=0.1,DIFFERENT -COLGROUP-CARD-FROM-INDEXES=0.1,DIFFERENT-SINGLE-CO L-COLGROUP-CARD-FROM-COLDIST-AND-INDEX=0.1,DIFFEREN T-SINGLE-COL-COLGROUP-CARD-FROM-INDEXES=0.1,DRF-GRE ATER-THAN-TABCARD=0.1,DRF-LESS-THAN-NPAGES=0.1,FREQ UENCY-OUT-OF-RANGE=0.1,INDEX-FULLKEYCARD-LESS-THAN- ANY-KEY-CARD=0.1,INDEX-FULLKEYCARD-LESS-THAN-FIRSTK EYCARD=0,MAXIMUM-FREQUENCY-LESS-THAN-RECIPROCAL-OF- COLGROUP-CARD=0.1,NUMBER-OF-FREQUENCY-RECORDS-GREAT ER-THAN-COLGROUP-CARD=0.1,PRODUCT-OF-COLCARD-LESS-T HAN-COLGROUP-CARD=0,QUANTILE-CARD-GREATER-THAN-COLC ARD=0.1,QUANTILE-CARD-GREATER-THAN-COLGROUP-CARD=0. 1,QUANTILE-FREQUENCY-OUT-OF-RANGE=0,SINGLE-COL-INDE X-FULLKEYCARD-NOT-EQUAL-FIRSTKEYCARD=0.1,SUM-OF-FRE QUENCY-GREATER-THAN-ONE=0.1,SUM-OF-HISTOGRAM-FREQUE NCY-GREATER-THAN-ONE=0,SUM-OF-HISTOGRAM-GREATER-THA N-COLCARD=0.1,SUM-OF-HISTOGRAM-GREATER-THAN-COLGROU P-CARD=0.1,TABCARD-LESS-THAN-COLCARD=0.1,TABCARD-LE - To schedule the execution via the Db2 Automation Expert interface to the Db2 administrative task scheduler, enter S in the line command area next to the statistics monitor profile and press Enter.
The Schedule Db2 Admin Task panel is displayed, as shown in the following figure:
Figure 2. Schedule Db2 Admin Task panel AUTOXPRT V1R1 -------- Schedule Db2 Admin Task -------- 2023/10/21 21:30:07 Option ===> Scroll ===> CSR ------------------------------------------------------------------------------- Commands: CANCEL - Exit without saving changes. ------------------------------------------------------------------------------- Db2 Subsystem: SS1A Task Name . . . . AUTOXPRT STATMONITOR: TEST > Task Description > More: + Begin Timestamp . . &CURRENT (Db2 Timestamp) End Timestamp . . . &CURRENT + 5 MINUTES (Db2 Timestamp) Max Invocations . . 1 (Integer, Blank) SSID . . . . . . . . SS1A (Blank for any datasharing member) Invocation Options: Interval (minutes) (Integer, Blank) -Or- Trigger: Task Name . . . > Cond . . . . . (GT,GE,EQ,LT,LE,NE) Code . . . . . (Integer, Blank) -Or-
Complete the fields as required. For information about the fields, press PF1 for help.
When you are finished, press Enter, then PF3. A message displays that confirms that the task has been scheduled.
What to do next
- You can view a statistics monitor profile's execution history by using the H line command on the Statistics Monitor Profiles panel.
- You can also view scheduled executions of a statistics monitor profile using option 11 from the Db2 Automation Expert main menu.