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.

Unanswered: Automatic restore

DB2 9.5 on Windows. I periodically restore our Production Datamart Database to a Development area and now I would like ot do this on a scheduled (once a week basis) and automate it. My problem is trying to firgure out how to do the restore when the backup filename changes everytime??? I was planning on using the task center and scheduling a one-off backup that I would use for my restore.. BUt I'm not sure how to write the restore command since the backup filename changes everytime/??? anyone have any ideas??

If you create a separate directory which only contains one backup file for a particular database, you can omit the "taken at" clause. I have done this by using a script that always moves the existing backup to an archive backup directory right before taking the latest backup, so that my directory only contains one backup per database, and then I can automate the restore.