469,645 Members | 1,193 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Regarding Online Backup logs

(Using UDB 7.2 FP11). Given this output from LIST BACKUP HISTORY FOR
MYDB: (It's an online backup image)
Op Obj Timestamp+Sequence Type Dev Earliest Log Current Log Backup ID
-- --- ------------------ ---- --- ------------ ------------ --------------
B D 20040217102712001 N D S0000194.LOG S0000196.LOG
----------------------------------------------------------------------------
and:
MYDB:
First active log file = S0000194.LOG


Does that mean I have to copy logs S0000194.LOG - S0000196.LOG in
addition to the online backup image *even if* these logs are marked
'still in use'? Wouldn't I run into log-consistency problems?

Or must I repeatedly issue the command ARCHIVE LOG FOR DB MYDB until
'First active log file' > S0000196.LOG and then copy the logs?

Thanks for your advice.
Nov 12 '05 #1
3 3147
Almund Sebi <ny***@gmx.net> wrote:
(Using UDB 7.2 FP11). Given this output from LIST BACKUP HISTORY FOR
MYDB: (It's an online backup image)
Op Obj Timestamp+Sequence Type Dev Earliest Log Current Log Backup ID
-- --- ------------------ ---- --- ------------ ------------ --------------
B D 20040217102712001 N D S0000194.LOG S0000196.LOG
----------------------------------------------------------------------------


and:
MYDB:
First active log file = S0000194.LOG


Does that mean I have to copy logs S0000194.LOG - S0000196.LOG in
addition to the online backup image *even if* these logs are marked
'still in use'? Wouldn't I run into log-consistency problems?


"Still in use" in this context means that the logs are still required in
case you roll back one of your open transactions. You can copy the log,
but don't delete it from the active log path.

dave
Nov 12 '05 #2
I gather from "I have to copy" that you're not using the user exit.
You should issue the following after your online backup terminates:
F:\SQLLIB\BIN>db2 ? archive log
ARCHIVE LOG FOR DATABASE alias-bdd [USER id-util [USING mot-de-passe]]
[Clause-ON-NumPartitionBdd]

Clause-ON-NumPartitionBdd :
ON {{DBPARTITIONNUM | DBPARTITIONNUMS} (numéro-partition-bdd
[TO numéro-partition-bdd] , ... ) | ALL DBPARTITIONNUMS [EXCEPT
{DBPARTITIONNUM | DBPARTITIONNUMS} (numéro-partition-bdd
[TO numéro-partition-bdd] , ...)]}

Substitute the French for your object names. The command will cut the "196"
log to make it full. You will still have to check if it is still part of
the active log path before you can copy it to archive.
If you were using the user exit, this would happen automatically for you,
wether the log was active or not.
The difference is: You can't copy the log as it is locked to db2 because it
is active. DB2 user exit can copy the active log as it is locked to itself
and it can copy the log.

HTH, Pierre.
"Almund Sebi" <ny***@gmx.net> a écrit dans le message de
news:94**************************@posting.google.c om...
(Using UDB 7.2 FP11). Given this output from LIST BACKUP HISTORY FOR
MYDB: (It's an online backup image)
Op Obj Timestamp+Sequence Type Dev Earliest Log Current Log Backup ID
-- --- ------------------ ---- --- ------------ ------------ -------------

-
B D 20040217102712001 N D S0000194.LOG S0000196.LOG


--------------------------------------------------------------------------

--
and:
MYDB:
First active log file = S0000194.LOG


Does that mean I have to copy logs S0000194.LOG - S0000196.LOG in
addition to the online backup image *even if* these logs are marked
'still in use'? Wouldn't I run into log-consistency problems?

Or must I repeatedly issue the command ARCHIVE LOG FOR DB MYDB until
'First active log file' > S0000196.LOG and then copy the logs?

Thanks for your advice.


Nov 12 '05 #3
Thank you for your insights.
I decided that I'll write a User Exit program, as it's much simpler
than I thought at first glance.
Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Christos Kalantzis | last post: by
2 posts views Thread by Raghava | last post: by
5 posts views Thread by Gladiator | last post: by
10 posts views Thread by Konstantin Andreev | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.