Is it possible to Apply DB2 9.5 logs files from Production site to DR site? Or do I have to do Backup/Restore and rollforward ...?

I copied log files from production site to DR and issued the following command:

rollforward db DBNAME to end of logs and stop overflow log path (/home/db2inst1/logs) noretrieve

Got the error:

DB is not in Rollforward Pending

  • If you send the logs to the DR site and you "open" the database (stop roll forwarding), check your DB2 license, because in this case you will need another one. You cannot have two active databases in two different machines with just one license. – AngocA May 14 '14 at 7:16

As the error says, the database must be in the Rollforward pending state for you to use the rollforward command. However, while in this state the database is not accessible.

You don't explain what it is that you are trying to achieve so it's hard to provide a precise solution. If this is a one-time activity you will need to restore your DR database from a backup and run rollforward. If your intent is to keep the DR database up to date on an ongoing basis, consider setting up HADR, which automates the process of transferring and applying logged changes to the standby database.

|improve this answer|||||
  • I wanted a temporary way to keep our DR machine synced with PR machine until setting up HADR :) So I thought maybe I can rollforward DB2 and apply logs manually... – Mehdi Jun 8 '14 at 6:29
  • In that case you have to keep your pseudo-DR database in the rollforward pending mode. Issue the rollforward command without specifying the complete (or stop) keyword. – mustaccio Jun 8 '14 at 13:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.