I have Db2 126.96.36.199 FixPack 17 on AIX using SAP with DB2. we wanted to have a DR site. we are backing our production using TSM. we just restored the filesystem and later the DB2 data on DR site. every thing seemed to work fine. now we want to have online DR, for this we are shipping archive logs from production to DR site. but if we say
db2 rollforward db <dbname> to end of logs and complete
then this DR DB2 starts creating archive logs. but we want to keep shipping archive logs from production to DR, and then again do rollforward. for this reason we tried
after complete we will
db2rfpen on dbname
this command will again bring it in rollforward pending state.
is there any other way that we can do, that archive logs keep shipping and we dont have to keep our db in rollforward pending state. or if we it is not in rollforward pending state, it should not create its own archive logs instead wait for the logs coming from production site.
please advise soon email@example.com
When you rollforward the logs, leave off the "and complete" clause. This is what is taking the database out of a rollforward pending state. You only need this when you are ready to use the database. Just keep shipping the archive logs and rollforward to the end of logs.
I really appreciate, you looking into this matter..I m really happy for that.
you are right, i m aware of this that if i dont put complete clause, it will keep doing.....
but if for some reason we need this DR DB we have to put complete clause. then we will use sap. then if there is no other way, the only other way i have is to restore the full backup again and then again
db2 rollforward db <dbname> to end of logs
and now its again in pending state.
but i was looking for something that i dont have to really restore the whole full backup and instead
use it from the same state. any idea....
You can either have the database as a DR for the production system, where it is in rollforward pending state until a disaster occurs, or you can have a copy of the production system to some point in time as a usable DB. You cannot have both. If you want to use the database, the you cannot keep shipping archive logs to it and applying them.