IBM Support

IT21694: DB2 FAILS TO REINITIALIZE THE PL/SQL PACKAGE AFTER RECOMPILATIONOF THE PACKAGE BODY IN AN ORACLE COMPATIBLE DATABASE.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • DB2 fails to do reinitialization of the package after
    recompilation of the PL/SQL package body in an Oracle compatible
    database
    
    Package header / specification
    =======================
    CREATE OR REPLACE PACKAGE TEST_PKG
     IS
      PROCEDURE sp_test;
     END TEST_PKG;
    /
    
    Package body
    ======================================
    CREATE OR REPLACE PACKAGE BODY TEST_PKG
    IS
      -- Package variables
      g_category VARCHAR2(20);
      g_subcategory NUMBER;
      PROCEDURE sp_test
        IS
    
      BEGIN
        dbms_output.put_line('TEST_PKG sp_test g_category:  '||
    g_category);
        dbms_output.put_line('TEST_PKG sp_test g_subcategory:  '||
    g_subcategory);
      END sp_test;
    
      -- Initialization block
      BEGIN
        g_category := 'TEST_PKG';
        g_subcategory := 1;
        dbms_output.put_line('TEST_PKG INIT BLOCK');
      EXCEPTION
       WHEN OTHERS THEN
         dbms_output.put_line('error - '|| sqlerrm);
    END TEST_PKG;
    /
    
    db2 -td/ -f initblockrecompiletest.pks
    DB20000I  The SQL command completed successfully.
    
    db2 -td/ -f initblockrecompiletest.pkb
    DB20000I  The SQL command completed successfully.
    
    db2 call TEST_PKG.sp_test
    
      Return Status = 0
    
    TEST_PKG INIT BLOCK
    TEST_PKG sp_test g_category:  TEST_PKG
    TEST_PKG sp_test g_subcategory:  1
    
    db2 -td/ -f initblockrecompiletest.pkb
    DB20000I  The SQL command completed successfully.
    
    db2 call TEST_PKG.sp_test
    
      Return Status = 0
    
    TEST_PKG sp_test g_category:
    TEST_PKG sp_test g_subcategory:
    

Local fix

  • Disconnecting and reconnecting the current session will reset
    the package state.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to Db2 11.1 Mod 3 Fix Pack 3 or higher               *
    ****************************************************************
    

Problem conclusion

  • First fixed in Db2 11.1 Mod 3 Fix Pack 3
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT21694

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    B10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2017-08-03

  • Closed date

    2018-03-19

  • Last modified date

    2018-03-19

  • APAR is sysrouted FROM one or more of the following:

    IT10121

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • RB10 PSN

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSEPGG","label":"DB2 for Linux, UNIX and Windows"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.1","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
19 March 2018