If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Point in recovery in db2

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-04-08, 05:14
prasadv18 prasadv18 is offline
Registered User
 
Join Date: Nov 2007
Posts: 26
Point in recovery in db2

Hi
all

I need to know about point in recovery.
I want to restore the database at some point of time from online backup and logs.

I have backup image and logs but i want to restore database with some logs only
example:

I have online backup image of Monday morning
database tables were wrongly updated monday evening
i want to restore database up to monday afternoon


Thanks and regards
prasad
Reply With Quote
  #2 (permalink)  
Old 12-04-08, 05:53
JAYANTA_DATTA JAYANTA_DATTA is offline
Registered User
 
Join Date: Oct 2004
Location: DELHI INDIA
Posts: 336
After RESTORING the DB (with the Full Backup taken on SUNDAY), roll forward to a point in time:

e.g. You can use different option with ROLLFORWARD:

db2 rollforward db sample to 1998-04-03-14.21.56 and stop overflow log path (/logs)

Please refer to the IBM manual for the same for more details where ONLINE Backup restoration is mentioned very clearly with lots of great examples.
__________________

Jayanta Datta
DB2 UDB DBA
IBM India, Global Delivery
New Delhi
Reply With Quote
  #3 (permalink)  
Old 12-04-08, 23:46
prasadv18 prasadv18 is offline
Registered User
 
Join Date: Nov 2007
Posts: 26
Hi Jayanta

Thankyou very much for replay.

VaRaPrAsAd
Reply With Quote
  #4 (permalink)  
Old 12-26-11, 01:09
jagdis_vishnu jagdis_vishnu is offline
Registered User
 
Join Date: Aug 2011
Posts: 9
point in time recovery

Quote:
Originally Posted by JAYANTA_DATTA View Post
After RESTORING the DB (with the Full Backup taken on SUNDAY), roll forward to a point in time:

e.g. You can use different option with ROLLFORWARD:

db2 rollforward db sample to 1998-04-03-14.21.56 and stop overflow log path (/logs)

Please refer to the IBM manual for the same for more details where ONLINE Backup restoration is mentioned very clearly with lots of great examples.
hi folks,

well, every one telling that how to rollforward to a point in time.
i am confused tat, do we have multiple point in times or only one. if we have multiple, how to trace them? history file or diaglog or any other source?? what are the scenarios tat a particular point in time will be created??
plz plz plzzzzzzzzz explain if any one can...

thank you
Jagdish
Reply With Quote
  #5 (permalink)  
Old 12-26-11, 16:14
Peter.Vanroose Peter.Vanroose is offline
Registered User
 
Join Date: Sep 2004
Location: Belgium
Posts: 1,079
You decide yourself which point in time (or otherwise said: time instant) you want to restore to; in the example above that was the time instant "1998-04-03-14.21.56".
That's all you need to tell DB2: it will play all the logs of committed changes just until that point-in-time.
__________________
--_Peter Vanroose,
__IBM Certified Database Administrator, DB2 9 for z/OS
__IBM Certified Application Developer
__ABIS Training and Consulting
__http://www.abis.be/
Reply With Quote
  #6 (permalink)  
Old 12-26-11, 22:59
jagdis_vishnu jagdis_vishnu is offline
Registered User
 
Join Date: Aug 2011
Posts: 9
point of consistency

Quote:
Originally Posted by Peter.Vanroose View Post
You decide yourself which point in time (or otherwise said: time instant) you want to restore to; in the example above that was the time instant "1998-04-03-14.21.56".
That's all you need to tell DB2: it will play all the logs of committed changes just until that point-in-time.
Hi Peter,

Thank you for the information provided.
My doubt is, I don't know these time instants but I know the sequence of tasks that I have performed. I need to restore my database till a particular task(That should be a consistent point, right?). How would i trace those consistency points.

Another doubt is, we are at a consistency point, and we are performing some database operations( may be DML, DDL, reorg, backup or any other). In what context again a consistency point is created? Hope I explained my doubt clearly.
Reply With Quote
  #7 (permalink)  
Old 12-27-11, 07:29
edoo.okati edoo.okati is offline
Registered User
 
Join Date: Nov 2011
Posts: 8
Quote:
Originally Posted by jagdis_vishnu View Post
Hi Peter,

Thank you for the information provided.
My doubt is, I don't know these time instants but I know the sequence of tasks that I have performed. I need to restore my database till a particular task(That should be a consistent point, right?). How would i trace those consistency points.

Another doubt is, we are at a consistency point, and we are performing some database operations( may be DML, DDL, reorg, backup or any other). In what context again a consistency point is created? Hope I explained my doubt clearly.

I guess you are new to Database world.


Point of time recovery means. You should be able to recover the database from backup and apply the the logs until what time you the restore needs to be done.
Reply With Quote
  #8 (permalink)  
Old 12-27-11, 08:33
Peter.Vanroose Peter.Vanroose is offline
Registered User
 
Join Date: Sep 2004
Location: Belgium
Posts: 1,079
Quote:
Originally Posted by jagdis_vishnu View Post
... I know the sequence of tasks that I have performed. I need to restore my database till a particular task.
In that case, couldn't you just perform those tasks inversely?
Or, if that's impossible, first restore the tables under consideration to a point in time (maybe a backup time) just before those tasks, then perform the sequence of tasks again, but just those that you want to be performed.

(I don't know enough of your particular situation to be more specific than this, sorry.)
__________________
--_Peter Vanroose,
__IBM Certified Database Administrator, DB2 9 for z/OS
__IBM Certified Application Developer
__ABIS Training and Consulting
__http://www.abis.be/
Reply With Quote
  #9 (permalink)  
Old 12-28-11, 06:51
jagdis_vishnu jagdis_vishnu is offline
Registered User
 
Join Date: Aug 2011
Posts: 9
Quote:
Originally Posted by edoo.okati View Post
I guess you are new to Database world.


Point of time recovery means. You should be able to recover the database from backup and apply the the logs until what time you the restore needs to be done.
Thank you dear edoo.okati,

I know that if we rollforward to a particular time stamp, the database will be restored to a nearby consistency point. if we rollforward to a random timestamp, it will restore to a prior consistency point(may be Im wrong).
Reply With Quote
  #10 (permalink)  
Old 12-28-11, 06:54
jagdis_vishnu jagdis_vishnu is offline
Registered User
 
Join Date: Aug 2011
Posts: 9
Quote:
Originally Posted by Peter.Vanroose View Post
In that case, couldn't you just perform those tasks inversely?
Or, if that's impossible, first restore the tables under consideration to a point in time (maybe a backup time) just before those tasks, then perform the sequence of tasks again, but just those that you want to be performed.

(I don't know enough of your particular situation to be more specific than this, sorry.)
Dear Peter,

Practically I faced this situation. More over I was not provided with any script except a backup image and a bunch of log files. But thank god Im not in production.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On