user2101374
user2101374

Reputation: 61

How to rollback database change in production after few hours or days

We are using Oracle 12c in production. Lets say there was release that went to production on Sunday and then some hours or some days later(e.g. Tuesday) we realized that we need to rollback the changes we did, assume there were DDL schema changes, along with DML changes which could be inserts, updates, deletes.

What is the best practice to rollback the changes? we can not restore database from backup because backup was from Sunday and there is data from Sunday to lets say Tuesday.

Just want to know what is the best practice for rolling back database changes in Oracle 12c.

Upvotes: 0

Views: 353

Answers (1)

Roberto Hernandez
Roberto Hernandez

Reputation: 8518

When you are making a rollout to Production, the best technique to go back is FLASHBACK DATABASE.

You can read more here

https://docs.oracle.com/database/121/SQLRF/statements_9012.htm#SQLRF01801

The idea is to create a restore point flashback guarantee that you can go back to just by running a restore command

create restore point my_save_point guarantee flashback database;

Then you do your changes, you verify whatever you want to verify and if you need to rollback you just run

flashback database to restore point my_save_point ;

Upvotes: 1

Related Questions