Db2 database restoration command 1. the names of the backup database (olddb) and the data to be restored (newdb) are different: db2 restore db olddb into newdb; www.2cto.com 2. multiple backup files exist in the current directory. you need to specify the time for db2 restore db olddb taken at 20120819175932 into newdb; 3. you need to specify the directory of the backup file db2 restore database olddb FROM "/media/olddb.0.db2inst1. node.zip catn=.20120819175932.001 "taken at 20120819175932 INTO newdb; 4. you must specify newdb NEWLOGPATH to the db2 restore database olddb FROM "/media/olddb.0.db2inst1. nodedesk.catndesk.20120819175932.001 "taken at 20120819175932 NEWLOGPATH"/opt/log "WITH 2 buffers buffer 1024 INTO newdb; www.2cto.com 5. 1 ). create the folder mkdir/home/db2inst1/db2space/newdb_sp0; mkdir/home/db2inst1/db2space/newdb_sp1; mkdir/home/db2inst1/db2space/newdb_sp2; mkdir/home/db2inst1/db2space/newdb_sp3; mkdir/home/db2inst1/db2space/newdb_sp4; mkdir/home/db2inst1/db2space/newdb_sp5; mkdir/home/db2inst1/db2space/release; 2 ). add the RESTORE command to redirect without rolling forward db2 restore database olddb FROM "/media/olddb.0.db2inst1. nodeapps.catnapps.20120819175932.001 "taken at 20120819175932 NEWLOGPATH"/opt/log "WITH 2 buffers buffer 1024 INTO newdb redirect without rolling forward; 3 ). SET the TABLESPACE directory set tablespace containers for 0 ignore rollforward container operations using (PATH "/home/db2inst1/db2space/newdb_sp0 "); set tablespace containers for 1 ignore rollforward container operations using (PATH "/home/db2inst1/db2space/newdb_sp1 "); set tablespace containers for 2 ignore rollforward container operations using (PATH "/home/db2inst1/db2space/newdb_sp2 "); set tablespace containers for 3 ignore rollforward container operations using (PATH "/home/db2inst1/db2space/newdb_sp3 "); set tablespace containers for 4 ignore rollforward container operations using (PATH "/home/db2inst1/db2space/newdb_sp4 "); set tablespace containers for 5 ignore rollforward container operations using (PATH "/home/db2inst1/db2space/newdb_sp5 "); set tablespace containers for 6 ignore rollforward container operations using (PATH "/home/db2inst1/db2space/newdb_sp6"); 3 ). resume. pay attention to the olddb restore database olddb CONTINUE; 6. the database is restored and returned to the db2 restore db. Note that it is olddb abort 7. after restoration, if NEWLOGPATH needs to change the db2 update db cfg for newdb using newlogpath/db2/db2inst1/db2logpath db2 update db cfg for newdb using logfilsiz 10001 db2 force applications all; db2stop; db2start; send an email to the lyc557@163.com for help