Posts

Showing posts with the label cloning

Oracle Home Cloning: Tools and Techniques

One of the many necessary and frequent tasks that a database administrator performs before creating a database is installing the Oracle database binaries. These binaries form what is known as an Oracle Home (referenced by the ORACLE_HOME environment variable on Linux and UNIX environments). Unfortunately, this is also one of the most mundane and uninteresting tasks a DBA can perform. So like all good DBAs know, the best way to deal with such repetitive task is to automate it. Automating installations of Oracle database binaries enables us to reliably repeat the process to enable faster installation as well as provide identical copies of the software in multiple environments. Fortunately, Oracle allows us to clone the Oracle database binaries from one environment to another. Cloning your Oracle binaries from a source copy with all the necessary patches applied enables us to have gold images which can then be deployed to multiple environments. The procedure for cloning an Oracle home...

Automatic RAC Recovery (Database Cloning)

For the past couple of months I've been working on a project to automatically clone a three node RAC database on AIX to a single instance database from storage snapshots. The clone was to be done daily after our ETL process had completed and was used to offload reporting as well as other purposes. Initially I thought this would be quite straightforward having done clones using RMAN before. How hard could it be? The procedure to clone the database is summarized as follows: 1. Generate controlfile  creation script 2. Identify cloned LUNS 3. Rename cloned disk groups e.g. DG_DATA -> DG_DATA_CLONE 4. Mount cloned disk groups 5. Modify/Create pfile or use existing pfile for clone 6. Setup environment variables for clone 7. Create audit directories for clone 8. Startup clone instance in nomount mode and re-create controlfile from script 9. Recover clone database (Apply archivelogs from source DB) 10. Open database with resetlogs 11. Rename database using NID ...