Connecting Tech Pros Worldwide Help | Site Map

restore db2 backup with include logs

paul
Guest
 
Posts: n/a
#1: Nov 12 '05
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


UDBDBA
Guest
 
Posts: n/a
#2: Nov 12 '05

re: restore db2 backup with include logs


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

Mark A
Guest
 
Posts: n/a
#3: Nov 12 '05

re: restore db2 backup with include logs



"paul" <nomail@nomail.com> wrote in message
news:3810FD4EAD8AD611A50D00805F0DA7FA07C22E2E@DUN-COM-NEWS02...[color=blue]
> 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
>[/color]
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.


paul
Guest
 
Posts: n/a
#4: Nov 12 '05

re: restore db2 backup with include logs


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" <vijay.sitaram@gmail.com> wrote in message
news:1118686018.416970.280770@g44g2000cwa.googlegr oups.com...[color=blue]
> 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[/color]


Gert van der Kooij
Guest
 
Posts: n/a
#5: Nov 12 '05

re: restore db2 backup with include logs


In article <3810FD4EAD8AD611A50D00805F0DA7FA07C2FF02@DUN-COM-NEWS02>,
paul (nomail@nomail.com) says...[color=blue]
> 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
>[/color]

Check the recover database command
John Rigler
Guest
 
Posts: n/a
#6: Nov 12 '05

re: restore db2 backup with include logs


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" <gert@invalid.nl> wrote in message
news:MPG.1d19046696d8d5bb98983b@news.xs4all.nl...[color=blue]
> In article <3810FD4EAD8AD611A50D00805F0DA7FA07C2FF02@DUN-COM-NEWS02>,
> paul (nomail@nomail.com) says...[color=green]
>> 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
>>[/color]
>
> Check the recover database command[/color]


Andy K
Guest
 
Posts: n/a
#7: Nov 12 '05

re: restore db2 backup with include logs


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 :[color=blue]
> 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[/color]

Closed Thread