home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Latest versionsfixlist
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

DB2 - Problem description

Problem IC63926 Status: Closed

The Rollforward error message reports an incorrect log number when
archived log files are missing

product:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problem description:
In a specific scenario (please see repro.sh for detail), the 
first attempt of rollforward reports SQL1263N for 
S0000002.LOG.  And the second attempt of rollforward reports 
SQL1263N for S0000127.LOG.  The first and second rollforward 
attempts report different log number errors even the same 
rollforward command. 
 
Rollforwad could search log files in below order: 
  1. ActiveLogPath 
  2. OverFlow LogPath 
  3. ArchiveLogPath 
 
From the results of repro.sh, when customer moves log files 
intentionally for a test purpose, it seems that the first and 
second rollforward attempts do not searh log files in the same 
order. 
 
Problem reproduce steps: 
1.  $ db2start 
2.  modify belows in repro.sh. 
    ----------------------- 
    DBDIR=$HOME/temp/83003 
    ACTLOG=$HOME/temp/actlog 
    ARCLOG=$HOME/temp/arclog 
    BKUP=$HOME/temp/backup 
    ----------------------- 
3.  $ repro.sh 
 
------------------------------------------- 
repro.sh 
------------------------------------------- 
# 
 
DBNAME=P83003 
DBDIR=$HOME/temp/83003 
ACTLOG=$HOME/temp/actlog 
ARCLOG=$HOME/temp/arclog 
BKUP=$HOME/temp/backup 
 
db2 force application all 
db2 deactivate db $DBNAME 
db2 drop db $DBNAME 
 
rm -rf $DBDIR 
rm -rf $ACTLOG 
rm -rf $ARCLOG 
rm -rf $BKUP 
 
echo "\nHit [Enter] key to continue.  Enter any char to cancel." 
read INPUT 
if [ ! -z "$INPUT" ] ; then 
  exit 
fi 
 
mkdir $DBDIR 
mkdir $ACTLOG 
mkdir $ARCLOG 
mkdir $BKUP 
 
db2 create db $DBNAME on $DBDIR 
 
db2 update db cfg for $DBNAME using newlogpath $ACTLOG 
db2 update db cfg for $DBNAME using logfilsiz 100 
db2 update db cfg for $DBNAME using logprimary 100 
db2 update db cfg for $DBNAME using logarchmeth1 disk:$ARCLOG 
db2 backup db $DBNAME to /dev/null 
db2 activate db $DBNAME 
 
db2 connect to $DBNAME 
db2 "create tablespace ts1" 
db2 "create tablespace ts2" 
 
db2 "create table t1 (a int) in ts1" 
db2 "create table t2 (a int) in ts2" 
 
db2 "declare c1 cursor for 
     with temp(a) as ( values(1) union all select a+1 from temp 
where a<1000000) 
     select cast( rand() * 10000 as int) from temp" 
 
db2 "load from c1 of cursor insert into t1" 
db2 "terminate" 
db2 "backup db $DBNAME online to /dev/null" 
 
 
# get database backup 
echo "backup db $DBNAME..." 
db2 "backup db $DBNAME online to $BKUP" 
 
# generate transaction logs 
db2 connect to $DBNAME 
db2pd -d $DBNAME -logs |grep 'Current Log' 
db2 "insert into t2 select * from t1 fetch first 200000 rows 
only" 
db2pd -d $DBNAME -logs |grep 'Current Log' 
 
 
# restore TS2 
db2 terminate 
db2 force application all 
sleep 1 
db2 deactivate db $DBNAME 
db2 "restore db $DBNAME tablespace (TS2) from $BKUP" 
 
# move Archive logs intentionally here 
echo "\nmv Archive logs intentionally here\n" 
mkdir -m 777 $ARCLOG/mv 
mv $ARCLOG/$DB2INSTANCE/$DBNAME/NODE0000/C0000000 $ARCLOG/mv 
 
#ecute Rollforward twice 
echo "\nFirst Rollforward attempt\n" 
ls $ARCLOG/$DB2INSTANCE/$DBNAME/NODE0000/C0000000 $ACTLOG 
db2 "rollforward db $DBNAME query status " 
db2 "rollforward db $DBNAME to end of logs tablespace (TS2)" 
ls $ARCLOG/$DB2INSTANCE/$DBNAME/NODE0000/C0000000 $ACTLOG 
 
echo "\n\n\n\n" 
 
echo "\nSecond Rollforward attempt\n" 
ls $ARCLOG/$DB2INSTANCE/$DBNAME/NODE0000/C0000000 $ACTLOG 
db2 "rollforward db $DBNAME query status " 
db2 "rollforward db $DBNAME to end of logs tablespace (TS2)" 
 
ls $ARCLOG/$DB2INSTANCE/$DBNAME/NODE0000/C0000000 $ACTLOG 
db2 "rollforward db $DBNAME stop tablespace (TS2)" 
ls $ARCLOG/$DB2INSTANCE/$DBNAME/NODE0000/C0000000 $ACTLOG 
 
db2level 
 
# end of shell 
-------------------------------------------
Problem Summary:
See Error description field for more information.
Local Fix:
n/a
available fix packs:
DB2 Version 9.7 Fix Pack 1 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 2 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 3 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 3a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 4 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 5 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 6 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 7 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 8 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 10 for Linux, UNIX, and Windows

Solution
Problem was first fixed in DB2 UDB Version 9.7 FixPack 1.
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
22.10.2009
24.02.2010
24.02.2010
Problem solved at the following versions (IBM BugInfos)
9.7.FP1
Problem solved according to the fixlist(s) of the following version(s)
9.7.0.1 FixList