SQL error options and negative SQL code options


Apptune captures SQL errors by monitoring the codes that the executed SQL statements return. By default, the product treats negative SQL codes as SQL errors.

After you apply PTF BQU0737, you can also do the following:

  • Specify to include some or all positive SQL codes as SQL errors.
  • Use the SQL code to determine whether to perform any or all of the following:
    • Report details.
    • Issue operator messages.
    • Generate exceptions.

To view and modify the options, expand the SQL Error Options section on the filter panel (as shown in the following figure):

Click here if you applied PTF BQU0737.

SQL error options

                            VMFILTER - Test filter              
Command ===>                                    Scroll ===> PAGE
                                                                 
Filter: Off                                         More:      
-   Program  Plan     User ID  Corr ID      DB2  Application
  + *        *        *        *            *                    
  - *        PLANA    *        *            *                    
   
    Monitor SQL. . . .  Y (Y=Yes,N=No,S=Static only,D=Dynamic only)
      Skip for thread.  N  (Only applies if Monitor SQL is N)
    + Collection Options      (Y=Yes, N=No)                      
    + Collection Keys         (Y=Yes, N=No)                      
    + Resource-Saving Options (Y=Yes, N=No)                      
    + Thresholds for Exceptions and Efficient Statements
    - SQL Error Options                                                       
     Include + codes. . . I                 (Y=Yes, N=No, I=Incl, E=Excl)   
     Positive codes . > 123                (Incl/Excl List, e.g. +100,+101)
     Fetch +100 . . . . Y                  (Yes/No)                        
   Report detail. . . . -                  (Yes/No, -=Neg, I=Incl, E=Excl)
     Report codes . . >                    (Incl/Excl List, e.g. -204,-805)
     Report limit . . . 5                  (1-999, or 0 for unlimited)     
   WTO reported errors. I                  (Yes/No, -=Neg, I=Incl, E=Excl)
     WTO codes. . . . > -104               (Incl/Excl List, e.g. -204,-805)
   Generate exceptions. E                  (Yes/No, -=Neg, I=Incl, E=Excl)
     Exception codes. > -204,-805,-904     (Incl/Excl list, e.g. -204,-805)


 Show hostvars on exceptions and SQL errors     Y (Y=Yes, N=No)
Click here if you have not applied PTF BQU0737.

Negative SQL code options

                            VMFILTER - Test filter                
Command ===>                                    Scroll ===> PAGE
                                                                 
Filter: Off                                         More:      
-   Program  Plan     User ID  Corr ID      DB2  Application
  + *        *        *        *            *                    
  - *        PLANA    *        *            *                    
   
    Monitor SQL. . . .  Y (Y=Yes,N=No,S=Static only,D=Dynamic only)
      Skip for thread.  N  (Only applies if Monitor SQL is N)
    + Collection Options      (Y=Yes, N=No)                      
    + Collection Keys         (Y=Yes, N=No)                      
    + Resource-Saving Options (Y=Yes, N=No)                      
    + Thresholds for Exceptions and Efficient Statements  
    - Negative SQL Code Options                                               
      Generate Exception  N                   (Y=Yes, N=No, I=Incl, E=Excl)   
   Exception Codes >                     (Incl/Excl list, e.g. -204,-805)
      Capture Detail . .  Y                   (Y=Yes, N=No, I=Incl, E=Excl)   
     Detail Codes .  >                     (Incl/Excl List, e.g. -204,-805)
      Issue WTO. . . . .  N                   (Y=Yes, N=No, I=Incl, E=Excl)   
        WTO Codes. . .  >                     (Incl/Excl List, e.g. -204,-805)
*************************** End of List ************************

The following table describes the options that control SQL error monitoring and reporting.  The first two columns provide label names with and without PTF BQU0737 applied.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*