IT运维管理体系和规范,it运维管理系统介绍
983
2022-10-13
【DB2】ROLLFORWARD DATABASE命令
db2 rollforward db sample to end of logs and complete
db2 rollforward db sample to end of logs and stop
db2 rollforward db sample to end of backup and complete
1. COMPLETE | STOP
Stops the rolling forward of log records, and completes the rollforward recovery process by rolling back any incomplete transactions and turning off the rollforward pending state of the database. This allows access to the database or table spaces that are being rolled forward. These keywords are equivalent; specify one or the other, but not both. The keyword AND permits specification of multiple operations at once; for example, db2 rollforward db sample to end of logs and complete. When rolling table spaces forward to a point in time, the table spaces are placed in backup pending state.
2. NORETRIEVE
If you extracted log files from a database backup, and you plan to run the ROLLFORWARD command with the TO END OF BACKUP clause for that database, use the NORETRIEVE option. The NORETRIEVE option is needed because all the required log files are available and no files need to be retrieved from the archive location. Without using the NORETRIEVE option, some archived log files can be retrieved which are not needed for this rollforward. If the archive locations contain log files from other log chains, the ROLLFORWARD results in SQLCODE -1265.
3.END OF LOGS
Specifies that all committed transactions from all online archive log files listed in the database configuration parameter logpath are to be applied.
If an END OF LOGS rollforward is attempted, you cannot switch to a point-in-time (PIT) rollforward. To rollforward to a PIT when a previous END OF LOGS rollforward is in progress, you must redo the restore and then run the rollforward command.
END OF BACKUP
Specifies that all partitions in the partitioned database, or all members in the DB2 pureScale environment, should be rolled forward to the minimum recovery time.
发表评论
暂时没有评论,来抢沙发吧~