How should I back-up an application database during a release

oracle

During an application release it is common that changes are made to the associated database schema and potentially the data it contains. Should something go wrong with the application release, the changes made to the schema (and data) will need to be rolled back.

To throw a spanner in the works, there are multiple applications with their own schemas running on the same database instance.

What is the best way to create a back-up that would allow the application schema to be rolled back leaving all other schemas unaffected?

Best Answer

We have Flashback feature starting from Oracle 10g. But you only can flashback individual objects or whole database.

Now you have two options(IMHO):-

  • Data Pump(expdp/impdp):- You can export your schema before the testing and can import the dump file to restore schema to previous version.
  • You can write a script to flashback all the tables and dependent objects to the previous version.

    References:

  • Data Pump
  • FLASHBACK TABLE