Creating, Cloning, and Deploying an Oracle home Gold Copy Note that the steps and commands in this

section pertain to Oracle10g homes only. 1. Make the initial Oracle home gold copy. Download the appropriate Oracle database product, launch the Oracle Universal Installer, and create an Oracle home. Do not create a database. This Oracle home is the original gold copy version. It is only used for patching and upgrading. 2. Apply all appropriate patches to initial Oracle home gold copy. To clone or make a new variation of the Oracle home gold copy, perform the following: 1. Create another gold copy Oracle home. a) Navigate to the gold copy Oracle home parent directory. In our case we will call this directory /u01/app/oracle/clones. This directory contains the gold Oracle homes. The example gold Oracle home is called 10.2.0.2.jan07. cd /u01/app/oracle/clones b) Make a CPIO archive of the target gold Oracle home. Again, the target is a directory called 10.2.0.2.jan07. Replace this gold Oracle home directory reference with yours. The below CPIO command makes a CPIO file of the 10.2.0.2.jan07 Oracle home. find ./10.2.0.2.jan07 -depth | cpio -voB > ./10.2.0.2.jan07.cpio c) Make a directory in the /u01/app/oracle/clones directory to unpack the 10.2.0.2.jan07.cpio file created in step b. mkdir /u01/app/oracle/clones/tmp d) Unpack the 10.2.0.2.jan07.cpio file into the /u01/app/oracle/clones/tmp directory. First navigate into the tmp directory and issue a Cpio command. The commands are: cd /tmp or cd /u01/app/oracle/clones/tmp cpio -invd < ../10.2.0.2.jan07 e) Step D created a /u01/app/oracle/clones/tmp/10.2.0.2.jan07 directory. You need to rename the 10.2.0.2.jan07 and move it down a directory. Use this command:

and delete the actual Oracle home. you must install an Oracle home with Universal Installer before trying to register the cloned Oracle home.jan07b. This will create the inventory.cpio 4.cpio. You can delete the home after creation and use the clone. You can now add patches to this home without affecting the original gold home.0.2. compress the archive.2.2.0.2. This will save space.0. You now have a cloned.2. You might note that all of the work was done remotely and does not affect an operating database. renamed replica of the original Oracle gold copy home (10.jan07b. Place the file in the Oracle homes parent directory (i.2. After patching.0. /u01/app/oracle/product).mv /u01/app/oracle/clones/tmp/10.e. The CPIO’d gold copy can be restored at any point for further cloning and moved to other servers for use.2. Uncompress and unpack the CPIO gold copy version: Uncompress 10. 3. .Z cpio -imvd < 10.0.pl perl $ORACLE_HOME/clone/bin/clone.0.0.jan07b export PATH=${ORACLE_HOME}:${PATH} perl $ORACLE_HOME/clone/bin/prepare_clone. perform the following: 1.2.2.jan07). you may want to create a CPIO archive.2.jan07b \ ORACLE_HOME_NAME=10_2_0_2_jan07b g) Run /u01/app/oracle/clones/10. If you run Oracle Universal Installer. Perform Step e.2.sh. Create a compressed CPIO archive of the Oracle home gold copy (Steps A and B above) 2.0. Run these commands: export ORACLE_HOME=/u01/app/oracle/clones/10. To move a gold copy Oracle home to another location. Register the database with Oracle Inventory.0.jan07 /u01/app/oracle/clones/10. you will see that the clone is registered.2. FTP the compressed CPIO archive to the new server.2. This step registers the new home with Oracle inventory.2. If this is the first Oracle Home on the server.jan07b/root.jan07b f) Step E creates an unregistered Oracle home locate in /u01/app/oracle/clones/10.2.2.pl \ ORACLE_HOME=/u01/app/oracle/clones/10.2.2.jan07b.

f. e. Modify the Etc/oratab file d. Start the database g.ksh) so that the environment will point to the new Oracle home. At this point. the article describes a set of simple commands that will enable you to create and deploy cloned Oracle homes. You will find that this practice reduces the patching complexities. Create a new password file i. Shutdown the database.sql. Modify the listener file (listener. Change the environment to the new Oracle home and reload the listener. I believe that employment of the techniques discussed in this article will make you life as a DBA easier. Cloning can be done through Oracle Enterprise Manager Grid Control. Using a cloned gold copy will also result in less outage time. Check out the upgraded database.ora) to point to the new Oracle home. The following steps can be used to point an existing database to the new Oracle home. h. In this article I discussed the benefits of using a gold copy Oracle home and cloning in place of patching an Oracle home in place. c. Modify the environment file (inst. You can install a new database for the Oracle home by running Oracle Database Configuration Agent or point an existing database to the new Oracle home.5. and time. b. risk. Move the old database’s pfile/spfile to the location used by the new Oracle home. If this Oracle home is a patched version run Catcpu. the cloned Oracle home is ready to support a database. a. If this tool is unavailable. .

Sign up to vote on this title
UsefulNot useful