Database monitor view 1000 - SQL Information

Displays the SQL logical view format for database monitor QQQ1000.


Create View QQQ1000 as 
  (SELECT QQRID as Row_ID, 
          QQTIME as Time_Created, 
          QQJFLD as Join_Column, 
          QQRDBN as Relational_Database_Name, 
          QQSYS as System_Name, 
          QQJOB as Job_Name, 
          QQUSER as Job_User, 
          QQJNUM as Job_Number, 
          QQI9 as Thread_ID, 
          QQUCNT as Unique_Count, 
          QQI5 as Unique_Refresh_Counter,
          QQUDEF as User_Defined, 
          QQSTN as Statement_Number, 
          QQC11 as Statement_Function, 
          QQC21 as Statement_Operation, 
          QQC12 as Statement_Type, 
          QQC13 as Parse_Required, 
          QQC103 as Package_Name, 
          QQC104 as Package_Library, 
          QQC181 as Cursor_Name, 
          QQC182 as Statement_Name, 
          QQSTIM as Start_Timestamp, 
          QQ1000 as Statement_Text, 
          QQC14 as Statement_Outcome, 
          QQI2 as Result_Rows, 
          QQC22 as Dynamic_Replan_Reason_Code, 
          QQC16 as Data_Conversion_Reason_Code, 
          QQI4 as Total_Time_Milliseconds, 
          QQI3 as Rows_Fetched, 
          QQETIM as End_Timestamp, 
          QQI6 as Total_Time_Microseconds, 
          QQI7 as SQL_Statement_Length, 
          QQI1 as Insert_Unique_Count, 
          QQI8 as SQLCode, 
          QQC81 as SQLState, 
          QVC101 as Close_Cursor_Mode, 
          QVC11 as Allow_Copy_Data_Value, 
          QVC12 as PseudoOpen, 
          QVC13 as PseudoClose, 
          QVC14 as ODP_Implementation, 
          QVC21 as Dynamic_Replan_SubCode, 
          QVC41 as Commitment_Control_Level, 
          QWC1B as Concurrent_Access_Resolution, 
          QVC15 as Blocking_Type, 
          QVC16 as Delay_Prepare, 
          QVC1C as Explainable, 
          QVC17 as Naming_Convention, 
          QVC18 as Dynamic_Processing_Type, 
          QVC19 as LOB_Data_Optimized, 
          QVC1A as Program_User_Profile_Used, 
          QVC1B as Dynamic_User_Profile_Used, 
          QVC1281 as Default_Collection, 
          QVC1282 as Procedure_Name, 
          QVC1283 as Procedure_Library, 
          QQCLOB2 as SQL_Path, 
          QVC1284 as Current_Schema, 
          QQC18 as Binding_Type, 
          QQC61 as Cursor_Type, 
          QVC1D as Statement_Originator, 
          QQC15 as Hard_Close_Reason_Code, 
          QQC23 as Hard_Close_Subcode, 
          QVC42 as Date_Format, 
          QWC11 as Date_Separator, 
          QVC43 as Time_Format, 
          QWC12 as Time_Separator, 
          QWC13 as Decimal_Point, 
          QVC104 as Sort_Sequence_Table ,
          QVC105 as Sort_Sequence_Library, 
          QVC44 as Language_ID, 
          QVC23 as Country_ID, 
          QQIA as First_N_Rows_Value, 
          QQF1 as Optimize_For_N_Rows_Value, 
          QVC22 as SQL_Access_Plan_Reason_Code,
          QVC24 as Access_Plan_Not_Saved_Reason_Code, 
          QVC81 as Transaction_Context_ID, 
          QVP152 as Activation_Group_Mark, 
          QVP153 as Open_Cursor_Threshold, 
          QVP154 as Open_Cursor_Close_Count, 
          QVP155 as Commitment_Control_Lock_Limit, 
          QWC15 as Allow_SQL_Mixed_Constants, 
          QWC16 as Suppress_SQL_Warnings, 
          QWC17 as Translate_ASCII, 
          QWC18 as System_Wide_Statement_Cache, 
          QVP159 as LOB_Locator_Threshold, 
          QVP156 as Max_Decimal_Precision, 
          QVP157 as Max_Decimal_Scale, 
          QVP158 as Min_Decimal_Divide_Scale ,  
          QWC19 as Unicode_Normalization, 
          QQ1000L as Statement_Text_Long, 
          QVP15B as Old_Access_Plan_Length, 
          QVP15C as New_Access_Plan_Length, 
          QVP151 as Fast_Delete_Count, 
          QQF2 as Statement_Max_Compression, 
          QVC102 as Current_User_Profile, 
          QVC1E as Expression_Evaluator_Used, 
          QVP15A as Host_Server_Delta, 
          QQC301 as NTS_Lock_Space_Id, 
          QQC183 as IP_Address, 
          QFC11 as IP_Type, 
          QQSMINT2 as IP_Port_Number, 
          QVC3004 as NTS_Transaction_Id,  
          QQSMINT3 as NTS_Format_Id_Length, 
          QQSMINT4 as NTS_Transatction_ID_SubLength, 
          QVRCNT as Unique_Refresh_Counter2, 
          QVP15F as Times_Run, 
          QVP15E as FullOpens, 
          QVC1F as Proc_In_Cache, 
          QWC1A as Combined_Operation, 
          QVC3001 as Client_Applname, 
          QVC3002 as Client_Userid, 
          QVC3003 as Client_Wrkstnname, 
          QVC3005 as Client_Acctng, 
          QVC3006 as Client_Progamid, 
          QVC5001 as Interface_Information, 
          QVC82 as Open_Options, 
          QWC1D as Extended_Indicators, 
          QWC1C as DECFLOAT_Rounding_Mode, 
          QWC1E as SQL_DECFLOAT_Warnings, 
          QVP15D as Worst_Time_Micro, 
          QQINT05 as SQ_Unique_Count, 
          QFC13 as Concurrent_Access_Res_Used, 
          QQSMINT8 as SQL_Scalar_UDFs_Not_Inlined, 
          QVC3007 as Result_Set_Cursor, 
          QFC12 as Implicit_XMLPARSE_Option, 
          QQSMINT7 as SQL_XML_Data_CCSID, 
          QQSMINT5 as OPTIMIZER_USE, 
          QFC14 as XML_Schema_In_Cache, 
          QQC105 as Current_User,
          QFC15 as Row_Column_Access_Control
   FROM   DbMonLib/DbMonTable 
   WHERE  QQRID=1000) 
Table 1. QQQ1000 - SQL Information
View Column Name Table Column Name Description
Row_ID QQRID Row identification
Time_Created QQTIME Time row was created
Join_Column QQJFLD Join column (unique per job)
Relational_Database_Name QQRDBN Relational database name
System_Name QQSYS System name
Job_Name QQJOB Job name
Job_User QQUSER Job user
Job_Number QQJNUM Job number
Thread_ID QQI9 Thread identifier
Unique_Count QQUCNT Unique count (unique per query)
Unique_Refresh_Counter QQI5 Unique refresh counter
User_Defined QQUDEF User-defined column
Statement_Number QQSTN Statement number (unique per statement)
Statement_Function QQC11 Statement function:
  • S - Select
  • U - Update
  • I - Insert
  • D - Delete
  • L - Data definition language
  • O - Other
Statement_Operation QQC21 Statement operation:
  • AC - Allocate cursor
  • AD - Allocate descriptor
  • AF - Alter function
  • AL - Alter table
  • AK - Alter mask
  • AP - Alter procedure
  • AQ - Alter sequence
  • AR - Alter permission
  • AS - Associate locators
  • AT - Alter trigger
  • BE - Compound (dynamic)
  • CA - Call
  • CB - Create variable
  • CC - Create collection
  • CD - Create type
  • CF - Create function
  • CG - Create trigger
  • CI - Create index
  • CK - Create mask
  • CL - Close
  • CM - Commit
  • CN - Connect
  • CO - Comment on
  • CP - Create procedure
  • CQ - Create sequence
  • CR - Create permission
  • CS - Create alias/synonym
  • CT - Create table
  • CV - Create view
  • DA - Deallocate descriptor
  • DE - Describe
  • DI - Disconnect
  • DL - Delete
  • DM - Describe parameter marker
  • DO - Describe procedure
  • DP - Declare procedure
  • DR - Drop
  • DS - Describe cursor
  • DT - Describe table
  • EI - Execute immediate
  • EX - Execute
  • FE - Fetch
  • FL - Free locator
  • GR - Grant
  • GS - Get descriptor
  • HC - Hard close
  • HL - Hold locator
  • IN - Insert
Statement_Operation (continued) QQC21
  • JR - Server job reused
  • LK - Lock
  • LO - Label on
  • MG - Merge
  • MT - More text (Deprecated in V5R4)
  • OP - Open
  • PD - Prepare and describe
  • PR - Prepare
  • QF - OPNQRYF command
  • QM - Query/400 STRQMQRY command
  • QO - OPNDBF command or Native open
  • QQ - QQQQRY() API
  • QR - RUNQRY command
  • RB - Rollback to savepoint
  • RE - Release
  • RF - Refresh Table
  • RG - Resignal
  • RM - Set current DECFLOAT rounding mode
  • RO - Rollback
  • RS - Release Savepoint
  • RT - Rename table
  • RV - Revoke
  • SA - Savepoint
  • SC - Set connection
  • SD - Set descriptor
  • SE - Set encryption password
  • SN - Set session user
  • SI - Select into
  • SO - Set current degree
  • SP - Set path
  • SR - Set result set
  • SS - Set current schema
  • ST - Set transaction
  • SV - Set variable
  • SX - Set current implicit XMLPARSE option
  • TO - Transfer ownership
  • TT - Truncate
  • UP - Update
  • VI - Values into
  • X0 - Unknown statement
  • X1 - Unknown statement
  • X2 - DRDA (AS) Unknown statement
  • X3 - Unknown statement
  • X9 - Internal error
  • XA - X/Open API
  • ZD - Host server only activity
Statement_Type QQC12 Statement type:
  • D - Dynamic statement
  • S - Static statement
Parse_Required QQC13 Parse required (Y/N)
Package_Name QQC103 Name of the package or name of the program that contains the current SQL statement
Package_Library QQC104 Name of the library containing the package
Cursor_Name QQC181 Name of the cursor corresponding to this SQL statement, if applicable
Statement_Name QQC182 Name of statement for SQL statement, if applicable
Start_Timestamp QQSTIM Time this statement entered
Statement_Text QQ1000 First 1000 bytes of statement text
Statement_Outcome QQC14 Statement outcome
  • S - Successful
  • U - Unsuccessful
Result_Rows QQI2 Number of result rows returned. Will only be set for the following SQL operations and is 0 for all others:
  • IN - Insert
  • UP - Update
  • DL - Delete
  • For an SQL Plan Cache snapshot, this count represents the aggregate count for all runs of this query. This count can be divided by the total number of runs, COALESCE(QVP15F,1), to determine the average rows fetched for a given query run.
Dynamic_Replan_Reason_Code QQC22 Dynamic replan (access plan rebuilt)
  • NA - No replan.
  • NR - SQL QDT rebuilt for new release.
  • A1 - A table or member is not the same object as the one referenced when the access plan was last built. Some reasons why they might be different are:
    • Object was deleted and recreated.
    • Object was saved and restored.
    • Library list was changed.
    • Object was renamed.
    • Object was moved.
    • Object was overridden to a different object.
    • This run is the first run of this query after the object containing the query has been restored.
    • Mask or permission attributes changed for the object.
  • A2 - Access plan was built to use a reusable Open Data Path (ODP) and the optimizer chose to use a nonreusable ODP for this call.
  • A3 - Access plan was built to use a non-reusable Open Data Path (ODP) and the optimizer chose to use a reusable ODP for this call.
  • A4 - Either the number of rows in the table member has changed by more than 10% or a selectivity or cardinality statistic has change by more than 25% since the access plan was last built.
  • A5 - A new index exists over one of the tables in the query.
  • A6 - An index that was used for this access plan no longer exists or is no longer valid.
  • A7 - IBM® i Query requires the access plan to be rebuilt because of system programming changes.
  • A8 - The CCSID of the current job is different from the CCSID of the job that last created the access plan.
  • A9 - The value of one or more of the following values is different for the current job than it was for the job that last created this access plan:
    • date format
    • date separator
    • time format
    • time separator
Dynamic_Replan_Reason_Code (continued) QQC22
  • AA - The sort sequence table specified is different from the sort sequence table that was used when this access plan was created.
  • AB - Storage pool changed or DEGREE parameter of CHGQRYA command changed.
  • AC - The system feature DB2® Symmetric Multiprocesing has been installed or removed.
  • AD - The value of the degree query attribute has changed.
  • AE - A view is either being opened by a high-level language or a view is being materialized.
  • AF - A user-defined type or user-defined function is not the same object as the one referred to in the access plan; or the SQL Path is not the same as when the access plan was built.
  • B0 - The options specified have changed as a result of the query options file.
  • B1 - The access plan was generated with a commitment control level that is different in the current job.
  • B2 - The access plan was generated with a static cursor answer set size that is different from the previous access plan.
  • B3 - The query was reoptimized because this run is the first run of the query after it was prepared. This run is the first run with actual parameter marker values.
  • B4 - The query was reoptimized because referential or check constraints have changed.
  • B5 - The query was reoptimized because Materialized query tables have changed.
  • B6 - The query was reoptimized because the value of a host variable changed and the access plan is no longer valid.
  • B7 - The query was reoptimized because AQP determined that it was beneficial.
  • B8 - The query was reoptimized because Expression Evaluator determined that the statement should be reoptimized.
Data_Conversion_Reason_Code QQC16 Data conversion
  • N - No.
  • 0 - Not applicable.
  • 1 - Lengths do not match.
  • 2 - Numeric types do not match.
  • 3 - C host variable is NUL-terminated.
  • 4 - Host variable or column is variable length and the other is not variable length.
  • 5 - Host variable or column is not variable length and the other is variable length.
  • 6 - Host variable or column is variable length and the other is not variable length.
  • 7 - CCSID conversion.
  • 8 - DRDA and NULL capable, variable length, contained in a partial row, derived expression, or blocked fetch with not enough host variables.
  • 9 - Target table of an insert is not an SQL table.
Data_Conversion_Reason_Code (continued)  
  • 10 - Host variable is too short to hold a TIME or TIMESTAMP value being retrieved.
  • 11 - Host variable is DATE, TIME, or TIMESTAMP and value being retrieved is a character string.
  • 12 - Too many host variables specified and records are blocked.
  • 13 - DRDA used for a blocked FETCH. Also, the number of host variables specified in the INTO clause is less than the number of result values in the select list.
  • 14 - LOB locator used and the commitment control level was not *ALL.
Total_Time_Milliseconds QQI4 Total time for this statement, in milliseconds. For fetches, the time includes all fetches for this OPEN of the cursor.

Note: When monitor files are created when using an SQL Plan Cache snapshot, this time represents the aggregate time for all runs of this query. This time can be divided by the total number of runs, COALESCE(QVP15F,1), to determine an average time for a given run of the query.

Rows_Fetched QQI3 Total rows fetched for cursor

Note: When monitor files are created when using an SQL Plan Cache snapshot, this field is not set.

End_Timestamp QQETIM Time SQL request completed
Total_Time_Microseconds QQI6 Total time for this statement, in microseconds. For fetches, this time includes all fetches for this OPEN of the cursor.

Note: When monitor files are created when using an SQL Plan Cache snapshot, this time represents the aggregate time for all runs of this query. This time can be divided by the total number of runs, COALESCE(QVP15F,1), to determine an average time for a given run of the query.

SQL_Statement_Length QQI7 Length of SQL Statement
Insert_Unique_Count QQI1

If the operation (QQC21) indicates INSERT (IN), this field contains the unique query count for the QDT associated with the INSERT. QQUCNT contains the unique query count for the QDT associated with the WHERE part of the statement.

If the operation (QQC21) indicates DELETE (DL) or TRUNCATE (TT), this field contains the fast delete reason code.

Possible values if the operation is a DELETE or TRUNCATE are :
  • 0 - Fast delete results unknown or fast delete is not relevant because the delete failed.
  • 1 - Fast delete was achieved.
All other values if the operation is a DELETE or TRUNCATE indicate the reason the database was unable to implement the request using fast delete. Fast delete attempt denied values:
  • 2 - File is a DDM file.
  • 3 - File is a multi member file.
  • 4 - File is distributed file.
  • 5 - File is a logical file or SQL view.
  • 6 - File is a parent file.
  • 7 - File has one or more enabled delete triggers created over it.
  • 8 - Number of rows in table is less than 1000 OR less than the QAQQINI SQL_FAST_DELETE_ROW_COUNT value. Refer to QVP151 to see the SQL_FAST_DELETE_ROW_COUNT value in effect for this statement.
  • 9 - DBMAINT failed. This reason code could appear for many reasons, including the existence of a logical open within this job, pending record changes, ragged save in progress and possibly other reasons.
  • 10- Failed to acquire an exclusive no read (LENR) lock on the file.
  • 11- Failed to acquire an exclusive allow read (LEAR) lock on the file's data space.
  • 12- The user does not have *EXECUTE authority to the library.
  • 13- File has one or more enabled delete triggers and RESTRICT WHEN DELETE TRIGGERS was specified on a TRUNCATE statement.
  • 51- A WHERE clause was used on the DELETE.
  • 52- QAQQINI SQL_FAST_DELETE_ROW_COUNT indicated to disallow fast delete.
  • 53- File is an alias referring to a partition table member.
  • 54- The user does not have *DELETE authority to the file.
  • 55- File is not found.
SQLCode QQI8 SQL return code
SQLState QQC81 SQLSTATE
Close_Cursor_Mode QVC101 Close Cursor. Possible values are:
  • *ENDJOB - SQL cursors are closed when the job ends.
  • *ENDMOD - SQL cursors are closed when the module ends
  • *ENDPGM - SQL cursors are closed when the program ends.
  • *ENDSQL - SQL cursors are closed when the first SQL program on the call stack ends.
  • *ENDACTGRP - SQL cursors are closed when the activation group ends.
Allow_Copy_Data_Value QVC11 ALWCPYDTA setting (Y/N/O)
  • Y - A copy of the data might be used.
  • N - Cannot use a copy of the data.
  • O - The optimizer can choose to use a copy of the data for performance.
PseudoOpen QVC12 Pseudo Open (Y/N) for SQL operations that can trigger opens.
  • OP - Open
  • IN - Insert
  • UP - Update
  • DL - Delete
  • SI - Select Into
  • SV - Set
  • VI - Values into
For all operations, it can be blank.
PseudoClose QVC13 Pseudo Close (Y/N) for SQL operations that can trigger a close.
  • CL - Close
  • IN - Insert
  • UP - Update
  • DL - Delete
  • SI - Select Into
  • SV - Set
  • VI - Values into
For all operations, it can be blank.
ODP_Implementation QVC14 ODP implementation
  • R - Reusable ODP
  • N - Nonreusable ODP
  • ' ' - Column not used
Dynamic_Replan_SubCode QVC21 Dynamic replan, subtype reason code
Commitment_Control_Level QVC41 Commitment control level. Possible values are:
  • CS - Cursor stability
  • CSKL - Cursor stability. Keep exclusive locks.
  • NC - No commit
  • RR - Repeatable read
  • RREL - Repeatable read. Keep exclusive locks.
  • RS - Read stability
  • RSEL - Read stability. Keep exclusive locks.
  • UR - Uncommitted read
Concurrent_Access_Resolution QWC1B Indicates what method of concurrent access resolution was specified.
  • N - Concurrent access resolution was not specified.
  • S - SKIP LOCKED DATA clause was specified.
  • U - USE CURRENTLY COMMITTED clause was specified.
  • W- WAIT FOR OUTCOME clause was specified.
Blocking_Type QVC15 Type of blocking. Possible values are:
  • S - Single row, ALWBLK(*READ)
  • F - Force one row, ALWBLK(*NONE)
  • L - Limited block, ALWBLK(*ALLREAD)
Delay_Prepare QVC16 Delay prepare of statement (Y/N).
Explainable QVC1C The SQL statement is explainable (Y/N).
Naming_Convention QVC17 Naming convention. Possible values:
  • N - System naming convention
  • S - SQL naming convention
Dynamic_Processing_Type QVC18 Type of dynamic processing.
  • E - Extended dynamic
  • S - System wide cache
  • L - Local prepared statement
LOB_Data_Optimized QVC19 Optimize LOB data types (Y/N)
Program_User_Profile_Used QVC1A User profile used when compiled programs are executed. Possible values are:
  • N = User Profile is determined by naming conventions. For *SQL, USRPRF(*OWNER) is used. For *SYS, USRPRF(*USER) is used.
  • U = USRPRF(*USER) is used.
  • O = USRPRF(*OWNER) is used.
Dynamic_User_Profile_Used QVC1B User profile used for dynamic SQL statements.
  • U = USRPRF(*USER) is used.
  • O = USRPRF(*OWNER) is used.
Default_Collection QVC1281 Name of the default collection.
Procedure_Name QVC1282 Procedure name on CALL to SQL.
Procedure_Library QVC1283 Procedure library on CALL to SQL.
SQL_Path QQCLOB2 Path used to find procedures, functions, and user-defined types for static SQL statements.
Current_Schema QVC1284 SQL current schema.
Binding_Type QQC18 Binding type:
  • C - Column-wise binding
  • R - Row-wise binding
Cursor_Type QQC61 Cursor Type:
  • NSA - Non-scrollable, asensitive, forward only
  • NSI - Non-scrollable, insensitive, forward only
  • NSS - Non-scrollable, sensitive, forward only
  • SCA - scrollable, asensitive
  • SCI - scrollable, insensitive
  • SCS - scrollable, sensitive
Statement_Originator QVC1D SQL statement originator:
  • U - User
  • S - System
Hard_Close_Reason_Code QQC15 SQL cursor hard close reason. Possible reasons are:
  • 1 - Internal Error
  • 2 - Exclusive Lock
  • 3 - Interactive SQL Reuse Restriction
  • 4 - Host variable Reuse Restriction
  • 5 - Temporary Result Restriction
  • 6 - Cursor Restriction
  • 7 - Cursor Hard Close Requested
  • 8 - Internal Error
  • 9 - Cursor Threshold
  • A - Optimizer decided to Hard-Close
  • B - Reuse Cursor Error
  • C - DRDA AS Cursor Closed
  • D - DRDA AR Not WITH HOLD
  • E - Repeatable Read
  • F - Lock Conflict Or QSQPRCED Threshold - Library
  • G - Lock Conflict Or QSQPRCED Threshold - File
  • H - Execute Immediate Access Plan Space
  • I - QSQCSRTH Dummy Cursor Threshold
  • J - File Override Change
  • K - Program Invocation Change
  • L - File Open Options Change
  • M - Statement Reuse Restriction
  • N - Internal Error
  • O - Library List Changed
  • P - Exit Processing
  • Q - SET SESSION USER statement
Hard_Close_Subcode QQC23 SQL cursor hard close reason subcode.

For QQC15 Reason code ‘A’ the following subcodes apply:

  • Z7 - New Index found
  • Z8 – Data Space Size changed out side of range
  • Z9 – MQT refresh age expired
  • ZA – Host variable values are no longer compatible with current plan
  • ZB – new statistic was found
  • ZC – commit level changed
  • ZD – Reoptimze for Warm IO
  • ZE – Reoptimze and change from FIRSTIO to ALLIO
  • ZF – Host variable selectivity changes require Reoptimization
  • ZG – AQP decided to hard-close
Date_Format QVC42 Date Format. Possible values are:
  • ISO
  • USA
  • EUR
  • JIS
  • JUL
  • MDY
  • DMY
  • YMD
Date_Separator QWC11 Date Separator. Possible values are:
  • "/"
  • "."
  • ","
  • "-"
  • " "
Time_Format QVC43 Time Format. Possible values are:
  • ISO
  • USA
  • EUR
  • JIS
  • HMS
Time_Separator QWC12 Time Separator. Possible values are:
  • ":"
  • "."
  • ","
  • " "
Decimal_Point QWC13 Decimal Point. Possible values are:
  • "."
  • ","
Sort_Sequence_Table QVC104 Sort Sequence Table
Sort_Sequence_Library QVC105 Sort Sequence Library
Language_ID QVC44 Language ID
Country_ID QVC23 Country ID
First_N_Rows_Value QQIA Value specified on the FIRST n ROWS clause.
Optimize_For_N_Rows _Value QQF1 Value specified on the OPTIMIZE FOR n ROWS clause.
SQL_Access_Plan_Reason_Code QVC22 SQL access plan rebuild reason code. Possible reasons are:
  • A1 - A table or member is not the same object as the one referenced when the access plan was last built. Some reasons they might be different are:
    • Object was deleted and recreated.
    • Object was saved and restored.
    • Library list was changed.
    • Object was renamed.
    • Object was moved.
    • Object was overridden to a different object.
    • This rebuild is the first run of this query after the object containing the query has been restored.
  • A2 - Access plan was built to use a reusable Open Data Path (ODP) and the optimizer chose to use a non-reusable ODP for this call.
  • A3 - Access plan was built to use a non-reusable Open Data Path (ODP) and the optimizer chose to use a reusable ODP for this call.
  • A4 - The number of rows in the table has changed by more than 10% since the access plan was last built.
  • A5 - A new index exists over one of the tables in the query
  • A6 - An index that was used for this access plan no longer exists or is no longer valid.
SQL_Access_Plan_Reason_Code (continued)  
  • A7 - IBM i Query requires the access plan to be rebuilt because of system programming changes.
  • A8 - The CCSID of the current job is different from the CCSID of the job that last created the access plan.
  • A9 - One or more of the following values is different for the current job than it was for the job that last created this access plan:
    • date format
    • date separator
    • time format
    • time separator.
  • AA - The sort sequence table specified is different from the sort sequence table that was used when this access plan was created.
  • AB - Storage pool changed or DEGREE parameter of CHGQRYA command changed.
  • AC - The system feature DB2 Symmetric Multiprocessing has been installed or removed.
  • AD - The value of the degree query attribute has changed.
  • AE- A view is either being opened by a high-level language or a view is being materialized.
  • AF - A user-defined type or user-defined function is not the same object as the one referred to in the access plan, or, the SQL Path is not the same as when the access plan was built.
  • B0 - The options specified have changed as a result of the query options file.
  • B1 - The access plan was generated with a commitment control level that is different in the current job.
  • B2 - The access plan was generated with a static cursor answer set size that is different from the previous access plan.
  • B3 - The query was reoptimized because this run is the first run after the query was prepared. It is the first run with actual parameter marker values.
  • B4 - The query was reoptimized because referential or check constraints have changed.
  • B5 - The query was reoptimized because Materialized query tables have changed.
  • B6 - The query was reoptimized because the value of a host variable changed and the access plan is no longer valid.
  • B7 - The query was reoptimized because AQP determined that the query must be reoptimized.
Access_Plan_Not_Saved_Reason_Code QVC24 Access plan not saved reason code. Possible reasons are:
  • A1 - Failed to get an LSUP lock on associated space of program or package.
  • A2 - Failed to get an immediate LEAR space location lock on first byte of associated space of program.
  • A3 - Failed to get an immediate LENR space location lock on first byte of associated space of program.
  • A5 - Failed to get an immediate LEAR space location lock on first byte of ILE associated space of a program.
  • A6 - Error trying to extend space of an ILE program.
  • A7 - No room in program.
  • A8 - No room in program associated space.
  • A9 - No room in program associated space.
  • AA - No need to save. Save already done in another job.
  • AB - Query optimizer cannot lock the QDT.
  • B1 - Saved at the end of the program associated space.
  • B2 - Saved at the end of the program associated space.
  • B3 - Saved in place.
  • B4 - Saved in place.
  • B5 - Saved at the end of the program associated space.
  • B6 - Saved in place.
  • B7 - Saved at the end of the program associated space.
  • B8 - Saved at the end of the program associated space.
Transaction_Context_ID QVC81 Transaction context ID.
Activation_Group_Mark QVP152 Activation Group Mark
Open_Cursor_Threshold QVP153 Open cursor threshold
Open_Cursor_Close_Count QVP154 Open cursor close count
Commitment_Control_Lock_Limit QVP155 Commitment control lock limit
Allow_SQL_Mixed_Constants QWC15 Using SQL mixed constants (Y/N)
Suppress_SQL_Warnings QWC16 Suppress SQL warning messages (Y/N)
Translate_ASCII QWC17 Translate ASCII to job (Y/N)
System_Wide_Statement_Cache QWC18 Using system-wide SQL statement cache (Y/N)
LOB_Locator_Threshold QVP159 LOB locator threshold
Max_Decimal_Precision QVP156 Maximum decimal precision (63/31)
Max_Decimal_Scale QVP157 Maximum decimal scale
Min_Decimal_Divide_Scale QVP158 Minimum decimal divide scale
Unicode_Normalization QWC19 Unicode data normalization requested (Y/N)
Statement_Text_Long QQ1000L Complete statement text
Old_Access_Plan_Length QVP15B Length of old access plan
New_Access_Plan_Length QVP15C Length of new access plan
Fast_Delete_Count QVP151 SQL fast delete count. Possible values are:
  • 0 = *OPTIMIZE or *DEFAULT
  • 1-999,999,999,999 = User specified value
  • 'FFFFFFFFFFFFFFFF'x = *NONE
Statement_Max_Compression QQF2 SQL statement maximum compression. Possible values are:
  • 1 - *DEFAULT
  • 1 - User specified queries
  • 2 - All queries, user, and system
  • 3 - System generated internal queries
Current_User_Profile QVC102 Current user profile name
Expression_Evaluator_Used QVC1E
  • N - Not applicable
  • S - SQL mapping
  • Y - QQ expression evaluator
  • O - Expression handled by an Open
  • T - Expression evaluator used temporary copy of access plan
Host_Server_Delta QVP15A Time not spent within Host Server
NTS_Lock_Space_Id QQC301 NTS Lock Space Identifier
IP_Address QQC183 IP Address
IP_Type QFC11 IP address type
  • '0' = No client IP address
  • '1' = IPV4 format
  • '2' = IPV6 format
Only applicable for database server jobs.
IP_Port_Number QQSMINT2 IP Port Number
NTS_Transaction_Id QVC3004 NTS Transaction Identifier
NTS_Format_Id_Length QQSMINT3 NTS Format Identified length
NTS_Transaction_ID_SubLength QQSMINT4 NTS Transaction Identifier sublength.
Unique_Refresh_Counter2 QVRCNT Unique refresh counter
Times_Run QVP15F Number of times this Statement was run. If Null, then the statement was run once.

Note: While using an SQL Plan Cache snapshot, this value can be set by the database monitor. This value might be null if the query never completed, or was running when the snapshot was created. If there is not a plan cache snapshot, the value is null.

Full_Opens QVP15E Number of runs that were processed as full opens. If Null, then the refresh count (qvrcnt) is used to determine if the open was a full open (0) or a pseudo open (>0).

Note: While using an SQL Plan Cache snapshot, this value can be set by the database monitor. This value might be null if the query never completed, or was running when the snapshot was created. If there is not a plan cache snapshot, the value is null.

Proc_In_Cache QVC1F Procedure definition was found in an internal cache. (Y/N) Only applicable for CALL statements.
Combined_Operation QWC1A Statement was performed with the processing for another statement. (Y/N) Only applicable for OPEN, FETCH, and CLOSE statements.
Client_Applname QVC3001 Client Special Register - application name
Client_Userid QVC3002 Client Special Register - userid
Client_Wrkstnname QVC3003 Client Special Register - work station name
Client_Acctng QVC3005 Client Special Register - accounting string
Client_Programid QVC3006 Client Special Register - program name
Interface_Information QVC5001 Part of the CLIENT special register information. Three types of info are stored in this char500 column, separated by colons.
  • First part, Interface Name, varchar(127);
  • Second part, Interface Level, varchar(63);
  • Third part, Interface Type, varchar(63)
Open_Options QVC82 Open options appear as a combination of the following characters, representing the actual capability for the cursor. The character values are left-aligned and padded on the right with blanks. Example 'RU ' indicate that the cursor is both read and update capable.
  • R - Read capable
  • W - Write capable
  • U - Update capable
  • D - Delete capable
Extended_Indicators QWC1D An Update or Insert statement was enabled to use extended indicators (Y/N).
DECFLOAT_Rounding_Mode QWC1C Rounding mode to use for DECFLOAT computations and conversions.
  • 'E' = ROUND_HALF_EVEN
  • 'C' = ROUND_CEILING
  • 'D' = ROUND_DOWN
  • 'F' = ROUND_FLOOR
  • 'G' = ROUND_HALF_DOWN
  • 'H' = ROUND_HALF_UP
  • 'U' = ROUND_UP
SQL_DECFLOAT_Warnings QWC1E DECFLOAT computations and conversions involving division by 0, overflow, underflow, an invalid operand, an inexact result, or a subnormal number results in a warning (Y/N).
Worst_Time_Micro QVP15D If not null, this time is the time for the slowest single run of this query.

Note: When monitor files are created when using an SQL Plan Cache snapshot, this time represents the run time for the longest single run of the query. If the value is null, then the longest run information is not available. In that case, QQI6 might be the next best answer. See documentation for QQI6 for the proper use of that field

SQ_Unique_Count QQINT05 A unique count used to uniquely identify statements which do not have an ODP but do pass in host variables. If QQUCNT is 0 and the statement passes in host variables, this value is non-zero. An example would be a CALL statement.
Concurrent_Access_Res_Used QFC13 Specifies what method of concurrent access resolution was used.
  • 'N' = Concurrent access resolution is not applicable. This method applies to read queries with no commit or uncommitted read.
  • 'S' = SKIP LOCKED DATA clause was specified and rows with incompatible locks held by other transactions are skipped.
  • 'U' = USE CURRENTLY COMMITTED clause was specified and the currently committed version of data being updated or deleted is used. Data being inserted is skipped.
  • 'W' = Wait for commit or rollback when data is in the process of being inserted, updated, or deleted. This is the default method when the isolation level does not apply, the query is processed by CQE, or when not specified by the user.
SQL_Scalar_UDFs_Not_Inlined QQSMINT8 Specifies the number of SQL scalar user-defined functions (UDFs) that were not inlined in an SQL query or expression.
Result_Set_Cursor QVC3007 Result Set Cursor name. Set by Allocate Cursor, Fetch, and Close.
Implicit_XMLPARSE_Option QFC12 CURRENT IMPLICIT XMLPARSE OPTION special register. This option is used to specify white-space handling for an implicit parse of serialized XML data.
  • 'S' = STRIP WHITESPACE
  • 'P' = PRESERVE WHITESPACE
SQL_XML_Data_CCSID QQSMINT7 The CCSID used for XML columns, host variables, parameter markers, and expressions if not explicitly specified.
OPTIMIZER_USE QQSMINT5 Which optimizer was used for the query. Set to null if the monitor predates this option.
  • 0 = Does not apply for this statement
  • 1 = SQE was used (SQL Query Engine)
  • 2 = CQE was used (Classic Query Engine)
  • 3 = CQE direct was used (statements like INSERT W/VALUES)
XML_Schema_In_Cache QFC14 The XML schema binary used during XMLVALIDATE or decomposition was found in the XML cache.
  • 'Y' = Yes
  • 'N' = No
Current_User QQC105 The value of the CURRENT USER special register. The value only appears in the QQC105 column if the SQL statement used CURRENT USER.
Row_Column_Access_Control QFC15 Type of row or column access applied.
  • ' ' = Not applicable
  • 'C' = Column Access Control
  • 'R' = Row Access Control
  • 'B' = Both Row and Column Access Control