Thursday, December 19, 2013

Testing rman on an ASM based oracle database ... you better really do this first

So if you are testing an rman based database recovery on a server that uses ASM for database storage what is the first step?

Well ok before the first step in testing you better be in archivelog mode, have other copies stashed away of the spfile and the controlfile contents, have a backup of the ASM instance spfile have copies of all the statements necessary to recreate asm disk groups, have copies of the oracle homes and software executables ... ya da ya da.  Plus some kind of validation of all the backup pieces.

Do all of this on test systems first please of course.

Then before you start "testing" your recovery you need to whack all the ASM disk groups.  Just obliterate them completely ... overwrite them with binary zeros or some arbitrary pattern.

For unix/linux systems the dd command is the usual brute to whack disks/luns.  You don't need to overwrite all the blocks ( although that would be most admirable ) just tear up the first 500 blocks or so of each disk group.

Next step is to re-create all your diskgroups.  They are empty of course now ...

Then finally start your database rman recovery steps ...

Document all of this aka the "plan" of what you are doing to do before you start ... all the stuff you will need to recover in each step ... and the results of each step as you proceed back to completing your database recovery.

If it all comes apart in some horrible manner ... well that means you did not have all the correct pieces or that you did not know how to use them correctly.  Learning experiences and mistakes are the best ways to learn.  Do this all on test systems first and build up your knowledge base and your documentation.

If it all comes apart in some horrible manner in a production system and you did not take the time to guarantee that you had everything ready and available and documented?  Well contact oracle support and also update your resume.

No comments:

Post a Comment