IBM Support

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

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

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

[{"Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.1"}]

Document Information

Modified date:
01 April 2021