Start of change

-ACTIVATE command (Db2)

The Db2 command ACTIVATE enables use of new capabilities and enhancements at the specified function level, and lower function levels. Use of the ACTIVATE command to activate function level 500 or higher also marks the boundary between the ability to coexist with or fallback to Db2 11.

Important: Start of changeBefore you activate function level 500 or higher for the first time, read Activating Db2 12 new function at migration.End of change

On successful completion of the ACTIVATE command, the specified function level and all lower function levels become available for use. Use of the ACTIVATE command requires that the data sharing group contains no active Db2 11 members.

Important: Do not attempt to start Db2 at any code level that is lower than the highest ever activated function level, even at the lower star (*) function level. Activate a function level only after you are satisfied that Db2 can continue to run at the required code level.

Abbreviation:-ACTIVATE FUNCTION LEVEL(function-level)

Environment

The ACTIVATE command can be issued from a z/OS® console, a DSN session under TSO, a Db2I panel (DB2 COMMANDS), an IMS or CICS® terminal, or a program using the instrumentation facility interface (IFI).

Tip: Start of changeYou can tailor and run the DSNTIJAF job to issue the ACTIVATE commands. For more information, see Activating Db2 12 function levels.End of change

Data sharing scope: Group

Authorization

To execute the ACTIVATE command, you must use a privilege set that includes the installation SYSADM or installation SYSOPR authority. The installation SYSOPR authority enables you to install or migrate Db2 without access to user objects.

Read syntax diagramSkip visual syntax diagramACTIVATE FUNCTION LEVEL(function-level)TEST

Option descriptions

function-level
The function level to activate in the subsystem or data sharing group. The format is VvvRrMmmm, where vv is the version, r is the release, and mmm is the modification level. For example, V12R1M510 identifies function level 510. For a list of all available function levels in Db2 12, see Db2 12 function levels.

Activation of a function level succeeds only if the subsystem or every active member in the data sharing group runs at the required code level.

You can specify a higher or lower function level than the current function level. If a lower function level is specified, the star (*) function level is activated in the subsystem or data sharing group. For more information about activating star (*) function levels, see Responding to problems after function level activation.

A DSNU757I message indicates successful completion of the command, or the reason why the command was not successful.

TEST
The specified function level is not activated. Instead, the DSNU757I message output indicates the eligibility for the activation of the specified function-level of the subsystem or data sharing group. The message output displays information about any member that prevents activation of the specified function level for the group. The message output displays code, catalog, and function level information for each subsystem or group member.
Important: When you check the readiness of your Db2 environment for a function level, be careful to specify the TEST option with the ACTIVATE command. After any successful completion of the ACTIVATE command without TEST, Db2 must remain at the higher code level. That is, you cannot remove any PTFs that the code level requires, even at a lower star (*) function level. You can also use the DISPLAY GROUP command to determine the highest function level that your Db2 environment supports, without risk of inadvertent function level activation. For more information, see Determining the Db2 code level, catalog level, and function level.

Output

Message DSNU757I indicates successful completion of the command, or the reason why the command was not successful.

Start of changeIf a different function level is activated, Db2 also issues message DSNG014I to the console and updates the SYSLEVELUPDATES catalog table.End of change

Usage notes

The availability of new function depends on the type of enhancement, the activated function level, and the application compatibility levels of applications. In the initial Db2 12 release, most new capabilities are enabled only after the activation of function level 500 or higher.
Virtual storage enhancements
Virtual storage enhancements become available at the activation of the function level that introduces them or higher. Activation of function level 100 introduces all virtual storage enhancements in the initial Db2 12 release. That is, activation of function level 500 introduces no virtual storage enhancements.
Subsystem parameters
New subsystem parameter settings are in effect only when the function level that introduced them or a higher function level is activated. Many subsystem parameter changes in the initial Db2 12 release take effect in function level 500. For more information about subsystem parameter changes in Db2 12, see Subsystem parameter changes in Db2 12.
Optimization enhancements
Optimization enhancements become available after the activation of the function level that introduces them or higher, and full prepare of the SQL statements. When a full prepare occurs depends on the statement type:
  • For static SQL statements, after bind or rebind of the package
  • For non-stabilized dynamic SQL statements, immediately, unless the statement is in the dynamic statement cache
  • For stabilized dynamic SQL statements, after invalidation, free, or changed application compatibility level
Activation of function level 100 introduces all optimization enhancements in the initial Db2 12 release. That is, function level 500 introduces no optimization enhancements.
SQL capabilities
New SQL capabilities become available after the activation of the function level that introduces them or higher, for applications that run at the equivalent application compatibility level or higher. New SQL capabilities in the initial Db2 12 release become available in function level 500 for applications that run at the equivalent application compatibility level or higher. You can continue to run SQL statements compatibly with lower function levels, or previous Db2 releases, including Db2 11 and DB2® 10. For details, see Application compatibility levels in Db2 12
Trace information for data sharing members
When this command with group scope is issued in a Db2 data sharing member, it also runs on all other active members. IFICID 090 trace records for other group members can show that the same command was issued by the SYSOPR authorization ID from the 016.TLPKN5F correlation ID, in addition to the trace records from the member where the original command was issued. See Command scope in Db2 data sharing.

Examples

The following examples demonstrate use of the ACTIVATE command to test and activate Db2 12 function levels.

Example: Testing function level activation
Begin general-use programming interface information.The following command checks whether the subsystem or data sharing group is ready for the specified function level.
-ACTIVATE FUNCTION LEVEL (V12R1M500) TEST
The DSNU757I message indicates whether the group is ready for the specified level. Because TEST is specified, the output includes detailed information about each active member of the data sharing group. In this example, all of the members are at the required code level and catalog level so that function level 500 can be activated.
DSNU757I  -DB2A DSNUGCCA                                                                 
*** BEGIN ACTIVATE FUNCTION LEVEL (V12R1M500)                                            
                GROUP ELIGIBLE FOR FUNCTION LEVEL (V12R1M500)                            
                CATALOG LEVEL(V12R1M500)                                                 
                CURRENT FUNCTION LEVEL(V12R1M100)                                        
                HIGHEST ACTIVATED FUNCTION LEVEL (V12R1M100)                              
                HIGHEST POSSIBLE FUNCTION LEVEL(V12R1M500)                               
--------------------------------------------------------------------
DB2          CURRENT     CAPABLE FUNCTION LEVELS                    
MEMBER   ID  CODE-LEVEL  LOWEST      HIGHEST     STATUS             
-------- --- ----------  ----------  ----------  -------------------
DB2A       1 V12R1M500   V12R1M100   V12R1M500   ELIGIBLE           
DB2B       2 V12R1M500   V12R1M100   V12R1M500   ELIGIBLE           
DB2C       3 V12R1M500   V12R1M100   V12R1M500   ELIGIBLE           
--------------------------------------------------------------------
DSN9022I  -DB2A DSNZACMD '-ACTIVATE FUNC' NORMAL COMPLETION
End general-use programming interface information.
Example: Activating function level 500
Begin general-use programming interface information.The following command attempts to activate function level 500.
-ACTIVATE FUNCTION LEVEL (V12R1M500)
The DSNU757I message indicates that function level 500 is successfully activated for the data sharing group.
DSNU757I  -DB2A DSNUGCCA                                                   
*** BEGIN ACTIVATE FUNCTION LEVEL (V12R1M500)                              
                FUNCTION LEVEL (V12R1M500) SUCCESSFULLY ACTIVATED          
                CATALOG LEVEL(V12R1M500)                                   
                CURRENT FUNCTION LEVEL(V12R1M500)                          
                HIGHEST ACTIVATED FUNCTION LEVEL (V12R1M100)                
                HIGHEST POSSIBLE FUNCTION LEVEL(V12R1M500)               
DSN9022I  -DB2A DSNZACMD '-ACTIVATE FUNC' NORMAL COMPLETION
End general-use programming interface information.
Example: Activating function level 502
The following command attempts to activate function level 502.The DSNU757I message indicates that function level 502 is successfully activated for the data sharing group.
DSNU757I  -DB2A DSNUGCCA                                                   
*** BEGIN ACTIVATE FUNCTION LEVEL (V12R1M502)                              
                FUNCTION LEVEL (V12R1M502) SUCCESSFULLY ACTIVATED          
                CATALOG LEVEL(V12R1M502)                                   
                CURRENT FUNCTION LEVEL(V12R1M500)                          
                HIGHEST ACTIVATED FUNCTION LEVEL (V12R1M500)                
                HIGHEST POSSIBLE FUNCTION LEVEL(V12R1M502)               
DSN9022I  -DB2A DSNZACMD '-ACTIVATE FUNC' NORMAL COMPLETION
Example: Attempting to activate a function level with ineligible members
Begin general-use programming interface information.For example the following command attempts to activate the specified function level.
-ACTIVATE FUNCTION LEVEL (V12R1M500)
The DSNU757I message indicates that the group is not yet ready for the activation of function level 500. The example subsystem is being migrated from Db2 11. One or more members is not at the required code level. Start of change
DSNU757I  -DB2A DSNUGCCA                                                       
*** BEGIN ACTIVATE FUNCTION LEVEL (V12R1M500)                                  
                GROUP NOT ELIGIBLE FOR FUNCTION LEVEL (V12R1M500)              
                MEMBER(S) NOT STARTED WITH REQUIRED CODE LEVEL                 
                CATALOG LEVEL(V12R1M500)                                       
                CURRENT FUNCTION LEVEL(V12R1M100)                              
                HIGHEST ACTIVATED FUNCTION LEVEL (V12R1M100)                    
                HIGHEST POSSIBLE FUNCTION LEVEL(V12R1M100)
--------------------------------------------------------------------
DB2          CURRENT     CAPABLE FUNCTION LEVELS                    
MEMBER   ID  CODE-LEVEL  LOWEST      HIGHEST     STATUS             
-------- --- ----------  ----------  ----------  -------------------
DB2A       1 V12R1M500   V12R1M100   V12R1M500   ELIGIBLE           
DB2B       2 V11R1M500   V11R1M500   V12R1M100   NOT ELIGIBLE           
DB2C       3 V12R1M500   V12R11M100   V12R1M500   ELIGIBLE           
--------------------------------------------------------------------                      
DSN9022I  -DB2A DSNZACMD '-ACTIVATE FUNC' NORMAL COMPLETION
End of changeEnd general-use programming interface information.
Example: Activating a lower (*) function level
Begin general-use programming interface information.Assuming that the subsystem or data sharing group is at function level 500, the following command reverts the subsystem or group to function level 100*
-ACTIVATE FUNCTION LEVEL (V12R1M100)
The DSNU757I message indicates that function level 100* is activated.
DSNU757I  -DB2A DSNUGCCA                                                   
*** BEGIN ACTIVATE FUNCTION LEVEL (V12R1M100)                              
                FUNCTION LEVEL (V12R1M100) SUCCESSFULLY ACTIVATED          
                CATALOG LEVEL(V12R1M500)                                   
                CURRENT FUNCTION LEVEL(V12R1M100*)                         
                HIGHEST ACTIVATED FUNCTION LEVEL (V12R1M500)                
                HIGHEST POSSIBLE FUNCTION LEVEL(V12R1M500)                 
DSN9022I  -DB2A DSNZACMD '-ACTIVATE FUNC' NORMAL COMPLETION
End general-use programming interface information.
End of change