View previous topic :: View next topic
|
Author |
Message |
Gurmeet
New User
Joined: 22 Feb 2006 Posts: 46 Location: Pune
|
|
|
|
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 |
|
|
twissi
Active User
Joined: 01 Aug 2005 Posts: 105 Location: Somerset, NJ
|
|
|
|
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 |
|
|
Gurmeet
New User
Joined: 22 Feb 2006 Posts: 46 Location: Pune
|
|
|
|
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 |
|
|
twissi
Active User
Joined: 01 Aug 2005 Posts: 105 Location: Somerset, NJ
|
|
|
|
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 |
|
|
Gurmeet
New User
Joined: 22 Feb 2006 Posts: 46 Location: Pune
|
|
|
|
Twissi,
Thanks again!!!
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 |
|
|
DavidatK
Active Member
Joined: 22 Nov 2005 Posts: 700 Location: Troy, Michigan USA
|
|
|
|
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 |
|
|
Gurmeet
New User
Joined: 22 Feb 2006 Posts: 46 Location: Pune
|
|
|
|
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 |
|
|
|