IBM Support

IT35057: WHEN A USER ID WITH INSUFFICIENT PRIVILEGE ATTEMPTS TO RUN REORGFROM WITHIN A STORED PROCEDURE, THE STORED PROCEDURE RETURNS RC

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When the same user attempts to execute runstats from within the
    store procedure, it correctly returns an error.
    repro steps:
    ---------------
    
    db2 "create procedure jchwong.test3() begin declare reorg_str
    varchar(500); set reorg_str = 'REORG TABLE DB2INST1.EMPLOYEE';
    call sysproc.admin_cmd(reorg_str); commit; end--;"
    
    db2 "call jchwong.test3()"
    
     Return Status = 0
    
    The same test for runstats generates expected results (i.e.
    error):
    
    db2 "create procedure jchwong.test2() begin declare runstats_str
    varchar(500); set runstats_str = 'RUNSTATS ON TABLE
    DB2INST1.EMPLOYEE'; call sysproc.admin_cmd(runstats_str);
    commit; end--;"
    
    db2 "call jchwong.test2()"
    SQL2311N  The user does not have the authority to run the
    RUNSTATS utility on
    table "DB2INST1.EMPLOYEE ".
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to Db2 version 11.1.4.6 or later                     *
    ****************************************************************
    

Problem conclusion

  • First fixed in Db2 version 11.1.4.6
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT35057

  • 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

    2020-11-25

  • Closed date

    2021-03-31

  • Last modified date

    2021-03-31

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

    IT09517

  • 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":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"DB2 for Linux- UNIX and Windows"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.1","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
04 May 2022