IBM Support

DB2 upgrade from earlier versions to 12.1.3 fails with SQL0805N during SYSPROC.ADMIN_REVALIDATE_DB_OBJECTS

Troubleshooting


Problem

After upgrading DB2 from an earlier version to 12.1.3 on Linux, post‑installation revalidation fails. 

Running the SYSPROC.ADMIN_REVALIDATE_DB_OBJECTS procedure reports missing packages, leaving invalid objects.

Symptom

During execution of the revalidation script (revalidate.sql), the following error is reported:

Command:clpplus -nw openpage/yourpasswordhere@yourdbservernamehere:50000/opx @sql-wrapper revalidate.sql revalidate.log openpage

Count of invalid objects before running Admin_Revalidate_DB_Objects: 7
Attempting to revalidate invalid objects using SYSPROC.Admin_Revalidate_DB_Objects
ERROR near line 56:
SQL0805N Package "NULLID.REVALQ09 0X4141414141474870" was not found.

Additional observations:

  • db2 list packages for schema NULLID | grep REVAL shows only REVALQ08 present.

    $ db2 list packages for schema NULLID | grep REVAL

    REVALQ08    NULLID                SYSIBM               26 Y       0        CS        U

  • db2rbind fails to resolve the error because the missing package does not exist.

     

Cause

  • DB2 12.1.3 introduces a new system package (REVALQ09) required by SYSPROC.ADMIN_REVALIDATE_DB_OBJECTS.
  • On some installations, the bind list files (db2bind.lst, db2clp.lst) are not shipped, so only REVALQ08 is created.
  • Without binding all .bnd files as the instance owner (db2inst1), REVALQ09 is not created in the NULLID collection.
  • Revalidation fails because the procedure attempts to use REVALQ09, which is missing.
  • and also missed grants on explain procedures and tables to application users, so manual grants are required.

 

Environment

Upgrading from earlier versions of Db2 to version 12.1.3

Diagnosing The Problem

  1. Check invalid Objects.

    db2 "SELECT * FROM SYSIBM.SYSINVALIDOBJECTS WHERE OBJECTSCHEMA = 'OPENPAGE'"

    Confirms how many invalid objects exist and their types 

    In this case: 7 invalid objects.

  2. Verify REVAL packages

    db2 list packages for schema NULLID | grep REVAL

    Expected: REVALQ08 and REVALQ09.

    Actual: Only REVALQ08 present → REVALQ09 missing.

  3. Attempt revalidation

    clpplus -nw openpage/yourpasswordhere@yourdbservernamehere:50000/opx @sql-wrapper revalidate.sql revalidate.log openpage

    SQL0805N Package "NULLID.REVALQ09 ..." was not found.

    Confirms that SYSPROC.ADMIN_REVALIDATE_DB_OBJECTS depends on REVALQ09. 

Resolving The Problem

  1. Log in as the instance owner (in this example, db2inst1 is the instance owner and OPX is the database name)

    su - db2inst1
    db2 connect to OPX 

  2. Grant below privileges for the Openpages database user (example here is "openpage")

    db2 GRANT EXECUTE ON SPECIFIC PROCEDURE SYSPROC.EXPLAIN_FROM_SECTION TO USER openpage;
    db2 GRANT EXECUTE ON FUNCTION OPENPAGE.EXPLAIN_GET_MSGS TO USER openpage;

    db2 GRANT ALL ON TABLE openpage.EXPLAIN_INSTANCE TO USER openpage;
    db2 GRANT ALL ON TABLE openpage.EXPLAIN_ACTUALS TO USER openpage;
    db2 GRANT ALL ON TABLE openpage.EXPLAIN_DIAGNOSTIC_DATA TO USER openpage;
    db2 GRANT ALL ON TABLE openpage.EXPLAIN_DIAGNOSTIC TO USER openpage;
    db2 GRANT ALL ON TABLE openpage.EXPLAIN_STREAM TO USER openpage;
    db2 GRANT ALL ON TABLE openpage.EXPLAIN_PREDICATE TO USER openpage;
    db2 GRANT ALL ON TABLE openpage.EXPLAIN_OPERATOR TO USER openpage;
    db2 GRANT ALL ON TABLE openpage.EXPLAIN_OBJECT TO USER openpage;
    db2 GRANT ALL ON TABLE openpage.EXPLAIN_ARGUMENT TO USER openpage;
    db2 GRANT ALL ON TABLE openpage.EXPLAIN_STATEMENT TO USER openpage;
    db2 GRANT ALL ON TABLE openpage.OBJECT_METRICS TO USER openpage;

  3. Navigate to the bind directory

    cd /opt/ibm/db2/V12.1/bnd

  4. Bind standard lists

    db2 bind @db2cli.lst blocking all grant public sqlerror continue
    db2 bind @db2ubind.lst blocking all grant public sqlerror continue

  5. Bind all .bnd files individually

    for f in *.bnd; do
    echo "Binding $f ..."
    db2 bind $f blocking all grant public sqlerror continue
    done

  6. Verify REVAL packages

    db2 list packages for schema NULLID | grep REVAL

  7. Expected output:

    REVALQ08
    REVALQ09

  8. Optional Step: 

    Recompile  packages (in this example, db2inst1 is the instance owner and OPX is the database name and yourpasswordhere is the password)

    Run below from the INSTALL_SCRIPTS/UPGRADE_SCRIPTS directory.

    db2 connect to OPX user openpage using yourpasswordhere 
    db2 -td@ -f pks_OP_CURRENCY_MGR.sql
    db2 -td@ -f pkb_OP_CURRENCY_MGR.sql

  9. Run revalidation script

    clpplus -nw openpage/yourpasswordhere@yourdbservernamehere:50000/opx @sql-wrapper revalidate.sql revalidate.log openpage

  10. Verify invalid objects are cleared

    db2 "SELECT * FROM SYSIBM.SYSINVALIDOBJECTS WHERE OBJECTSCHEMA = 'OPENPAGE'"

    Expected result:

    0 record(s) selected.

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB76","label":"Data Platform"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSPV0L","label":"IBM OpenPages as a Service"},"ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":""}]

Document Information

Modified date:
18 February 2026

UID

ibm17252900