Function level 508 (APAR PH66983 - October 2025)
Function level 508 introduces more granularity for the BLOCKING_THREADS table function, more active and archive logs, new DDL keywords for work file table spaces, functions for generating and formatting UUID values, improved population of DSSIZE information, and more local application support profiles that set global variables and special registers, rebind phase-in for SQL PL and triggers.
Contents
BLOCKING_THREADS table function enhancements
Increasing the maximum number of active and archive logs
Specify sort work or DGTT usage for PBG table spaces in the work file database
More local applications control with Db2 profile tables
Consistent DSSIZE records in Db2 catalog tables for UTS and LOB objects
Rebind phase-in for SQL PL and trigger packages
Preparation for conversion of non-UTS catalog and directory objects
| Enabling APAR: | PH66983 |
|---|---|
| Full identifier: | V13R1M508 |
| Catalog level required: | V13R1M508 |
| Product identifier (PRDID): | DSN13019 |
| Incompatible changes: | None |
New capabilities in function level 508
Function level 508 activates the following new capabilities in Db2 13.
- BLOCKING_THREADS table function enhancements
-
Function level 508 enhances the BLOCKING_THREADS table function and -DISPLAY BLOCKERS command to add more granular input at the table, index, and space level and granularity at the table, index, and space level to identify threads that block online schema changes. With the new granular input, the output of the BLOCKING_THREADS table function and -DISPLAY BLOCKERS command includes the object type in the output.
With the enhancements, Db2 database administrators can identify and resolve blocking threads to ensure seamless online schema changes, optimal database performance, and operational efficiency.
For more information, see the following related topics:
APAR PH67082 delivered the functional code for BLOCKING_THREADS table function enhancements.
For more information, see the following related topics:
- Increasing the maximum number of active and archive logs
-
Function level 508 introduces support for increasing the maximum number of active and archive logs in the BSDS. The maximum number of active log data sets is increased to 1,000 per log copy and the maximum number of archive log data sets is increased to 14,500 per log copy. This enhancement increases the maximum amount of active log data sets to allow for 24–48 hours of active log data. This capability is especially useful in replication or backup and recovery scenarios to avoid the need to access archive logs.
You can run the DSNJU004 (print log map) utility against the BSDS to determine if the DSNJCNVU conversion utility needs to be run. The DSNJCNVU conversion utility converts the BSDS by formatting additional records so that it can support the new maximum values for active and archive log data sets.
For more information, see the following related topics:
- Active and archive logs
- DSNTIPL: Active log data set parameters
- Limits in Db2 for z/OS
- DSNJCNVU
- DSNJU004 (print log map)
APAR PH67380 delivered the functional code for increasing the maximum number of active and archive logs.
- Specify sort work or DGTT usage for PBG table spaces in the work file database
-
Function level 508 introduces the capability to specify whether table spaces in a work file database are used for sort work or declared global temporary table (DGTT) processing. Specifically, applications that run at APPLCOMPAT level V13R1M508 or higher can specify the following keywords in CREATE TABLESPACE statements for table spaces in work file databases. These keywords can only be specified when partition-by-growth (PBG UTS) table space is created in a work file database:
- FOR SORT
- The table space is used for processes other than declared global temporary tables (DGTTs), such as sort, join, created global temporary tables, query parallelism, trigger transition tables, and so forth.
- FOR DGTT
- The table space is used for DGTTs and processes that use internal temporary tables, such scrollable cursors and instead-of triggers. This clause is accepted only when the database specified by the IN database-name clause is a work file database.
The -DISPLAY DATABASE command is also enhanced with new TYPE column values to display when these keywords were specified, and the a new USAGE column in the SYSIBM.SYSTABLESPACE catalog table records when these keywords were used.
For more information, see the following related topics:
- How sort work files are allocated
- CREATE TABLESPACE statement
- -DISPLAY DATABASE command (Db2)
- SYSTABLESPACE catalog table
- SEPARATE WORK FILES field (WFDBSEP subsystem parameter)
APAR PH67418 delivered the functional code to for specifying the usage of PBG table spaces in the work file database.
- Generation of UUID values
-
Function level 508 introduces four new built-in scalar functions to support generation and formatting of UUID values. A universally unique Identifier (UUID) is a 128-bit label used to uniquely identify objects in computer systems, without central authority. UUIDs are commonly used in microservices and cloud services. For an overview of how UUIDs can be used in Db2, including performance considerations, see Universally unique identifier (UUID) values in Db2 for z/OS.
The following built-in functions are introduced to support generation and conversion of UUID values in Db2 for z/OS®.
Function Purpose GENERATE_UUID The GENERATE_UUID function returns the formatted string representation of a universally unique identifier (UUID) by using the version 4 algorithm.
The result of the function is a CHAR(36) value that has the following format:
xxxxxxxx-xxxx-4xxx-xxxx-xxxxxxxxxxxxGENERATE_UUID_BINARY The GENERATE_UUID_BINARY function returns the binary string representation of a universally unique identifier (UUID) by using the version 4 algorithm.
The result of the function is a BINARY(16) value.
VARBINARY_FORMAT The VARBINARY_FORMAT function returns a binary string representation of a character string that has been formatted using a format-string. VARCHAR_FORMAT_BINARY The VARCHAR_FORMAT_BINARY function returns a character string representation of a bit string that has been formatted using a format-string. Db2 for z/OS supports generation of UUID values as defined in the version 4 algorithm defined in the RFC 4122 industry standard. For more information about the RFC 4122 industry standard, see https://www.ietf.org/rfc/rfc4122.html.
Applications that call the new built-in function must run at application compatibility level V13R1M508 or higher.
The GENERATE_UUID and GENERATE_UUIDBINARY functions also require the availability of true random number generation features that are available only when Db2 is running on IBM z14® or later hardware. Otherwise Db2 issue SQLCODE -904 with reason code 00E73007 and resource type 00002301.
APAR PH67353 delivered the functional code for generating UUID values.
- More local applications control with Db2 profile tables
-
Function level 508 introduces the capability to use profile tables to specify the values of more special registers and global variables for local applications by using the Db2 profile tables.
Specifically, the following table shows the ATTRIBUTE2 values that can be set to non-null values for rows with the KEYWORDS and ATTRIBUTE1 value combinations in the DSN_PROFILE_ATTRIBUTES table. That is the profile table rows for these settings can apply to local applications only (with ATTRIBUTE2='1'), remote applications only (with ATTRIBUTE2=NULL), or both local and remote applications (with ATTRIBUTE2='2').
KEYWORDS column value ATTRIBUTE1 values GLOBAL_VARIABLE SET statements for the following built-in global variables:
- SYSIBMADM.MAX_LOCKS_PER_TABLESPACE
- SYSIBMADM.MAX_LOCKS_PER_USER
- SYSIBMADM.GET_ARCHIVE
- SYSIBMADM.MOVE_TO_ARCHIVE
- SYSIBM.TEMPORAL_LOGICAL_TRANSACTION_TIME
- SYSIBM.TEMPORAL_LOGICAL_TRANSACTION
SPECIAL_REGISTER SET statements for following special registers:
- CURRENT ACCELERATOR
- CURRENT APPLICATION COMPATIBILITY
- CURRENT DEBUG MODE
- CURRENT DECFLOAT ROUNDING MODE
- CURRENT DEGREE
- CURRENT EXPLAIN MODE
- CURRENT GET_ACCEL_ARCHIVE
- CURRENT LOCALE LC_CTYPE
- CURRENT MAINTAINED TABLE TYPES FOR OPTIMIZATION
- CURRENT OPTIMIZATION HINT
- CURRENT PRECISION
- CURRENT QUERY ACCELERATION
- CURRENT QUERY ACCELERATION WAITFORDATA
- CURRENT REFRESH AGE
- CURRENT ROUTINE VERSION
- CURRENT RULES
- CURRENT SQLID
- CURRENT TEMPORAL BUSINESS_TIME
- CURRENT TEMPORAL SYSTEM_TIME
- ENCRYPTION PASSWORD
- PATH
- SCHEMA
- SESSION TIME ZONE
For more information, see the following related topics:
- Setting built-in global variables by using profile tables
- Setting special registers by using profile tables
APAR PH67138 delivered the functional code for the new global variable and special register support.
- Consistent DSSIZE records in Db2 catalog tables for UTS and LOB objects
-
Starting in catalog level V13R1M508, Db2 consistently populates data set size records in the following Db2 catalog columns, for all objects in UTS and LOB table spaces. The consistent DSSIZE data enables database administrators to know when an index is almost full and avoid outages, without having to use complicated calculations to determine the maximum sizes.
- DSSIZE and PIECSIZE columns in the SYSINDEXES table.
- DSSIZE columns in the SYSINDEXPART, SYSTABLESPACE, and SYSTABLEPART tables.
Before this enhancement, Db2 does not populate these columns in certain situations, such as when default values are used for creating indexes. Also, these columns contain NULL values for any objects that were created in versions earlier than Db2 12.
The following changes take immediate effect when the CATMAINT utility updates the Db2 catalog level to V13RM508. That is, function level activation is not required for these changes to take effect.
- The DSSIZE columns are changed to BIGINT in the SYSINDEXES and SYSINDEXPART catalog tables. These changes place the DSNDB06.SYSTSIXS and DSNDB06.SYSTSIPT table spaces into the AREO* state. For best results, run the REORG TABLESPACE utility to materialize these changes, remove the AREO* states, and improve application performance.
- Db2 starts populating the DSSIZE values consistently for the added or changed rows when you create or alter UTS or LOB objects.
- You can run a special one-time CATMAINT job to populate any missing DSSIZE and PIECESIZE column values for existing UTS, LOB, and XML objects any time that the Db2 catalog level is V13R1M508 or higher. To run this CATMAINT job, complete the following steps:
- Verify that your Db2 environment does not have incorrect DSSIZE values for objects that use absolute page numbering by following the instructions in the closing text for Db2 12 APAR PH32731. Important: If your Db2 catalog has the problem identified by APAR PH32731, you must contact IBM® Support for help with correcting those values before you complete the next step.
- Run the following CATMAINT utility job as a one-time update:
CATMAINT UPDATE UNLDDN UPDDSIZE
- Verify that your Db2 environment does not have incorrect DSSIZE values for objects that use absolute page numbering by following the instructions in the closing text for Db2 12 APAR PH32731.
For more information, see the following related topics:
- SYSINDEXES catalog table
- SYSINDEXPART catalog table
- SYSTABLEPART catalog table
- SYSTABLESPACE catalog table
APAR PH67419 delivered the functional code for consistently populating the DSSIZE columns for UTS and LOB objects.
- Rebind phase-in for SQL PL and trigger packages
-
Function level 508 extends support for the rebind phase-in capability that was introduced for most packages in Db2 12 to packages for SQL PL routines and triggers. This capability enables DBAs to deploy new application features that depend on packages SQL PL routines and triggers without taking an outage, especially in busy Db2 environments, where the packages are often continuously executed by one or more threads.
With rebind phase-in, a rebind operation generates a new copy, while existing threads continue to execute the current copy of the package, which becomes the phased-out copy. When the new copy is committed by the rebind, that copy becomes the current copy and is immediately available for the next execution by a new thread. Threads that existed prior to the rebind can also use the new current copy when they release the phased-out copy (based on the RELEASE(COMMIT) or RELEASE(DEALLOCATE) options). Rebind phase-in is supported for packages for SQL PL routines and triggers at function level 508 or higher.
Rebind phase-in for native SQL routine packages and trigger packages has the following external behaviors, which are the same as for rebind phase-in for other packages:
- Db2 generates a maximum of 14 copies for a package. Only one of them is the current copy. The current copy with its copy ID is stored in the catalog table SYSPACKAGE.
- Phased-out copies are stored in SYSPACKCOPY. Subsequent REBIND PACKAGE or REBIND TRIGGER PACKAGE commands delete an existing phased-out copy if the copy can be safely deleted. The copy ID for a deleted phased-out copy can be reused. An alternative way to remove phased-out copies is to use command FREE PACKAGE with PLANMGMTSCOPE(PHASEOUT/INACTIVE).
- Rebind phase-in requires PLANMGMT(EXTENDED). If APREUSE(WARN/ERROR) is specified, APREUSESOURCE(CURRENT) is also required.
- REBIND SWITCH can be done while the package is being executed if PLANMGMT subsystem parameter value is set to EXTENDED.
The rebind phase-in capability is not supported for ALTER statements that only change bind options of the SQL PL routine or trigger package. The REBIND PACKAGE command is the recommended approach for these situations.
For more information, see the following related topics:
APAR PH67404 delivered the functional code for the rebind phase-in support for SQL PL and trigger packages.
- Preparation for conversion of non-UTS catalog and directory objects
-
When the CATMAINT utility updates the Db2 catalog level to V13R1M508, it creates certain new table spaces in preparation for the eventual conversion of remaining non-UTS catalog and directory objects to UTS. They are created with the DEFINE NO attribute.Note: The conversion process for the non-UTS catalog and directory objects is expected to be enabled by one or more later Db2 13 function levels. That is, none of the table spaces are eligible for the UTS conversion in function level 508. For more information, see .
Also, when you apply the PTF for APAR PH67554, it enhances the DISPLAY GROUP command with a new option keyword, UTSCONVERSION. This enhancement can be used immediately when the PTF is applied.
When you specify the UTSCONVERSION option, the output display a report with information about Db2 catalog and directory tables to be converted to UTS.
UTS CONVERSION REPORT --------------------- TABLE UTS SPACE CONVERSION -------- ---------- ts-name conversion-status- ts-name
- The original table space name for a Db2 catalog or directory object to be converted to UTS.
- conversion-status
- The conversion status for each original table space. The original table spaces names to be converted are listed in alphabetical order within each of the following status-based categories:
- COMPLETE for table spaces that are already converted to UTS
- ELIGIBLE for table spaces not yet converted to UTS with conversion supported at the current function level
- INELIGIBLE for table spaces that require conversion to UTS but cannot be converted at the current function level
For more information, see the following related topics:
V13R1M508 application compatibility
Most new SQL syntax and behaviors introduced by this function level become available when applications run at the equivalent application compatibility (APPLCOMPAT) level or higher. Otherwise, the result is a SQL code error such as -4743, or sometimes a previous behavior continues as before. For more information, see the following topics:
How to activate function level 508
The following steps summarize the process for activating this function level. To learn more about how to activate and control the adoption of new capabilities available for use in your Db2 13 environment and continuous delivery in general, see Adopting new capabilities in Db2 13 continuous delivery.
To activate function level 508, complete the following steps:
- If Db2 13 is still at function level 100, activate function level 500 first. For more information, see Activating Db2 13 function level 500 or higher.
- Generate tailored JCL jobs for the CATMAINT and function level activation steps.
You can use the DSNTIJBC batch job or the Db2 installation CLIST.
Tip: You can avoid working through the Db2 installation CLIST panels in interactive mode by running a batch job with valid input files to generate the required JCL jobs and input files with a background process. See Generating tailored Db2 migration or function level activation jobs in the background.
To generate the required JCL jobs and input files with a background process, complete the following steps:

- Customize the DSNTIDOA parameter override file by following the instructions in the file.
- Customize the DSNTIJBC job. For example, if prefix.SDSNSAMP(DSNTIDOA) is the customized parameter override file, you can specify the following values in the ISPSTART command in DSNTIJBC.
ISPSTART CMD(%DSNTINSB + OVERPARM(prefix.SDSNSAMP(DSNTIDOA)) + ) BREDIMAX(1) - If you use Db2 Value Unit Edition, you must also provide the data set name of the DSNTIDVU parameter override file in the IPSTART command in the DSNTIJBC job, as shown in the following example, where prefix.SDSNSAMP(DSNTIDVU) is the customized OTC LICENSE file.
ISPSTART CMD(%DSNTINSB + OVERPARM(<prefix>.SDSNSAMP(DSNTIDOA)) + OTCLPARM(<prefix>.SDSNSAMP(DSNTIDVU)) + ) BREDIMAX(1) - Submit the customized DSNTIJBC job.
To generate the required JCL jobs and input files with the Db2 installation CLIST in interactive mode, complete the following steps:
- In panel DSNTIPA1, specify INSTALL TYPE ===> ACTIVATE. Then, specify the name of the output member from the previous function level activation (or migration) in the INPUT MEMBER field, and specify a new member name in the OUTPUT MEMBER field.
- In panel DSNTIP00, specify the current function level and TARGET FUNCTION LEVEL ===> V13R1M508. The Db2 installation CLIST uses this value when it tailors the ACTIVATE command in the DSNTIJAF job and the CATMAINT utility control statement in the DSNTIJTC job.Note: After you complete this step, Db2 consistently records data set size information in the Db2 catalog for all UTS and LOB objects. The change occurs with the catalog update and does not require function level activation. For more information, see Consistent DSSIZE records in Db2 catalog tables for UTS and LOB objects.
- Proceed through the remaining Db2 installation CLIST panels, and wait for the Db2 installation CLIST to tailor the jobs for the activation process. The output data set contains the tailored jobs for the activation process. For more information, see The Db2 installation CLIST panel session.
- Ensure that no incompatible applications will interfere with the catalog update. For details, see Identifying applications that are incompatible with catalog updates.
- Update the catalog and verify the changes for function level 508 by completing the following steps. If the Db2 catalog is already at the catalog level required for the function level being activated, you can skip this step.
-
Run the DSNTIJIC job to take an image copy of the Db2 catalog and directory.
-
Run the tailored DSNTIJTC job, or run the CATMAINT utility with LEVEL V13R1M508, to update the catalog to the appropriate catalog level.
If multiple catalog updates are required, the CATMAINT job processes each update in sequential order. If a later update in the sequence fails, the previous successful updates do not roll back, and the catalog level remains at the highest level reached. If that occurs, you can correct the reason for the failure and resubmit the same CATMAINT job.
For information about the changes to the catalog, see Catalog changes in Db2 13.
- If the CATMAINT utility jobs from the previous step placed any altered Db2 catalog objects in REORG-pending (AREO*) advisory status, run the REORG utility for those objects.
- Run the generated DSNTIJX2 job to run the CHECK INDEX utility for Db2 catalog and directory indexes for new objects created in Db2 13.
-
- Customize and execute sample job DSNTIJCU to reformat the BSDS to support the increase in the number of active logs from 93 to 1000.
- Check that Db2 is ready for function level activation by issuing the following ACTIVATE command with the TEST option:
Db2 issues message DSNU757I to indicate the results. For more information, see Testing Db2 function level activation.-ACTIVATE FUNCTION LEVEL (V13R1M508) TEST - Run the tailored DSNTIJAF job, or issue the following ACTIVATE command:
-ACTIVATE FUNCTION LEVEL (V13R1M508) -
If you are ready for applications to use new SQL capabilities in this function level, rebind the applications at the equivalent application compatibility level for higher. For more information, see the following topics:
- V13R1Mnnn application compatibility levels
- APPLCOMPAT levels in Db2 13
- Controlling the Db2 application compatibility level
Optionally, when you are ready for all applications to use the new capabilities of the target function level, you can run the following jobs:- Run DSNTIJUZ to modify the subsystem parameter module with the APPLCOMPAT value that was specified on panel DSNTIP00.
- Run DSNTIJOZ job to issue SET SYSPARM command to bring the APPLCOMPAT subsystem parameter changes online.
- Run DSNTIJUA job to modify the Db2 data-only application defaults module with the SQLLEVEL value that was specified on panel DSNTIP00.