473,406 Members | 2,847 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Recovery on UDB

Hi!!

UDB manual states:

"DB2 reuses log names after restoring a database (with or without
rollforward recovery). When a rollforward operation completes
successfully, the last log that was used is truncated, and logging
begins with the next sequential log. Any log in the log path directory
with a sequence number greater than the last log used for rollforward
recovery is re-used."

So far so good. It then states "An archived log may be associated
with
two or more different log sequences for a database, because log file
names are reused". It further states that during a rollforward, "you
could continue to roll forward through either the top log sequence or
the (newer) bottom log sequence."

I don't understand this. If the logs are reused, how can an archived
log be associated with more than one log sequence? Suppose I have
archive logs 1 to 100. Then I restore and rollforward to archive log
53. This would mean that the archive logs 54 to 100 will be 'reused'.
So, how will archive logs 54 to 100 be associated with more than one
log sequence? I would think they would only be associated with one log
sequence...the latest one (the log sequence that will be written when
those archive logs are reused).

Also, while rollforwarding, what parameter do we code (in ROLLFORWARD
DATABASE statement) which decides whether we want to rollforward
through the "top log sequence or the (newer) bottom log sequence.".

What am I missing.

TIA
Raquel.
Nov 12 '05 #1
5 2368
See answers folded below. #######

Raquel wrote:
Hi!! .....clipped So far so good. It then states "An archived log may be associated
with
two or more different log sequences for a database, because log file
names are reused". It further states that during a rollforward, "you
could continue to roll forward through either the top log sequence or
the (newer) bottom log sequence."

I don't understand this. If the logs are reused, how can an archived
log be associated with more than one log sequence? Suppose I have
archive logs 1 to 100. Then I restore and rollforward to archive log
53. This would mean that the archive logs 54 to 100 will be 'reused'.
So, how will archive logs 54 to 100 be associated with more than one
log sequence? I would think they would only be associated with one log
sequence...the latest one (the log sequence that will be written when
those archive logs are reused). ################
Log files 1 to 100 in log path (and also archived) make up what we'll
call Log Chain #1
You restore and roll forward to Log #53. Let's presume that this point
in time is in the middle of the log. At the end of the RF, DB2 will
chop the log off at that point and start a new log chain. Log Chain #2.
If the old chain is stil in the log path, then thos logs (54-100) will
be reused and their current content will be wiped out. That's why it is
a new log chain.
The old Chain#1 in the archive is still valid to use to recover to now.
Make sure you copy and remove all logs of the new Cahin#2 out of the log
path before attempting to roll thru Chain#1.
Also, while rollforwarding, what parameter do we code (in ROLLFORWARD
DATABASE statement) which decides whether we want to rollforward
through the "top log sequence or the (newer) bottom log sequence.". ############### There's no parm to allow you to choose which Chain to
use. DB2 always looks to the current log path to find the logs it needs
to roll forward.
In your case, after your roll forward to a point in time, the logs in
the path are logs forming Log Chain#2 and that's what it will roll
forward thru.
If you needed to roll forward threu Chain#1; you would A) Copy out and
delete the current logs out the path, b) Copy in all logs forming Log
Chain#1 c) Restore, roll forward thru that.
What am I missing.

TIA
Raquel.

############## Now be extremely careful if you also use the userexit
for archiving (also thru even if you don't).

LOogs from Chain#1 are in the archive. From the moment you roll forward
thru a point in time, all new logs being archived will belong to Chain#2
and will overwrite any logs file of Chain #1 if they have the same number.

HTH, Pierre.
--
Pierre Saint-Jacques - Reply to: sesconsjunk at attglobaljunk dot com
Reconstruct address: Remove the two junk and replace at and dot by
their symbols.
IBM DB2 Cerified Solutions Expert - Administration
SES Consultants Inc.

Nov 12 '05 #2


"P. Saint-Jacques" wrote:
Also, while rollforwarding, what parameter do we code (in ROLLFORWARD
DATABASE statement) which decides whether we want to rollforward
through the "top log sequence or the (newer) bottom log sequence.".

############### There's no parm to allow you to choose which Chain to
use. DB2 always looks to the current log path to find the logs it needs
to roll forward.


IIRC, You can use OVERFLOW LOG PATH option for rollforward command to apply the
archieved log files (top log sequence) from different log path, other than
current log path.

Nov 12 '05 #3
Rosin, tell me I'm wrong. I thought that the roll forward would look
FIRST in the normal log path for logs ( and would finf the logs from
Chain2) before looking in the overflow log path. I think yours would
work if the normal default log path specified in the db cfg would be
empty!!!
Make sense or am I off the wall ?
Regards, Pierre.

Fan Ruo Xin wrote:

"P. Saint-Jacques" wrote:

Also, while rollforwarding, what parameter do we code (in ROLLFORWARD
DATABASE statement) which decides whether we want to rollforward
through the "top log sequence or the (newer) bottom log sequence.".


############### There's no parm to allow you to choose which Chain to
use. DB2 always looks to the current log path to find the logs it needs
to roll forward.

IIRC, You can use OVERFLOW LOG PATH option for rollforward command to apply the
archieved log files (top log sequence) from different log path, other than
current log path.


--
Pierre Saint-Jacques - Reply to: sesconsjunk at attglobaljunk dot com
Reconstruct address: Remove the two junk and replace at and dot by
their symbols.
IBM DB2 Cerified Solutions Expert - Administration
SES Consultants Inc.

Nov 12 '05 #4
Hi, Pierre,
You are right! I got wrong.
Yes, we have to manually take care of removing those log files which left by the
bottom log sequence. Then specify the OVERFLOW LOG PATH to let the roll forward
process to forward through top log sequence.

Thanks,
FRX

"P. Saint-Jacques" wrote:
Rosin, tell me I'm wrong. I thought that the roll forward would look
FIRST in the normal log path for logs ( and would finf the logs from
Chain2) before looking in the overflow log path. I think yours would
work if the normal default log path specified in the db cfg would be
empty!!!
Make sense or am I off the wall ?
Regards, Pierre.

Fan Ruo Xin wrote:

"P. Saint-Jacques" wrote:

Also, while rollforwarding, what parameter do we code (in ROLLFORWARD
DATABASE statement) which decides whether we want to rollforward
through the "top log sequence or the (newer) bottom log sequence.".

############### There's no parm to allow you to choose which Chain to
use. DB2 always looks to the current log path to find the logs it needs
to roll forward.

IIRC, You can use OVERFLOW LOG PATH option for rollforward command to apply the
archieved log files (top log sequence) from different log path, other than
current log path.


--
Pierre Saint-Jacques - Reply to: sesconsjunk at attglobaljunk dot com
Reconstruct address: Remove the two junk and replace at and dot by
their symbols.
IBM DB2 Cerified Solutions Expert - Administration
SES Consultants Inc.


Nov 12 '05 #5
Thanks for your response. It is much appreciated.

"The old Chain#1 in the archive is still valid to use to recover to
now". By archive, do you mean a path other than the "current log path
(SQLOGDIR)"?

Unless we 'manually' copy 'full' active logs (which I don't think
anyone does), the only way to copy the full active logs from "current log
path" to some other path (which you refer to as archive) is a USEREXIT.
Is it correct?

Also, in your mail you have suggestd:

"LOogs from Chain#1 are in the archive. From the moment you roll
forward thru a point in time, all new logs being archived will belong to
Chain#2 and will overwrite any logs file of Chain #1 if they have the same
number."

So, what is the way out? Do we 'rename' the archive logs (in Chain#1,
to some arbitrary name) before we start logging for Chain#2?

TIA
Raquel.
Nov 12 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jens Kalkbrenner | last post by:
MS SQL-Server 7.0 Bypassing recovery for database 'EfW_765' because it is marked IN LOAD. What does this mean? Our customer is backing up is maindatabase and is recovering it to this database for...
0
by: Author Tarun Tyagi | last post by:
Hi, I am a Data Recovery Specialist and Professional Data Recovery Software Developer in New Delhi. I've placed the Complete SOURCE CODE of One of my Data Recovery Software for Sale (for...
8
by: Neil Truby | last post by:
There's something clearly missing in my understanding of recovery: I set up a small sample datavase and deleted all the rows from a table. Crucially, I omitted the "commit". I then shut down...
10
by: xixi | last post by:
i have db2 udb v8.1 on windows 64 bit 2003 server, after db2 server start , i found this in the db2diag.log, is this error? 2004-05-05-15.28.30.780000 Instance:DB2 Node:000...
3
by: jignesh shah | last post by:
Hi all, Is there a way to recover a single container if its been corrupted or mark bad without restoring whole tablespace? environment: db28.1/aix5.1/tsm/rs-6000. Regards Jignesh
2
by: Matik | last post by:
Hello, I've follow problem - thing to consider. SQLServer 200 sp3a, ms win 2003 server db simple recovery There is a production database, wich is around 20gb big. Db is backed up each...
2
by: Racerx | last post by:
Hi All : I use db2 8.1 fixpack 3 on AIX. I recieved the following message in the diaglog ====================================================== ADM7513W Database manager has started. ...
2
by: Tin | last post by:
I bought a laptop and burned 4 recovery CDs for recovery purpose. Instead of burning as disc images, I just copied and pasted these 4 CDs to my USB HDD as 4 folders called "RecoveryCD 1",...
0
by: Winder | last post by:
Computer Data Recovery Help 24/7 Data recovering tools and services is our focus. We will recover your data in a cost effective and efficient manner. We recover all operating systems and media....
2
by: =?Utf-8?B?c3BhcmtsZWJhbg==?= | last post by:
My recovery disk on vista is almost full. I have performed a back up, deleted all but the most recent recovery point, done a disk clean up and also compressed the recovery disk. It is STILL almost...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.