0

i'm a programmer, not a dba. i need a mechanism to quickly make a snapshot of a database (oracle 11g XE) before i run migration. migration changes data, grants, DDL (tables, triggers, lexers, views etc). in case migration fails, i want to quickly revert to the saved state. all this will be done on non-production environment. it's just to speed up the development process

i've heard about full backups, flashbacks, snapshots but i have no idea what's the difference and which one is best for my task

  • For development environment, I think that there is no need for heavy guns, so simple export-import could do the trick. Shutdown the database(to have consistent state of data), export user(schema) that you are about to change, do the changes, test applications and if you are not satisfied, drop that user and import exported dmp file. – mutap Jun 3 '14 at 23:58
-1

The best option would be to use the Flash recovery area option, then set a restore point before you make your change and you can revert to the restore point after you make your change, hence you can rerun the script over and over until you work out the issues. You probably need Enterprise edition to do that, but you can certainly try to make it work. The next best option would be to do an RMAN backup and then run your script and recover the database after the script runs. If it really is a dev system, and if space is tight you might as well turn off archive logging and do a warm backup of the database. hence it is in a consistent state and you don't need to worry about recovering archive logs.

http://docs.oracle.com/cd/E17781_01/server.112/e18804/storage.htm#CIHEHCGI

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.