The backup image file of the DB2 partitioned database is generated through online backup. After the Restoration Operation of the DB2 partitioned database is completed, the database will be in the roll-forward and hold state, you must use the rollback operation to roll back archived logs to cancel the rollback and suspension status to make the database available.
Rollback of the DB2 partitioned database:
Because the Log Path of the new database SAMPNEW does not contain the archive log file under the Log Path of the source SAMPLE database, before the rollback operation, you need to copy the archive log file of the SAMPLE to a specific path, and then use the OVERFLOW option to specify the path when issuing the rollback command, to replace the data recovery Log Path of SAMPNEW to provide the archive log files to be used for rollback.
To find the path for storing the archive logs of the source SAMPLE Database, run the following command:
Db2_all "db2 get db cfg for sample" | grep "Path"
Path to log files =/home/db2inst1/db2inst1/NODE0000/SQL00001/SQLOGDIR/
Path to log files =/home/db2inst1/db2inst1/NODE0001/SQL00001/SQLOGDIR/
Path to log files =/home/db2inst1/db2inst1/NODE0002/SQL00001/SQLOGDIR/
Path to log files =/home/db2inst1/db2inst1/NODE0003/SQL00001/SQLOGDIR/
Assume that the archive log files of each partition are copied to/sampnew, because the rollback command can only be executed on the directory partition, therefore, the command to roll forward to the end of the daily hard disk data recovery log file in the cataloguing partition and end the rollback status should be written as follows:
Db2 "rollforward db sampnew to end of logs and complete overflow log path
/Sampnew/NODE0000/SQL00001/SQLOGDIR,
/Sampnew/NODE0001/SQL00001/SQLOGDIR on dbpartitionnum 1,
/Sampnew/NODE0002/SQL00001/SQLOGDIR on dbpartitionnum 2,
/Sampnew/NODE0003/SQL00001/SQLOGDIR on dbpartitionnum 3,
)"
Note: For partition 0, the "on dbpartitionnum 0" clause cannot be used in the OVERFLOW option; otherwise, the following error occurs:
SQL0104N An unexpected token "on" was found following "<identifier>". Expected tokens may include: ")". SQLSTATE = 42601
The command syntax is incorrect.
Three types of DB2 database backup solutions
DB2 logfilsiz parameter settings
Online Implementation of changing the DB2 page size
Create a DB2 tablespace in windows
Implementation of DB2 string connection