简体   繁体   English

db2 前滚命令 output 在非目录分区的“处理的日志文件”列中显示“-”

[英]db2 rollforward command output show '-' in “Log FIles processed” column for non-Catalog partitions

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:应用日志之前的 state 似乎是:

  1. For NODE0000, the log number was on: S0001421.LOG对于 NODE0000,日志号为:S0001421.LOG
  2. For NODE0001, the log number was on: S0004725.LOG对于 NODE0001,日志号为:S0004725.LOG
  3. For NODE0002, the log number was on: S0004582.LOG对于 NODE0002,日志号为:S0004582.LOG

Then the user provided the logs with below range:然后用户提供了以下范围的日志:

  1. For NODE0000: S0001421.LOG - S0001423.LOG对于 NODE0000:S0001421.LOG - S0001423.LOG
  2. For NODE0001: S0004725.LOG - S0004726.LOG对于 NODE0001:S0004725.LOG - S0004726.LOG
  3. For NODE0002: S0004582.LOG - S0004583.LOG对于 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.如果将日志应用于数据库,我不确定为什么 NODE 1 和 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?我可以看到分区 1 和分区 2 中的日志编号更改(“要读取的下一个日志”列已更新)但 output 没有显示分区 1 和分区 2 的“处理的日志文件”列。可能是什么原因?

` `

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.

What is the Db2 level you are using?你用的Db2是什么级别? Are the two environments using different Db2 levels?这两个环境是否使用不同的 Db2 级别?

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.由于您提到 db2 级别相同,请参阅以下附加信息:报告的“已处理的日志文件”可能比实际处理的要少。 The true indication of what has been recovered is the "Last committed transaction" timestamp.已恢复内容的真正指示是“最后提交的事务”时间戳。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM