IBM Support

IJ30965: ATTEMPT TO UPDATE DATABASE SCHEMA FAILS WITH "CAN'T CALL METHOD "FETCHALL_HASHREF""

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

  • The update_db_schemas.pl script fails to update the schema and
    produces the following error:
    
    ---snip --
    
    Level: info Msg:
    Executing schema updates from /opt/IBM/netcool/core/precision/sc
    ripts/sql/updates/db2/4.2-fp3.sql
    
    Can't call method
    "fetchall_hashref" on an undefined value at
    /opt/IBM/netcool/core/precision/perl/lib/NCP/DBI_Factory.pm
    line 366, <$fh> line 10.
    
    -- snip---
    
    A similar error is seen
    when attempting to check database access using
    ncp_db_access.pl
    Working with DB2 team we determined that the
    ITNM perl script is not properly handling error
    
    We were able
    to use DB2 event monitor to capture an error from DB2, but it
    appears the perl script (or DBI_Factory module) not able to
    correctly handle the error.
    Can we correct the code so that the
    script captures and produces the database error
    codes?
    
    Replication:
    To replicate the DB2's state :
    
    Assuming
    that you have the same Db2 level as the customer to repro the
    issue you have to run 'db2 drop package NULLID.SQLL9O1N' and
    then run your script. If you have a different Db2 version the
    package name may be different.
    Attempt to run the ncp_db_access
    or update_db_schema perl scripts and you should be met with an
    error with very little explanation of the underlying
    condition.
    To fix this:
    
    
    
     In the client open a Db2 window.
    
    cd to the sqllib/bnd directory. In that directory you will find
    the file db2schema.bnd
     Connect to the database with a userid
    with bindadd authority
     Run this command:
    
    
    
     db2 bind
    db2schema.bnd blocking all grant public sqlerror continue
    
    
    
    
    This command should create the missing package. After this
    run the script again.
    

Local fix

  • Use db2 event monitor to determine the database exceptions and
    take necessary steps to resolve the database errors.
    Then
    attempt the database update schema script again.
    

Problem summary

  • ERROR DESCRIPTION:
    The update_db_schemas.pl script fails to update the schema and
    produces the following error:
    
    ---snip --
    
    Level: info Msg:
    Executing schema updates from /opt/IBM/netcool/core/precision/sc
    ripts/sql/updates/db2/4.2-fp3.sql
    
    Can't call method
    "fetchall_hashref" on an undefined value at
    /opt/IBM/netcool/core/precision/perl/lib/NCP/DBI_Factory.pm
    line 366, <$fh> line 10.
    
    -- snip---
    

Problem conclusion

  • An underlying issue with the database was causing the DB access
    to fail however the script failed to pass on the DB error.
    Script has been updated to pass on the DB error message.
    
    Fix included with ITNM 4.2.0.13 (ITNM 4.2 FixPack 13)
    

Temporary fix

Comments

APAR Information

  • APAR number

    IJ30965

  • Reported component name

    TIV NETWK MGR I

  • Reported component ID

    5724S4500

  • Reported release

    420

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2021-02-22

  • Closed date

    2021-06-08

  • Last modified date

    2021-06-08

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

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

Fix information

  • Fixed component name

    TIV NETWK MGR I

  • Fixed component ID

    5724S4500

Applicable component levels

[{"Line of Business":{"code":"LOB45","label":"Automation"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSSHRK","label":"Tivoli Network Manager IP Edition"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"420"}]

Document Information

Modified date:
31 July 2021