Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

DB2 - Rollback

 
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 18, 2006 5:22 pm    Post subject: DB2 - Rollback
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    Post subject:
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    Post subject: Re: DB2 - Rollback
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    Post subject:
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    Post subject: Re: DB2 - Rollback
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    Post subject: Re: DB2 - Rollback
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    Post subject:
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    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 TWA variable having junk value after ... Gopalakrishnan V CICS 1 Tue May 13, 2014 7:59 pm
No new posts Handle ROLLBACK in EXCI interface Pandora-Box CICS 12 Fri Sep 21, 2012 2:38 pm
No new posts Rollback does not remove messages? Susan Talbot Java & MQSeries 5 Fri Sep 23, 2011 11:38 pm
No new posts MQ ROLLBACK? anshuljain26 Java & MQSeries 6 Tue Aug 02, 2011 12:31 am
No new posts Error in CICS SYNCPOINT ROLLBACK enrico-sorichetti CICS 4 Thu Mar 31, 2011 6:22 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us