Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to restore, but skip the rollforward?

Status
Not open for further replies.

ddiamond

Programmer
Apr 22, 2005
918
US
I just finished a db2 8.1 admin class. In class when we were doing backups and restores, somehow my log files vanished. As a result the rollforward failed leaving the database in an invalid state. My instructor was not able to figure out how to skip the rollforward and put the database back into a valid state. Does anyone know how I could have skipped the rollforward? It would be handy to know in case this ever happened in production.
 
To skip rollforward during restore:
db2 restore db <db_name> from <backup_path> without rolling forward with prompting

After you did a restore, did you do the following?
db2 rollforward to end of logs and stop

When the database is restored, the log files are deleted. After 1st connect, the logfiles are created[based on logprimary parameter].
 
Thanks for the tip, rbod. Now I understand what happened. The lab exersize had us first restore the database and then issue a rollforward command. That much had worked fine. Then it had us restore the database to a different database using the same backup file and then rollforward. This rollforward had failed because the log files had been deleted after the first restore. But it sounds like the "without rolling forward" clause would have solved the problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top