Results 1 to 3 of 3

Thread: RESTORE scripts

  1. #1
    Join Date
    May 2004
    Location
    Bordentown, NJ
    Posts
    27

    Unanswered: RESTORE scripts

    Does anyone have a sample script that restores a full-image copy from one DB to a different DB?

  2. #2
    Join Date
    Aug 2003
    Posts
    68
    Quote Originally Posted by ckintner
    Does anyone have a sample script that restores a full-image copy from one DB to a different DB?

    I don't have a script - but I just copy the backup image, and the archive logs to the new dbserver - and run the following cmds:

    db2 restore database <dbname> from <path to bkup image>

    db2 rollforward database <dbname> to end of logs

  3. #3
    Join Date
    Jul 2003
    Location
    Austin, TX, USA
    Posts
    278

    Script

    Hi,

    Please find attached a script that helps to do a redirected restore.

    The sequence is as follows: - RENAME THE RESTORE.TXT TO RESTORE.BAT AND EXECUTE. (PLEASE MODIFY AS PER YOUR ENVIRONMENT)

    Once this execution is over then you need to copy the log files to the SQLOGDIR

    db2 rollforward database <dbname> to end of logs and complete
    (This generally gives an error asking for next logfile and stops processing)

    db2 rollforward stop. (This completes the processing)

    In case you don't need to have the new database in log archiving mode then you will have to update the db cfg parameters logretain off and userexit off.
    Attached Files Attached Files
    HTH

    Nitin

    Ask the experienced rather than the learned

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •