Here's a step by step process to clone 10gR2 ORACLE_HOME to another identical server. Since the host names are different it's advisable to follow this procedure anytime you copy an ORACLE_HOME to another server even if directory structure is exactly the same. ## ## First detach ORACLE_HOME from central inventory ## atlas.10GR2-> pwd /u01/app/oracle/oraInventory/ContentsXML atlas.10GR2-> grep "HOME NAME" * inventory.xml: inventory.xml: atlas.10GR2-> ## detach OraDb10g_home1 home (get directory from above grep results) ## atlas.10GR2-> $ORACLE_HOME/oui/bin/runInstaller -detachhome ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1 Starting Oracle Universal Installer... No pre-requisite checks found in oraparam.ini, no system pre-requisite checks will be executed. The inventory pointer is located at /var/opt/oracle/oraInst.loc The inventory is located at /u01/app/oracle/oraInventory 'DetachHome' was successful. atlas.10GR2-> ## verify using grep ## NOTE now it says REMOVED="T" ## atlas.10GR2-> grep "HOME NAME" * inventory.xml: inventory.xml: atlas.10GR2-> ## ## re-register ORACLE_HOME ## ## MAKE SURE ALL PROCS ARE DOWN - it does a relink ## atlas.10GR2-> ps -ef | grep oracle oracle 4824 4822 0 Oct 08 pts/2 0:00 -ksh oracle 4822 4819 0 Oct 08 ? 0:00 /usr/lib/ssh/sshd oracle 5352 4864 0 16:57:33 pts/3 0:00 ps -ef oracle 4862 4859 0 Oct 08 ? 0:01 /usr/lib/ssh/sshd oracle 4864 4862 0 Oct 08 pts/3 0:00 -ksh oracle 5353 4864 0 16:57:33 pts/3 0:00 -ksh ## run clone script ## cd $ORACLE_HOME/clone/bin perl clone.pl ORACLE_HOME="/u01/app/oracle/product/10.2.0/db_1" ORACLE_HOME_NAME="OraDb10g_home1" Here's a sample output of above command: atlas.10GR2-> perl clone.pl ORACLE_HOME="/u01/app/oracle/product/10.2.0/db_1" ORACLE_HOME_NAME="OraDb10g_home1" ./runInstaller -silent -clone -waitForCompletion "ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1" "ORACLE_HOME_NAME=OraDb10g_home1" -noConfig -nowait Starting Oracle Universal Installer... No pre-requisite checks found in oraparam.ini, no system pre-requisite checks will be executed. Preparing to launch Oracle Universal Installer from /tmp/OraInstall2007-10- 09_04-59-54PM. Please wait ...Oracle Universal Installer, Version 10.2.0.3.0 Production Copyright (C) 1999, 2006, Oracle. All rights reserved. You can find a log of this install session at: /u01/app/oracle/oraInventory/logs/cloneActions2007-10-09_04-59-54PM.log ........................................................................... ......................... 100% Done. Installation in progress (Tue Oct 09 17:00:23 PDT 2007) ................................................................................. 81% Done. Install successful Linking in progress (Tue Oct 09 17:00:45 PDT 2007) Link successful Setup in progress (Tue Oct 09 17:02:33 PDT 2007) Setup successful End of install phases.(Tue Oct 09 17:02:43 PDT 2007) WARNING: The following configuration scripts need to be executed as the "root" user. #!/bin/sh #Root script to run /u01/app/oracle/product/10.2.0/db_1/root.sh To execute the configuration scripts: 1. Open a terminal window 2. Log in as "root" 3. Run the scripts The cloning of OraDb10g_home1 was successful. Please check '/u01/app/oracle/oraInventory/logs/cloneActions2007-10-09_04-59-54PM.log' for more details. atlas.10GR2-> ## after above clone completes run ROOT.SH as ROOT ## atlas.10GR2-> su Password: # # /u01/app/oracle/product/10.2.0/db_1/root.sh Running Oracle10 root.sh script... The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /u01/app/oracle/product/10.2.0/db_1 Enter the full pathname of the local bin directory: [/usr/local/bin]: The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y Copying dbhome to /usr/local/bin ... The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y Copying oraenv to /usr/local/bin ... The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y Copying coraenv to /usr/local/bin ... Entries will be added to the /var/opt/oracle/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root.sh script. Now product-specific root actions will be performed. # ## ## Verify inventory can be read by OPATCH ## atlas.10GR2-> /u01/app/oracle/product/10.2.0/db_1/OPatch/opatch lsinventory Invoking OPatch 10.2.0.3.2 Oracle interim Patch Installer version 10.2.0.3.2 Copyright (c) 2007, Oracle Corporation. All rights reserved.. Oracle Home : /u01/app/oracle/product/10.2.0/db_1 Central Inventory : /u01/app/oracle/oraInventory from : /var/opt/oracle/oraInst.loc OPatch version : 10.2.0.3.2 OUI version : 10.2.0.3.0 OUI location : /u01/app/oracle/product/10.2.0/db_1/oui Log file location : /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch2007-10-09_17-09-19PM.log Lsinventory Output file location : /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2007-10-09_17-09-19PM.txt -------------------------------------------------------------------------------- Installed Top-level Products (2): Oracle Database 10g 10.2.0.1.0 Oracle Database 10g Release 2 Patch Set 2 10.2.0.3.0 There are 2 products installed in this Oracle Home. Interim patches (22) : Patch 6121268 : applied on Wed Sep 26 20:02:34 PDT 2007 Created on 11 Jun 2007, 05:26:11 hrs PST8PDT Bugs fixed: 6121268 Patch 6121267 : applied on Wed Sep 26 20:02:27 PDT 2007 Created on 12 Jun 2007, 02:58:15 hrs PST8PDT Bugs fixed: 6121267 Patch 6121266 : applied on Wed Sep 26 20:02:21 PDT 2007 Created on 12 Jun 2007, 02:57:08 hrs PST8PDT Bugs fixed: 6121266 Patch 6121264 : applied on Wed Sep 26 20:02:15 PDT 2007 Created on 12 Jun 2007, 02:55:35 hrs PST8PDT Bugs fixed: 6121264 Patch 6121263 : applied on Wed Sep 26 20:02:08 PDT 2007 Created on 12 Jun 2007, 02:54:23 hrs PST8PDT Bugs fixed: 6121263 Patch 6121261 : applied on Wed Sep 26 20:02:02 PDT 2007 Created on 11 Jun 2007, 01:57:45 hrs PST8PDT Bugs fixed: 6121261 Patch 6121260 : applied on Wed Sep 26 20:01:56 PDT 2007 Created on 11 Jun 2007, 00:43:23 hrs PST8PDT Bugs fixed: 6121260 Patch 6121258 : applied on Wed Sep 26 20:01:45 PDT 2007 Created on 12 Jun 2007, 08:36:08 hrs PST8PDT Bugs fixed: 6121258 Patch 6121257 : applied on Wed Sep 26 20:01:39 PDT 2007 Created on 12 Jun 2007, 01:54:53 hrs PST8PDT Bugs fixed: 6121257 Patch 6121250 : applied on Wed Sep 26 20:01:32 PDT 2007 Created on 11 Jun 2007, 21:47:03 hrs PST8PDT Bugs fixed: 6121250 Patch 6121249 : applied on Wed Sep 26 20:01:17 PDT 2007 Created on 11 Jun 2007, 21:46:24 hrs PST8PDT Bugs fixed: 6121249 Patch 6121248 : applied on Wed Sep 26 20:01:11 PDT 2007 Created on 11 Jun 2007, 08:52:17 hrs PST8PDT Bugs fixed: 6121248 Patch 6121247 : applied on Wed Sep 26 20:01:00 PDT 2007 Created on 10 Jun 2007, 23:58:00 hrs PST8PDT Bugs fixed: 6121247 Patch 6121246 : applied on Wed Sep 26 20:00:55 PDT 2007 Created on 12 Jun 2007, 08:53:32 hrs PST8PDT Bugs fixed: 6121246 Patch 6121245 : applied on Wed Sep 26 19:59:57 PDT 2007 Created on 10 Jun 2007, 23:05:51 hrs PST8PDT Bugs fixed: 6121245 Patch 6121244 : applied on Wed Sep 26 19:59:42 PDT 2007 Created on 10 Jun 2007, 23:01:41 hrs PST8PDT Bugs fixed: 6121244 Patch 6121243 : applied on Wed Sep 26 19:59:27 PDT 2007 Created on 10 Jun 2007, 22:16:48 hrs PST8PDT Bugs fixed: 6121243 Patch 6121242 : applied on Wed Sep 26 19:59:21 PDT 2007 Created on 11 Jun 2007, 21:43:02 hrs PST8PDT Bugs fixed: 6121242 Patch 6121183 : applied on Wed Sep 26 19:59:13 PDT 2007 Created on 12 Jun 2007, 01:52:07 hrs PST8PDT Bugs fixed: 6121183 Patch 6079591 : applied on Wed Sep 26 19:59:07 PDT 2007 Created on 14 Jun 2007, 03:24:12 hrs PST8PDT Bugs fixed: 6079591 Patch 5556081 : applied on Wed Sep 26 19:27:35 PDT 2007 Created on 9 Nov 2006, 22:20:50 hrs PST8PDT Bugs fixed: 5556081 Patch 5557962 : applied on Wed Sep 26 19:27:24 PDT 2007 Created on 9 Nov 2006, 23:23:06 hrs PST8PDT Bugs fixed: 4269423, 5557962, 5528974 -------------------------------------------------------------------------------- OPatch succeeded. atlas.10GR2->
source:-http://kb.dbatoolz.com/ex/pwpkg.dp?p_key=11&p_what=detail&p_sr_id=2694&p_sc_id=19&p_debug=&p_search=&p_suser=&p_sdate=#top
No comments:
Post a Comment