By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,514 Members | 1,717 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,514 IT Pros & Developers. It's quick & easy.

restore db2 backup with include logs

P: n/a
Hi,
i made an attempt to restore a online backup made with include logs option.
But when i rollforward the db, i can't pout it online because it always ned
log file. I tried the option to rollforward to end of logs and to point in
time.
In the doc, it is said taht with 'include logs', i can restore without any
log file.
Someone know how can i stop the rollforward pending status ?

regards
Nov 12 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Paul:

Can you please answer these questions?

1. When running restore, did you use the [LOGTARGET directory] option
to retrieve the included logs?
2. Did you rollforward using these log files?
3. If you did, then did you atltest rollforward to the minimum PIT
recovery ?

If all of above is true, then you should be able to issue rollforward
complete and bring DB online.

Note:
a. If LOGRETAIN/USEREXIT is enabled, then an ONLINE backup will force a
rollforward.
b. If LOGRETAIN/USEREXIT is enabled, an OFFLINE backup will NOT force
rollforward.

HTH

Vijay

Nov 12 '05 #2

P: n/a

"paul" <no****@nomail.com> wrote in message
news:3810FD4EAD8AD611A50D00805F0DA7FA07C22E2E@DUN-COM-NEWS02...
Hi,
i made an attempt to restore a online backup made with include logs
option.
But when i rollforward the db, i can't pout it online because it always
ned
log file. I tried the option to rollforward to end of logs and to point in
time.
In the doc, it is said taht with 'include logs', i can restore without any
log file.
Someone know how can i stop the rollforward pending status ?

regards

When you include the logs, DB2 only includes the logs active during the
on-line backup. It is not possible to include future logs (created after the
backup) in a backup, since they have not been created yet as of when the
backup is created.

So including the logs in the backup only guarantees that you can restore the
on-line backup without rolling forward (previously you could not even do
that without the logs active during the on-line backup).

As noted by another poster, if you have all the logs created after the
backup on a directory somewhere, you can point to them and roll forward.
Nov 12 '05 #3

P: n/a
Hi
thx for your comments
i missed the logtarget option. I tried with this and it works.
I thought that it was like mssql and we didn't need to issue the rollforward
statement.
I wonder why ibm can't put an option in the 'restore' command to bring
automatically the database online without issuing manually rollforward
in the case the logs are included in the backup image.

regards


"UDBDBA" <vi***********@gmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
Paul:

Can you please answer these questions?

1. When running restore, did you use the [LOGTARGET directory] option
to retrieve the included logs?
2. Did you rollforward using these log files?
3. If you did, then did you atltest rollforward to the minimum PIT
recovery ?

If all of above is true, then you should be able to issue rollforward
complete and bring DB online.

Note:
a. If LOGRETAIN/USEREXIT is enabled, then an ONLINE backup will force a
rollforward.
b. If LOGRETAIN/USEREXIT is enabled, an OFFLINE backup will NOT force
rollforward.

HTH

Vijay

Nov 12 '05 #4

P: n/a
In article <3810FD4EAD8AD611A50D00805F0DA7FA07C2FF02@DUN-COM-NEWS02>,
paul (no****@nomail.com) says...
Hi
thx for your comments
i missed the logtarget option. I tried with this and it works.
I thought that it was like mssql and we didn't need to issue the rollforward
statement.
I wonder why ibm can't put an option in the 'restore' command to bring
automatically the database online without issuing manually rollforward
in the case the logs are included in the backup image.

regards


Check the recover database command
Nov 12 '05 #5

P: n/a
I haven't gotten the chance to play around with inline logs yet. But I am
assuming that as in previous online backups, you still have to rollforward
though logs to cover the time it took to make the backup, so that you would
be consistently at the point the database was at when the backup completed.

"Gert van der Kooij" <ge**@invalid.nl> wrote in message
news:MP************************@news.xs4all.nl...
In article <3810FD4EAD8AD611A50D00805F0DA7FA07C2FF02@DUN-COM-NEWS02>,
paul (no****@nomail.com) says...
Hi
thx for your comments
i missed the logtarget option. I tried with this and it works.
I thought that it was like mssql and we didn't need to issue the
rollforward
statement.
I wonder why ibm can't put an option in the 'restore' command to bring
automatically the database online without issuing manually rollforward
in the case the logs are included in the backup image.

regards


Check the recover database command

Nov 12 '05 #6

P: n/a
Hi Paul ,

In case your logretain is = capture , it worked for me .
restore db MYDB from /home/db2inst1/bck01/savdatabase taken at
20050601020001;

rollforward db MYDB to end of logs and complete overflow log path
(/home/db2inst1/bck01/database/db2inst1/db2inst1/NODE0000/SQL00003/SQLOGDIR);

I tried "rollforward db MYDB to end of logs and complete;" but it
didn't work .

In fact , I don't know why .

Anyway you'll need to try some combination in order to make it work .

Best way the manual and internet :

http://dbforums.com/t670401.html

http://publib.boulder.ibm.com/infoce...e/r0001978.htm

Best of luck ,

Regards ,

Andy the beginner in DB2.

paul a écrit :
Hi,
i made an attempt to restore a online backup made with include logs option.
But when i rollforward the db, i can't pout it online because it always ned
log file. I tried the option to rollforward to end of logs and to point in
time.
In the doc, it is said taht with 'include logs', i can restore without any
log file.
Someone know how can i stop the rollforward pending status ?

regards


Nov 12 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.