469,950 Members | 1,864 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,950 developers. It's quick & easy.

Rollforward to a particular log

EC
We have two DB2 servers are supposed to be a replicate of each other
with a database of the same name. I want to do a 'db2 db backup
online... include logs' on the first server, and do a 'db2 restore db
to ... logtarget...' on the second server, and then rollforward ONLY
those logs that were included in the backup image. Both databases may
have the same DB id because of previous restores. However, the second
server might have additional transaction logs since the time of the
backup was taken in the first server. How do I make sure the
restore/rollforward to only rollforward the logs that were included in
the first backup image? Will "rollforward...to end of logs..." try to
rollforward the addtional transaction logs?
Thx...Eddie

Dec 22 '06 #1
3 2272
What you'll need to do on the receiving server:
Deactivate the db
Move and delete all the log files in that db's current log path to anoher
path.
When path is empty,
Restore your source image on the target and specify, in the command, that
the logs in the image are to go to: current logpath of the receiving db.

Roll the restored image to the end of the logs and stop.
This will give you, on the target, a db that is at the same point of
consistency that the image you took from the source.

Please note that from now on the receiving db will have its own log chain
and it will "not" be compatible with the existing one that was there before
the you moved and deleted the logs.

I'd highly recommend for you to take a backup of the receiving db and store
it with the logs you moved in order to come back to there if you ever need
to.

Regards, Pierre.

--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
"EC" <ch*******@gmail.coma écrit dans le message de news:
11**********************@a3g2000cwd.googlegroups.c om...
We have two DB2 servers are supposed to be a replicate of each other
with a database of the same name. I want to do a 'db2 db backup
online... include logs' on the first server, and do a 'db2 restore db
to ... logtarget...' on the second server, and then rollforward ONLY
those logs that were included in the backup image. Both databases may
have the same DB id because of previous restores. However, the second
server might have additional transaction logs since the time of the
backup was taken in the first server. How do I make sure the
restore/rollforward to only rollforward the logs that were included in
the first backup image? Will "rollforward...to end of logs..." try to
rollforward the addtional transaction logs?
Thx...Eddie
Dec 23 '06 #2
EC
Thanks, Pierre. How about rollforward to the 'End time' timestamp of
the db backup? Would that ensure me that only the logs included in the
backup would be use? Or would this may potentially rollforward other
logs as well? Thx.
Pierre Saint-Jacques wrote:
What you'll need to do on the receiving server:
Deactivate the db
Move and delete all the log files in that db's current log path to anoher
path.
When path is empty,
Restore your source image on the target and specify, in the command, that
the logs in the image are to go to: current logpath of the receiving db.

Roll the restored image to the end of the logs and stop.
This will give you, on the target, a db that is at the same point of
consistency that the image you took from the source.

Please note that from now on the receiving db will have its own log chain
and it will "not" be compatible with the existing one that was there before
the you moved and deleted the logs.

I'd highly recommend for you to take a backup of the receiving db and store
it with the logs you moved in order to come back to there if you ever need
to.

Regards, Pierre.

--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
"EC" <ch*******@gmail.coma écrit dans le message de news:
11**********************@a3g2000cwd.googlegroups.c om...
We have two DB2 servers are supposed to be a replicate of each other
with a database of the same name. I want to do a 'db2 db backup
online... include logs' on the first server, and do a 'db2 restore db
to ... logtarget...' on the second server, and then rollforward ONLY
those logs that were included in the backup image. Both databases may
have the same DB id because of previous restores. However, the second
server might have additional transaction logs since the time of the
backup was taken in the first server. How do I make sure the
restore/rollforward to only rollforward the logs that were included in
the first backup image? Will "rollforward...to end of logs..." try to
rollforward the addtional transaction logs?
Thx...Eddie
Dec 23 '06 #3
If you deactivated the source db before the backup then rolling forward to
end of logs is the end of the backup time stamp .

If the backup was taken online, then the end of backup timestamp will be in
the history file of that db and you need to roll forward to at leas tha
timestamp.
Note that INCLUDE logs option in the backup will force the current log at
end of backup to be clodsed at that timestamp and that will force that
shortened log to be copied to the backup image target and again you'll have
the logs required. In that case, put only the logs up to and including that
last one shortened one and you'll be fine.
Regards, Pierre.

--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
"EC" <ch*******@gmail.coma écrit dans le message de news:
11**********************@48g2000cwx.googlegroups.c om...
Thanks, Pierre. How about rollforward to the 'End time' timestamp of
the db backup? Would that ensure me that only the logs included in the
backup would be use? Or would this may potentially rollforward other
logs as well? Thx.
Pierre Saint-Jacques wrote:
What you'll need to do on the receiving server:
Deactivate the db
Move and delete all the log files in that db's current log path to anoher
path.
When path is empty,
Restore your source image on the target and specify, in the command, that
the logs in the image are to go to: current logpath of the receiving db.

Roll the restored image to the end of the logs and stop.
This will give you, on the target, a db that is at the same point of
consistency that the image you took from the source.

Please note that from now on the receiving db will have its own log chain
and it will "not" be compatible with the existing one that was there
before
the you moved and deleted the logs.

I'd highly recommend for you to take a backup of the receiving db and
store
it with the logs you moved in order to come back to there if you ever need
to.

Regards, Pierre.

--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
"EC" <ch*******@gmail.coma écrit dans le message de news:
11**********************@a3g2000cwd.googlegroups.c om...
We have two DB2 servers are supposed to be a replicate of each other
with a database of the same name. I want to do a 'db2 db backup
online... include logs' on the first server, and do a 'db2 restore db
to ... logtarget...' on the second server, and then rollforward ONLY
those logs that were included in the backup image. Both databases may
have the same DB id because of previous restores. However, the second
server might have additional transaction logs since the time of the
backup was taken in the first server. How do I make sure the
restore/rollforward to only rollforward the logs that were included in
the first backup image? Will "rollforward...to end of logs..." try to
rollforward the addtional transaction logs?
Thx...Eddie
Dec 23 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Raquel | last post: by
1 post views Thread by Steven | last post: by
1 post views Thread by Juan Norton | last post: by
2 posts views Thread by shenanwei | last post: by
3 posts views Thread by jadionne | last post: by
2 posts views Thread by satish mullapudi | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.