Nikola Ivkov
Nikola Ivkov

Reputation: 89

Oracle database reverting database to a previous state

I have some automated tests that insert some data, and save it into Oracle XE database, version 11g. At the moment, after the tests are done, data is manually deleted through SQL. But i was wondering is there any other way to make a rollback easier, and more efficient? I am reading about restore points and wondering is that the feature that I am looking for?

How memory consuming is that process of restoring, and is it a good practice to use it for what i need? Or is it maybe some other way to rollback data inserting?

Thanks

Upvotes: 0

Views: 277

Answers (1)

kevinskio
kevinskio

Reputation: 4551

Oracle flashback is perfect for this scenario. Just be sure you have allocated sufficient disk space in the flash_recovery_area parameter.

Usage is something like

FLASHBACK DATABASE TO RESTORE POINT 'before_upgrade';

Limitations:

  • Does not recover operations undertaken with No Logging such as direct path inserts
  • cannot help you if are dropping datafiles

Upvotes: 1

Related Questions