DB2 - Problem description
Problem IC69166 | Status: Closed |
When using Infinite Logging, the only copy of an active log file can be pruned | |
product: | |
DB2 FOR LUW / DB2FORLUW / 950 - DB2 | |
Problem 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. | |
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. * **************************************************************** | |
Local Fix: | |
available fix packs: | |
DB2 Version 9.5 Fix Pack 7 for Linux, UNIX, and Windows | |
Solution | |
Problem was first fixed in DB2 UDB Version 9.5 Fix Pack 7 | |
Workaround | |
not known / see Local fix | |
BUG-Tracking | |
forerunner : APAR is sysrouted TO one or more of the following: IC71752 IC71753 follow-up : | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 11.06.2010 15.11.2010 15.11.2010 |
Problem solved at the following versions (IBM BugInfos) | |
9.5.FP7 | |
Problem solved according to the fixlist(s) of the following version(s) | |
9.1.0.7 | |
9.5.0.7 |