IBM Support

IC69166: When using Infinite Logging, the only copy of an active log file can be pruned

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • db2 prune history and delete deletes first active log.
    
    db2start
    db2 -v " drop db INFLOG"
    db2  -v "create db INFLOG"
    db2 -v " connect to  INFLOG"
    db2 -v " update db cfg for INFLOG using LOGARCHMETH1
    DISK:/home/db2inst1/ARCHLOC"
    db2 -v "terminate"
    db2 -v "backup db INFLOG to /dev/null"
    db2 -v " update db cfg for INFLOG using SOFTMAX 1"
    db2 -v " update db cfg for INFLOG using LOGPRIMARY 2 LOGSECOND
    -1 LOGFILSIZE 4"
    db2 get db cfg for INFLOG |grep -i LOG
    db2 -v "terminate"
    db2 -v "connect to INFLOG"
    db2 -v "create table test1 (I int, v1 varchar(200), v2
    varchar(200), v3 varchar(200))"
    
    db2 connect to INFLOG; db2 +c delete from test1 where i = 2; cd
    ; db2 get db cfg for INFLOG |grep -i FIRST;   loop_insert3.pl
    
    Where loop_insert3.pl is a perl script that loads data into a
    table called test1 and causes log files to get generated and
    wait till they get deleted from the active log path and are only
    existing in the archive log path (prove with ls)
    
     ls /home/db2inst1/db2inst1/NODE0000/SQL00001/SQLOGDIR/
    and
     ls /home/db2inst1/ARCHLOC/db2inst1/INFLOG/NODE0000/C0000000
    
    Then from different window
    db2 connect to INFLOG; db2 prune history 20101007 with force
    option and delete
    
    then do the ls to confirm the missing files that are active logs
    and now no longer exist anywhere
    
    ls /home/db2inst1/db2inst1/NODE0000/SQL00001/SQLOGDIR/
    and
    ls /home/db2inst1/ARCHLOC/db2inst1/INFLOG/NODE0000/C0000000
    
    In cases where infinite logging is used, the active log can be
    archived to the archive path and removed from the active log
    path.
    If a prune is chosen with the delete option and a timestamp more
    recent than the active log is chosen, the active log would be
    deleted making it impossible to rollback the transaction and
    causing a potential database corruption.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * db2 prune history and delete deletes first active            *
    * log.db2startdb2 -v " drop db INFLOG"db2  -v "create db       *
    * INFLOG"db2 -v " connect to  INFLOG"db2 -v " update db cfg    *
    * for INFLOG using LOGARCHMETH1DISK:/home/db2inst1/ARCHLOC"db2 *
    * -v "terminate"db2 -v "backup db INFLOG to /dev/null"db2 -v " *
    * update db cfg for INFLOG using SOFTMAX 1"db2 -v " update db  *
    * cfg for INFLOG using LOGPRIMARY 2LOGSECOND-1 LOGFILSIZE      *
    * 4"db2 get db cfg for INFLOG |grep -i LOGdb2 -v               *
    * "terminate"db2 -v "connect to INFLOG"db2 -v "create table    *
    * test1 (I int, v1 varchar(200), v2varchar(200), v3            *
    * varchar(200))"db2 connect to INFLOG; db2 +c delete from      *
    * test1 where i = 2;cd; db2 get db cfg for INFLOG |grep -i     *
    * FIRST;  loop_insert3.plWhere loop_insert3.pl is a perl       *
    * script that loads data intoatable called test1 and causes    *
    * log files to get generated andwait till they get deleted     *
    * from the active log path and areonlyexisting in the archive  *
    * log path (prove with ls)ls                                   *
    * /home/db2inst1/db2inst1/NODE0000/SQL00001/SQLOGDIR/andls     *
    * /home/db2inst1/ARCHLOC/db2inst1/INFLOG/NODE0000/C0000000Then *
    * from different windowdb2 connect to INFLOG; db2 prune        *
    * history 20101007 with forceoption and deletethen do the ls   *
    * to confirm the missing files that are activelogsand now no   *
    * longer exist anywherels                                      *
    * /home/db2inst1/db2inst1/NODE0000/SQL00001/SQLOGDIR/andls     *
    * /home/db2inst1/ARCHLOC/db2inst1/INFLOG/NODE0000/C0000000In   *
    * cases where infinite logging is used, the active log         *
    * canbearchived to the archive path and removed from the       *
    * active logpath.If a prune is chosen with the delete option   *
    * and a timestampmorerecent than the active log is chosen, the *
    * active log wouldbedeleted making it impossible to rollback   *
    * the transaction andcausing a potential database corruption.  *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 UDB version 9.5 fix pack 7.                   *
    ****************************************************************
    

Problem conclusion

  • Problem was first fixed in DB2 UDB Version 9.5 Fix Pack 7
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC69166

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    950

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2010-06-11

  • Closed date

    2010-11-15

  • Last modified date

    2010-11-15

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

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

    IC71752 IC71753

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • R950 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":"9.5","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
15 November 2010