epcim
10/20/2015 - 10:31 AM

db2-restore.howto.md

DB2 Restore procedure - example

Create empty db

db2 create database wmsdbl5 using codeset UTF-8 territory US
db2set db2codepage=1208 -g

Restore action examples

db2 restore db WMSDBL from . into WMSDBL5 taken at 2006-04-02-04.00.00.000
db2 restore db WMSDBL from .  taken at 2006-04-02-04.00.00.000 into  WMSDBL5
db2 restore db WMSDBL from .  taken at 2006-04-02-04 into  WMSDBL5
db2 restore db WMSDBL from .  taken at 2006-04-02 into  WMSDBL5

Roll forward

db2 rollforward db WMSDBL5 to 2006-04-07-03.16.28.000000 and complete
db2 rollforward db sample to end of logs and complete
db2 rollforward db WMSDBL5 to end of logs and complete
db2 rollforward db WMSDBL5 to end of logs and complete overflow log path (./)
db2 rollforward db WMSDBL5 to end of logs and complete overflow log path ./
db2 rollforward db WMSDBL5 to end of logs and complete overflow log path .
db2 "rollforward db WMSDBL5 to end of logs and complete overflow log path ."
db2 "rollforward db WMSDBL5 to end of logs and complete overflow log path (/.)"
cd ..
db2 "rollforward db WMSDBL5 to end of logs and complete overflow log path (./NODE0000)"
db2 "rollforward db WMSDBL5 to end of logs and complete overflow log path (NODE0000)"
cd NODE0000/
db2 "rollforward db WMSDBL5 to end of logs and complete overflow log path (.)"
db2 connect to WMSDBL5
db2 list tablest 
db2 list tables