db2 rollforward command output show '-' in "Log FIles processed" column for non-Catalog partitions

1.2k views Asked by At

I have rollforward the database after restore command. Below are the outputs of queries:

  db2 "rollforward db hdpf1 query status"

                                 Rollforward Status

 Input database alias                   = hdpf1
 Number of members have returned status = 3

 Member ID    Rollforward                 Next log             Log files processed        Last committed transaction
              status                      to be read
 -----------  --------------------------  -------------------  -------------------------  --------------------------
           0  DB  pending                 S0001422.LOG                     -              2019-10-22-17.26.46.000000 UTC
           1  DB  pending                 S0004726.LOG                     -              2019-10-22-17.40.25.000000 UTC
           2  DB  pending                 S0004583.LOG                     -              2019-10-22-17.52.59.000000 UTC
db2 "rollforward db hdpf1 to end of logs on all dbpartitionnums OVERFLOW LOG PATH ('/home/db2inst1/logs/db2inst1/HDPF1’)”
 
                                 Rollforward Status
 
Input database alias                   = hdpf1
Number of members have returned status = 3
 
Member ID    Rollforward                 Next log             Log files processed        Last committed transaction
              status                      to be read
-----------  --------------------------  -------------------  -------------------------  --------------------------
           0  DB  working                 S0001423.LOG         S0001422.LOG-S0001422.LOG  2019-10-27-07.32.56.000000 UTC
           1  DB  working                 S0004727.LOG                     -              2019-10-25-03.05.53.000000 UTC
           2  DB  working                 S0004584.LOG                     -              2019-10-25-03.04.32.000000 UTC
 
DB20000I  The ROLLFORWARD command completed successfully.

$ db2_all "db2 get db cfg for hdpf1 | grep -i 'First active log file'"
 
First active log file                                   = S0001421.LOG
db2 get db cfg for ... completed ok
 
First active log file                                   = S0004725.LOG
db2 get db cfg for ... completed ok
 
First active log file                                   = S0004582.LOG
db2 get db cfg for ... completed ok
 

It seems that the state before applying the log was :

  1. For NODE0000, the log number was on: S0001421.LOG
  2. For NODE0001, the log number was on: S0004725.LOG
  3. For NODE0002, the log number was on: S0004582.LOG

Then the user provided the logs with below range :

  1. For NODE0000 : S0001421.LOG - S0001423.LOG
  2. For NODE0001 : S0004725.LOG - S0004726.LOG
  3. For NODE0002 : S0004582.LOG - S0004583.LOG

Provided logs got applied to the database, I am not sure why the column "Log files processed " is blank for NODE 1 and 2.

I can see the log number changes in partition 1 and partition 2 (“Next logs to be read” column has updated) but output didn’t show “Logs files processed” column for partition 1 and partition 2. What could be the possible reason?

`

When i tried for another database, this value got reflected for non-catalog nodes also: `

db2 "rollforward db hdpf2 query status"

                                 Rollforward Status

 Input database alias                   = hdpf2
 Number of members have returned status = 4

 Member ID    Rollforward                 Next log             Log files processed        Last committed transaction
              status                      to be read
 -----------  --------------------------  -------------------  -------------------------  --------------------------
           0  DB  pending                 S0000052.LOG                     -              2019-10-30-07.36.45.000000 UTC
           1  DB  pending                 S0000038.LOG                     -              2019-10-30-07.37.01.000000 UTC
           2  DB  pending                 S0000040.LOG                     -              2019-10-30-07.37.07.000000 UTC
           3  DB  pending                 S0000038.LOG                     -              2019-10-30-07.37.13.000000 UTC


db2 "rollforward db hdpf2 to end of logs on all dbpartitionnums OVERFLOW LOG PATH ('/home/db2inst1/log/HDPF')"

                                 Rollforward Status

 Input database alias                   = hdpf2
 Number of members have returned status = 4

 Member ID    Rollforward                 Next log             Log files processed        Last committed transaction
              status                      to be read
 -----------  --------------------------  -------------------  -------------------------  --------------------------
           0  DB  working                 S0000060.LOG         S0000052.LOG-S0000059.LOG  2019-10-31-10.32.32.000000 UTC
           1  DB  working                 S0000040.LOG         S0000038.LOG-S0000039.LOG  2019-10-30-07.37.01.000000 UTC
           2  DB  working                 S0000042.LOG         S0000040.LOG-S0000041.LOG  2019-10-30-07.37.07.000000 UTC
           3  DB  working                 S0000040.LOG         S0000038.LOG-S0000039.LOG  2019-10-30-07.37.13.000000 UTC

DB20000I  The ROLLFORWARD command completed successfully.

1

There are 1 answers

3
dbdoctor On

What is the Db2 level you are using? Are the two environments using different Db2 levels?

Since you mentioned db2 levels are same, please see following additional info: The "Log files processed" reported can be less than what are really processed. The true indication of what has been recovered is the "Last committed transaction" timestamp.