7

I am new to databases and have just been assigned to work with Oracle. We want to create a snapshot of the database for testing purposes that will allow us to revert back once we're done.

I'm a bit confused as to what my options are.

I've looked into creating a standby. It seems like that may be overkill for what we need and the pages describing how to create one are confusing to one with as little experience as I.

Questions

  • Is a standby the best fit or is import/export a viable option?
  • Are there other methods?.

Thanks!

Jon Seigel
16.9k6 gold badges46 silver badges86 bronze badges
asked May 17, 2012 at 16:02

3 Answers 3

6

If with "export/import" you mean the "traditional" exp and imp commands, than I'd say there is a better solution:

expdp and impdp are much faster and much more flexible when copying a snapshot of a database (or single schema).

If the database is not huge (i.e. Terabytes) then expdp and impdp is the easiest way to achieve this. They are easily scriptable and can be started using SQL also. So no commandline access to the servers is needed (provided the dump files are stored on a shared storage).

answered May 17, 2012 at 16:26
3

In addition to the impdp/expdb option already mentioned, you could restore/recover the database from your backups to a new location and then enable flashback database to revert the restored database anytime you want. The advantages of this method are that it will make sure your backups are good, verify and improve your recovery procedures, and allow for faster reverting. The downside is that it will take longer when you need a fresh copy. Here is an overview of Flashback Database from the documentation.

Flashback Database

Flashback Database is similar to conventional point-in-time recovery in its effects. It enables you to return a database to its state at a time in the recent past. Flashback Database is much faster than point-in-time recovery because it does not require restoring datafiles from backup and requires applying fewer changes from the archived redo logs.

You could also look into a storage based solution. Many offer a snapshot that initially takes little space and only grows as the snapshot and the source diverge. The database on the snapshot will behave as though a shutdown abort was done and so will require a bit of recovery (automatic).

Another option is to do a physical to virtual migration of the system and then have the virtualization product do the snapshot/revert.

answered May 17, 2012 at 17:20
0

Is the DB you want to copy running with RMAN? If so, using RMAN's 'duplicate' command could also be a quick way to clone your DB. Otherwise, using impdp/expdp is the best option and fairly easy to execute.

answered May 17, 2012 at 17:09

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.