IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

DB2 - Rollback


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Gurmeet

New User


Joined: 22 Feb 2006
Posts: 46
Location: Pune

PostPosted: Thu May 18, 2006 5:22 pm
Reply with quote

Hi,

We have a scenario in production, where in we will be applying some schema changes and start testing. Now if the testing does not give satisfactory results, we would be required to rollback the database to a point in time before the testing started,i.e. all the test data should be deleted but we are not in a position to use delete queries, as we don't have much details about test data.

Scenario:

*Schema changes done at 0800 hrs.
*Testing commences at 0800hrs.
*Testing culminates at 1000 hrs.(Results unsatisfactory)
*Rollback the complete database to a point in time 0800 hrs i.e. UNDO all the changes which have happened on the database for the last 2 hrs from 0800 hrs to 1000 hrs.

Can some one please help me urgently on this.

Regards,
Back to top
View user's profile Send private message
twissi

Active User


Joined: 01 Aug 2005
Posts: 105
Location: Somerset, NJ

PostPosted: Thu May 18, 2006 5:31 pm
Reply with quote

Hi Gurmeet,

Maybe you should find out the ENDRBA before and after your testing and if the tests are not satisfactory, erase data between the start and end ENDRBA.

You can flip the log using the following command from your DB2 COMMAND facility for that subsystem:
Code:
-ARCHIVE LOG MODE(QUIESCE) TIME(300) WAIT(YES)

The disadvantage with this method is that, it removes data inserted by other users that comes in between the ENDRBAs.

Cheers, Twissi.
Back to top
View user's profile Send private message
Gurmeet

New User


Joined: 22 Feb 2006
Posts: 46
Location: Pune

PostPosted: Thu May 18, 2006 5:42 pm
Reply with quote

Thanks Twissi,

A couple of queries on this.

*Will this make the required changes in the database, what if we have multiple databases on same subsytem.

*How do i find the RBA?

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

Active User


Joined: 01 Aug 2005
Posts: 105
Location: Somerset, NJ

PostPosted: Thu May 18, 2006 6:45 pm
Reply with quote

Gurmeet,

There used to be multiple databases on the same subsystem, the RBA denotes the address of the subsystem, not the database.

To find the RBA, execute the command (-ARCHIVE LOG MODE(QUIESCE) TIME(300) WAIT(YES)) and if it completes normally, go to spool and do a pre on your subsystem (pre ABCD*, if ABCD is your subsystem) and in JESMSGLG, find for last ENDRBA.

We used to do this only when no other PGM/User is accessing any table falling under the subsystem.

Hope this helps!.

Cheers, Twissi.
Back to top
View user's profile Send private message
Gurmeet

New User


Joined: 22 Feb 2006
Posts: 46
Location: Pune

PostPosted: Thu May 18, 2006 7:22 pm
Reply with quote

Twissi,

Thanks again!!!

icon_sad.gif But I got confused now and more over don't have much insight about the logs, if you have any reference material and can send it to me that will be of great help.

Mean while, I am also looking into the possibility of using recover utility, again not familiar with this as well.

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

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Thu May 18, 2006 8:17 pm
Reply with quote

Gurmeet,

Are you concerned about other 'Production' changes that have been made to you're databases, or are you going to have exclusive use from the time you add test data and rollback?

If you will have exclusive use, why not unload/load as rollback?

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

New User


Joined: 22 Feb 2006
Posts: 46
Location: Pune

PostPosted: Thu May 18, 2006 8:25 pm
Reply with quote

Dave,

I am going to have exclusive access of the database for that time.

The concern here is that I am trying to rollback around 250 table spaces and the time available will be very less as the online services have to be restored on time.

We also thought of using image copy backups to restore data but rebuilding the indexes will consume most of the time.

Regards,
Gurmeet
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts filter COMMIT/ROLLBACK statements DFSORT/ICETOOL 13
No new posts TWA variable having junk value after ... CICS 1
No new posts Handle ROLLBACK in EXCI interface CICS 12
No new posts Rollback does not remove messages? Java & MQSeries 5
No new posts MQ ROLLBACK? Java & MQSeries 6
Search our Forums:

Back to Top