If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
"Cold backup" is not a standard DB2 term, so, assuming that you meant offline backup, the answer should be "yes". However, I think you will still need to roll forward the database, which requires it be in archive logging mode and the logs being available.
I'm told we are running DB2 9.5.2. I need to restore several tablespaces from the image. I don't know if the image is offline and logging mode. How to check?
You can use the db2ckbkp command to check if your image is offline or online. If you're restoring a set of tablespaces into a different db (different from the one this backup image was created from), then you have to use the rebuild option on the restore command. If you're restoring a set of tablespaces into the same database, then db has be enabled for archival logging (as Nick had mentioned). The restored tablespaces will be in the rollforward pending state and you need to have the logs in order to rollforward them.
I think you're restoring into a different db/env, so you'll need to use the rebuild option. I did a quick test to show how this is done. See if this is something you can use (play with it in some test env first). I'm attaching it here.
In my example, I used a non-automatic storage tablespace (testts). If I create testts using automatic storage, then the restore command will be different:
bkogan@p6db2serv /home/bkogan/TEST > db2 "restore db test rebuild with tablespace (syscatspace, testts) on /home/bkogan/testts2 into test2"
DB20000I The RESTORE DATABASE command completed successfully.