Oracle – How to Reset Schema

oracle

I'm running systemtest that updates a oracle schema. I need to reset the whole scheme between runs.

Is there an easy way to do this in oracle 12. I have looked at flashback but it doesn't seem to be the right way to go.

Best Answer

perhaps you looked at flashback queries, what you need are restore points.

  1. Create a guaranteed restore point before starting test
  2. Perform test, measure, save results
  3. startup mount the db, flashback database to restore point
  4. drop and re-create guaranteed restore point.
  5. lather. rinse. repeat

It really doesn't get easier than that. I do it multiple times a week and have essentially reduced it to a small script and keep doing this against my dev db.