Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Explain more about RBAs in DB2

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Gurmeet

New User


Joined: 22 Feb 2006
Posts: 46
Location: Pune

PostPosted: Thu May 25, 2006 7:14 pm    Post subject: Explain more about RBAs in DB2
Reply with quote

Can any one please explain more about RBAs in DB2?

I am using Recover utility with TORBA clause to rollback some unrequired changes on the database but not very clear with RBAs.

~Gurmeet
Back to top
View user's profile Send private message

ragshere

New User


Joined: 20 Dec 2004
Posts: 70

PostPosted: Fri May 26, 2006 5:26 pm    Post subject: Re: RBA
Reply with quote

Gurmeet,
RBA stands for Relative byte address . It signifies a position in the DB2 LOG.
Generally RBA will be mapped to a timestamp. I mean RBA is nothing but a timestamp. so that If we want to recover to a time which is in the past, we need to use the RBA of that time for recovery.

RBA is a hexa decimal number and DB2 will create it based on some timestamp. If we Quiesce on a tablespace, DB2 will put a enry in SYSCOPY with the RBA and a entry in DB2 directory. so that they will be used as recovery points if needed.

RBA is called as LRSN in data sharing environment. But concept of LRSN and RBA are same.

If we want to recover to a RBA (I mean TORBA) , DB2 will bring the latest full image copy of the object you are recovering which is nearer to that RBA and then applies the changes of the object saved in log until that RBA reaches. Here changes means SQL operations like UPDATE,INSERT ,DELETE etc...

Hope you got me...
Regards,
Rags
Back to top
View user's profile Send private message
Gurmeet

New User


Joined: 22 Feb 2006
Posts: 46
Location: Pune

PostPosted: Fri May 26, 2006 8:53 pm    Post subject:
Reply with quote

Thanks Rags,

Yeah, things are clear now.

Just one more query, I have taken a image copy and am using the RBA of the image copy(from SYSIBM.SYSCOPY) in TORBA clause of the recover statement, this means that the DB will be recovered till a point when image copy was taken.

Now my question is how do we get the RBA of some time other than the image copy time. Say I have taken a image copy at 1500 hrs and at 1700 hrs i decide to rollback to a point in time (say 1600 hrs) using recover utility. Where shall i find the RBA corresponding to 1600 hrs.

Thanks for your help.

Regards,
~Gurmeet
Back to top
View user's profile Send private message
ragshere

New User


Joined: 20 Dec 2004
Posts: 70

PostPosted: Mon May 29, 2006 1:31 pm    Post subject: Re: Explain more about RBAs in DB2
Reply with quote

Gurmeet,

here is the answers for your queries..

1. when we use TORBA clause in RECOVER utility, that means bring the tablespace to the state how it was at that RBA.
DB2 will use image copies which were created prior to that RBA . That means it will fetch the latest image copy as of RBA time and uses it for recovery.
There are scenarios where some changes happened after taking image copy and before Quiesce (which will create a RBA in log and SYSCOPY) .
In this case DB2 recover utility will apply the changes happened on the table by looking at the log. At last we will get the data as of that RBA.

We have to use RBA which is in SYSCOPY. to save a RBA , we use Quiesce.

2 . As i said, we need to use QUIESCE utility to put a RBA entry in the catalog and directory. But actually Quiesce will insert a consistent recovery point in the catalog.

so you recover to that recovery point if needed. But here is a condition.

You should have at least one full image copy before the RBA.Then only we can recover.
Its best practice to Quiesce or take a image copy before doing a load.

If the image copy available,quiesced the tablespace at 15:00 hrs and you want to recover the tablespace to 16:00 state, you have to do a litle research. and this is not recommendable.

You need to search SYSCOPY for the RBA (Type=Q) rows which were created at 16:00 hrs or a little earlier for any tablespace in the subsystem.

Take the RBA of that entry ,use it in TORBA clause for recovering your tablespace.

Regards
Rags
Back to top
View user's profile Send private message
Gurmeet

New User


Joined: 22 Feb 2006
Posts: 46
Location: Pune

PostPosted: Tue May 30, 2006 4:31 pm    Post subject:
Reply with quote

Rags,

Thanks a lot.

Regards,
~Gurmeet
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Can someone explain me this JCL line ... PeterHolland JCL & VSAM 9 Sat Dec 12, 2015 7:22 am
No new posts DB2 Explain agkshirsagar DB2 3 Wed Aug 28, 2013 6:23 pm
No new posts can some one explain the below code... ram_vizag JCL & VSAM 3 Thu Aug 22, 2013 4:35 pm
No new posts Please explain this SQL CODE. tamminenisidhartha DB2 4 Wed Mar 13, 2013 5:05 pm
No new posts Explain Comparision Report gylbharat DB2 4 Tue Jun 05, 2012 5:48 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us