IBM Support

Why a tablespace is being marked offline during rollfowrad, after a DB2 database restore is done

Technical Blog Post


Abstract

Why a tablespace is being marked offline during rollfowrad, after a DB2 database restore is done

Body

One reason  why a tablespace might get marked  offline after a  db2 database restore might be due to  issues with tablespace container  filesystem or,  anything  related to access to filesystem containing containers of the tablespace.  For this kind of reason  it  will show I/O  messages  in the db2diag.log.  This can happen both during restore as well as during rollforward.

But,  another common reason why a tablesapce get marked offline during rollforward could be due to the fact while running of the backup of that specific image there might be a  LOAD  job running in the source database with COPY YES option.  When load copy  is used it's important to preserve the load copy files to use those  during any rollforward  using the logs from the time of the running of the  source load job.

When COPY YES option is used the load don't log the majority of  transaction, instead rely on the load copy files for recovery.

So,  if  a  rollforward is run after restore  using the same set of log files it's important to  provide the load copy backup files during the running of the rollforward.

 

In summary,   to use any transaction log file which is saved during a time period when a load with COPY YES was run, it's  important to preserve the  load copy files from that time  as those will be needed  along with  the transaction log files  to perform  any recovery  from that period of time.

 

An,  example,

$ db2 "rollforward database MYDB to end of logs overflow log path (/mypath/logs) noretrieve "
SQL3799W  Load recovery for table "MYTAB" at time "2016040317290" on
node "0" is pending due to warning "-2036" with additional information
"/DIR1/DIR2/CopyLoad/MYDB1.".
Do you want to continue(c), terminate this device only(d), abort the utility(t) ? (c/d/t) c
SQL3799W  Load recovery for table "MYTAB" at time "2016040317290" on
node "0" is pending due to warning "-2036" with additional information
"/DIR1/DIR2/CopyLoad/MYDB1.".
Do you want to continue(c), terminate this device only(d), abort the utility(t) ? (c/d/t) t
SQL1271W  Database "MYDB" is recovered but one or more table spaces are
offline on members or nodes "0".
$ db2 "rollforward database MYDB stop"

SQL1271W  Database "MYDB" is recovered but one or more table spaces are
offline on members or nodes "0".

 

Before running the rollforward please put the load copy files from source place to the place where rollforward is being run  under "/DIR1/DIR2/CopyLoad/MYDB1"

 

[{"Business Unit":{"code":"BU029","label":"Data and AI"}, "Product":{"code":"SSEPGG","label":"DB2 for Linux- UNIX and Windows"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":""}]

UID

ibm11140772