1.目录拷贝:
[root@dg2 ~]# cp -Rp /u01/app/oracle/product/11.1.0/* /u01/app/oracle/product/11.1.0.7/
2.如果之前执行clone.pl失败过,可能存在ORACLE_HOME_NAME信息,用下面的方法清除:
下面的操作在原有ORACLE_HOME下进行
[oracle@dg2 cfgtoollogs]$ find /u01 -name "runInstaller"
/u01/app/oracle/product/11.1.0/oui/bin/runInstaller
/u01/app/oracle/product/11.1.0.7/oui/bin/runInstaller
[oracle@dg2bin]$./runInstaller-detachHome ORACLE_HOME="/u01/app/oracle/product/11.1.0.7"
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 2425 MB Passed
Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/app/oraInventory
'DetachHome' was successful.
[oracle@dg2 bin]$
3,开始执行clone.pl 此操作在新的ORACLE_HOME下进行:
[oracle@dg2 bin]$ pwd
/u01/app/oracle/product/11.1.0.7/clone/bin
[oracle@dg2 bin]$ perl clone.pl ORACLE_HOME="/u01/app/oracle/product/11.1.0.7/" ORACLE_HOME_NAME="ORAhome1" ORACLE_BASE="/u01/app/oracle/"
./runInstaller -silent -clone -waitForCompletion "ORACLE_HOME=/u01/app/oracle/product/11.1.0.7/" "ORACLE_HOME_NAME=ORAhome1"
"ORACLE_BASE=/u01/app/oracle/" -silent
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 2425 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2012-11-06_03-26-35AM. Please wait ...Oracle Universal
Installer, Version 11.1.0.6.0 Production
Copyright (C) 1999, 2007, Oracle. All rights reserved.
You can find the log of this install session at:
/u01/app/oraInventory/logs/cloneActions2012-11-06_03-26-35AM.log
OUI-10197:Unable to create a new Oracle Home at /u01/app/oracle/product/11.1.0.7/. Oracle Home already exists at this location.
Select another location.
SEVERE:OUI-10197:Unable to create a new Oracle Home at /u01/app/oracle/product/11.1.0.7/. Oracle Home already exists at this
上面的报错用步骤二的方法解决
location. Select another location.
解决后重新执行clone.pl
[oracle@dg2 bin]$ perl clone.pl ORACLE_HOME="/u01/app/oracle/product/11.1.0.7/" ORACLE_HOME_NAME="ORAhome1"
ORACLE_BASE="/u01/app/oracle/"
./runInstaller -silent -clone -waitForCompletion "ORACLE_HOME=/u01/app/oracle/product/11.1.0.7/" "ORACLE_HOME_NAME=ORAhome1"
"ORACLE_BASE=/u01/app/oracle/" -silent
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 2425 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2012-11-06_03-28-12AM. Please wait ...Oracle Universal
Installer, Version 11.1.0.6.0 Production
Copyright (C) 1999, 2007, Oracle. All rights reserved.
You can find the log of this install session at:
/u01/app/oraInventory/logs/cloneActions2012-11-06_03-28-12AM.log
.................................................................................................... 100% Done.
Installation in progress (Tue Nov 06 03:28:36 EST 2012)
............................................................................ 76%
Done.
Install successful
Linking in progress (Tue Nov 06 03:28:48 EST 2012)
Link successful
Setup in progress (Tue Nov 06 03:30:58 EST 2012)
Setup successful
End of install phases.(Tue Nov 06 03:31:03 EST 2012)
WARNING:
The following configuration scripts need to be executed as the "root" user.
#!/bin/sh
#Root script to run
/u01/app/oracle/product/11.1.0.7/root.sh
To execute the configuration scripts:
1. Open a terminal window
2. Log in as "root"
3. Run the scripts
The cloning of ORAhome1 was successful.
Please check '/u01/app/oraInventory/logs/cloneActions2012-11-06_03-28-12AM.log' for more details.
按提示执行脚本:
[root@dg2 11.1.0.7]# cd /u01/app/oracle/product/11.1.0.7/
[root@dg2 11.1.0.7]# ls
apex csmig install.platform lib odbc owm root.sh.old.1 tg4ingr
assistants css instantclient lib32 olap perl scheduler tg4sybs
bin ctx inventory log OPatch plsql slax tg4tera
ccr dbs j2ee md opmn precomp sqldeveloper uix
cdata demo javavm mesg oracore racg sqlj ultrasearch
cfgtoollogs diagnostics jdbc mgw oraInst.loc rdbms sqlplus wwg
clone has jdk network ord relnotes srvm xdk
config hs jlib nls oui root.sh sysman
crs install ldap oc4j owb root.sh.old tg4ifmx
[root@dg2 11.1.0.7]# ./root.sh
[root@dg2 11.1.0.7]#
4.运行补丁及软件升级克隆的新的ORACLE_HOME:
[root@dg2 ~]# xhost +
access control disabled, clients can connect from any host
[root@dg2 ~]# su - oracle
[oracle@dg2 ~]$ ls
Disk1 README.html
[oracle@dg2 ~]$ cd Disk1/
[oracle@dg2 Disk1]$ LS
-bash: LS: command not found
[oracle@dg2 Disk1]$ ls
11107_buglist.htm install patch_note.htm response runInstaller stage
[oracle@dg2 Disk1]$ ./runInstaller
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 80 MB. Actual 6618 MB Passed
Checking swap space: must be greater than 150 MB. Actual 2426 MB Passed
Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2012-11-06_03-37-00AM. Please wait ...[oracle@dg2 Disk1]$ Oracle
Universal Installer, Version 11.1.0.7.0 Production
Copyright (C) 1999, 2008, Oracle. All rights reserved.
以下是操作过程截图:
注意在上图中的name 要选择clone.pl中指定的ORACLE_HOME_NAME
按提示执行脚本:
[root@dg2 ~]# /u01/app/oracle/product/11.1.0.7/root.sh
Running Oracle 11g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/11.1.0.7
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]:
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
Entries will be added to the /etc/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.
Finished product-specific root actions.
要注意的问题:
1.clone oracle software 之后监听文件中指定的oracle_home要调整,观察TNSNAMS.ORA文件是否有变动,改回原来的配置,services 均为orcl
2.删除还原点后,如果重启数据库要首先在MOUNT状态下关闭flashback,否则会在重启的过程中报错
待解决:
下面的报错是由于OLAP CATALOG组件升级失败造成的,可重建此组件或删除来解决
Tue Nov 06 06:02:07 2012
Errors in file /u01/app/oracle/diag/rdbms/orcl_st/orcl/trace/orcl_j000_27361.trc:
ORA-12012: error on auto execute of job 26
ORA-06510: PL/SQL: unhandled user-defined exception
ORA-06512: at "WKSYS.WK$UPD_INST", line 9
ORA-06512: at "WKSYS.WK$UPD_INST_TRG13", line 1
ORA-04088: error during execution of trigger 'WKSYS.WK$UPD_INST_TRG13'
ORA-06512: at "WKSYS.WK_JOB", line 443
ORA-06510: PL/SQL: unhandled user-defined exception
ORA-06512: at "WKSYS.WK_ADM", line 1563
ORA-01403: no data found
ORA-06512: at line 1
Tue Nov 06 06:06:07 2012
Errors in file /u01/app/oracle/diag/rdbms/orcl_st/orcl/trace/orcl_j000_27449.trc:
ORA-12012: error on auto execute of job 26
ORA-06510: PL/SQL: unhandled user-defined exception
ORA-06512: at "WKSYS.WK$UPD_INST", line 9
ORA-06512: at "WKSYS.WK$UPD_INST_TRG13", line 1
ORA-04088: error during execution of trigger 'WKSYS.WK$UPD_INST_TRG13'
ORA-06512: at "WKSYS.WK_JOB", line 443
ORA-06510: PL/SQL: unhandled user-defined exception
ORA-06512: at "WKSYS.WK_ADM", line 1563
ORA-01403: no data found
ORA-06512: at line 1
Tue Nov 06 06:14:08 2012
Errors in file /u01/app/oracle/diag/rdbms/orcl_st/orcl/trace/orcl_j000_27624.trc:
ORA-12012: error on auto execute of job 26
ORA-06510: PL/SQL: unhandled user-defined exception
ORA-06512: at "WKSYS.WK$UPD_INST", line 9
ORA-06512: at "WKSYS.WK$UPD_INST_TRG13", line 1
ORA-04088: error during execution of trigger 'WKSYS.WK$UPD_INST_TRG13'
ORA-06512: at "WKSYS.WK_JOB", line 443
ORA-06510: PL/SQL: unhandled user-defined exception
ORA-06512: at "WKSYS.WK_ADM", line 1563
ORA-01403: no data found
ORA-06512: at line 1
Tue Nov 06 06:30:09 2012
Errors in file /u01/app/oracle/diag/rdbms/orcl_st/orcl/trace/orcl_j000_27959.trc:
ORA-12012: error on auto execute of job 26
ORA-06510: PL/SQL: unhandled user-defined exception
ORA-06512: at "WKSYS.WK$UPD_INST", line 9
ORA-06512: at "WKSYS.WK$UPD_INST_TRG13", line 1
ORA-04088: error during execution of trigger 'WKSYS.WK$UPD_INST_TRG13'
ORA-06512: at "WKSYS.WK_JOB", line 443
ORA-06510: PL/SQL: unhandled user-defined exception
ORA-06512: at "WKSYS.WK_ADM", line 1563
ORA-01403: no data found
ORA-06512: at line 1
几则错误处理
Cloning An Existing Oracle11g Release 1 (11.1.0.x) RDBMS Installation Using OUI [ID 559305.1]
________________________________________
修改时间:2012-1-24 类型:BULLETIN 状态UBLISHED 优先级:3
In this Document
Purpose
Scope and Application
Cloning An Existing Oracle11g Release 1 (11.1.0.x) RDBMS Installation Using OUI
References
________________________________________
Applies to:
Oracle Server - Enterprise Edition - Version: 11.1.0.6 to 11.1.0.7 - Release: 11.1 to 11.1
Oracle Universal Installer - Version: 11.1.0.6 to 11.1.0.7 [Release: 11.1 to 11.1]
Information in this document applies to any platform.
Purpose
The purpose of this bulletin is to describe how to clone an existing Oracle11g Release 1 (11.1.0.x) RDBMS installation using Oracle Universal Installer (OUI).
NOTE: This note should only be used for cloning single-instance (non-RAC) homes. It should not be used for cloning RAC, CRS or ASM homes.
Scope and Application
This bulletin is intended for anyone who is responsible for installing Oracle software onto a server or cloning an existing Oracle software installation.
Please note that Perl 5.6 or higher is required when cloning Oracle11g Release 1
NOTE: When cloning an installation to a new/separate server, it is mandatory to check that the server meets all of the prerequisite requirements because the "perl clone.pl" cloning method (see Step 3 in the section below) does not check them. See Note:169706.1 or the Installation Guide for a list of these.
Cloning An Existing Oracle11g Release 1 (11.1.0.x) RDBMS Installation Using OUI
Step 1
Install the software you want to clone into the "source" home.
For Oracle11g Release 1, install the base software (11.1.0.6 for most platforms) then any required products from the Companion CD and (when available) any required patchsets and/or patches.
Please note that if you are going to use the "perl clone.pl" method of cloning (see step 3) then you need to install the DB Console so that the required Perl files are installed in $ORACLE_HOME/clone/bin
If you are going to use the "./runInstaller -clone" method of cloning then DB Console is not required.
Step 2
Make a copy of the existing (source) Oracle RDBMS installation. If the clone (target) installation is on the same server then the "cp -Rp" command could be used.
For example:
cp -Rp /u01/app/oracle/product/11.1.0 /u01/app/oracle/product/11.1.0_clone
NOTE: It was previously recommended that customers run this command as the 'root' user (to make sure that the ownership of the files is preserved correctly) but it appears that this is not necessary.
Alternatively, the source installation could be packed up using the "tar" command:
cd /u01/app/oracle/product/11.1.0
tar -cvf /tmp/source.tar .
and then moved to the target area (on the same server, or another server) and unpacked:
cd /u01/app/oracle/product/11.1.0_clone
tar -xvf /tmp/source.tar
NOTE: It was previously recommended that customers run this command as the 'root' user (to make sure that the ownership of the files is preserved correctly) but it appears that this is not necessary.
IMPORTANT NOTES:
Before going to step 3, it is important to spend some time checking that the file permissions on files/directories in the target home match those in the source home. Please also check that the validity of any symbolic links has been preserved. Ensure that the links point to files/directories in the new target home, not files/directories in the source home. If necessary, re-create the links.
Also make sure that an oraInst.loc file exists, otherwise clone.pl may fail with the following errors:
SEVERE:OUI-10036:Could not create the inventory location. You may not have permission to write to this location.
SEVERE:OUI-10180:Invalid Operating System group name specified.
If you are cloning on AIX, make sure that the rootpre.sh script has been executed on the target server. This can be found on the latest version of the Oracle11g Release 1 media or various other locations (see Note:468472.1)
Step 3
Run the following command to clone the installation with the Oracle Universal Installer (OUI)
cd $ORACLE_HOME/clone/bin
perl clone.pl ORACLE_HOME="<target_home>" ORACLE_HOME_NAME="<unique_home_name>" ORACLE_BASE="<path_for_ORACLE_BASE>"
If no /etc/oraInst.loc (AIX, Linux) or /var/opt/oracle/oraInst.loc (Solaris, HP-UX) file exists on the server because Oracle has never been installed on the server before, create one. The file should contain a line like this:
inventory_loc=<path_to_oraInventory>
For example:
inventory_loc=/u01/app/oracle/oraInventory
If an oraInst.loc file exists on the server but is in a different location, edit the $ORACLE_HOME/clone/config/cs.properties file to add “–invPtrLoc <path>/oraInst.loc” to the clone_command_line.
This file can also be edited to add “-ignoreSysPrereqs” if required.
If clone.pl does not exist, you did not install DB Console (as instructed in step 1). You should either go back and install it in the source home then repeat step 2, or use the alternative method of cloning described below.
The alternative method of cloning (which does not require the DBConsole providing the Perl scripts) is to use the following commands:
./runInstaller -clone -silent -ignorePreReq ORACLE_HOME="<target_home>" ORACLE_HOME_NAME="<unique_home_name>" ORACLE_BASE="<path_for_ORACLE_BASE>"
If necessary, add "-invPtrLoc <path>/oraInst.loc" or "-ignoreSysPrereqs" to the command line.
If the server has more than one Perl version installed then it may be necessary to specify the PERL5LIB environment variable so that the versions of the Perl modules match with the Perl version used.
Note that the full path for the target ORACLE_HOME should be provided (for example, /u01/app/oracle/product/11.1.0_clone)
Also note that the home name must be unique (that is, it must not already exist in the central inventory file <path>/oraInventory/ContentsXML/inventory.xml).
NOTE: if you are cloning on a server which already has a central inventory and the target home already exists in <path>/oraInventory/ContentsXML/inventory.xml then you should run the following command to 'detach' this home from the central inventory before performing the clone operation:
./runInstaller -detachHome ORACLE_HOME=<target_home>
To clone an Oracle11g Release 1 client installation, run OUI directly:
./runInstaller -clone -silent -noconfig ORACLE_HOME="<target_home>" ORACLE_HOME_NAME="<unique_home_name>" ORACLE_BASE="<path_for_ORACLE_BASE>"
NOTE: if you are cloning an 11.1.0.7 Standard Edition installation, you will need to follow Note:751827.1 after cloning to resolve a known problem.
NOTE: If the privileged groups (SYSDBA and SYSOPER) in the source home were not the default ("dba") then after cloning you will need to follow steps 6, 7, 8 and 9 from Note:558478.1 so that the config.c/config.s in the target home references the required Unix groups and this information is built into the $ORACLE_HOME/bin/oracle binary in the target home.
Step 4
On Unix/Linux installations, you will now need to run root.sh (as root) from the target home
Notes
• For Windows, use setup.exe (instead of runInstaller) to start OUI
• Log files are created in the central inventory (<path>/oraInventory/logs) and in the target home ($ORACLE_HOME/clone/logs)
References
NOTE:300062.1 - How To Clone An Existing RDBMS Installation Using OUI
NOTE:468472.1 - The "rootpre.sh" Script And "rootpre" Directory Are Missing From The Oracle11g Release 1 (11.1.0.6) Media
NOTE:549268.1 - How To Clone An Existing RDBMS Installation Using EMGC
NOTE:751827.1 - Cloning An 11.1.0.7 Standard Edition Installation Changes It To Enterprise Edition
• Oracle Database Products > Oracle Database > Oracle Database > Oracle Server - Enterprise Edition > Dataserver Installation and Relinking issue > Cloning ORACLE_HOME
• Oracle Database Products > Oracle Database > Oracle Database > Oracle Universal Installer > Oracle Universal Installer
During Cloning, clone.pl Fails With OUI-10197 [ID 557681.1]
________________________________________
In this Document
Symptoms
Cause
Solution
References
________________________________________
Applies to:
Oracle Universal Installer - Version: 10.2.0.1 and later [Release: 10.2 and later ]
Oracle Server - Enterprise Edition - Version: 10.2.0.1 and later [Release: 10.2 and later]
Oracle Server - Standard Edition - Version: 10.2.0.1 and later [Release: 10.2 and later]
Information in this document applies to any platform.
***Checked for relevance on 26-NOV-2010 ***
Symptoms
You are following Note:559304.1 to clone an Oracle10gR2 installation or Note:559305.1 to clone an Oracle11gR1 installation
Due to a problem when $ORACLE_HOME/clone/bin/clone.pl was first executed, you need to execute it again. This time it fails with the following error:
SEVERE:OUI-10197:Unable to create a new Oracle Home at <ORACLE_HOME_path>. Oracle Home already exists at this location. Select another location.
Cause
The home is already referenced in the central inventory, <path>/oraInventory/ContentsXML/inventory.xml
Before re-cloning the home, it needs to be detached from the central inventory
Note: Manually editing the inventory.xml file is unsupported
Solution
To detach the home from the central inventory, run the following command:
./runInstaller -detachHome ORACLE_HOME=<ORACLE_HOME_path>
Now the home has been detached, clone.pl can be executed again
References
NOTE:300062.1 - How To Clone An Existing RDBMS Installation Using OUI
NOTE:559304.1 - Cloning An Existing Oracle10g Release 2 (10.2.0.x) RDBMS Installation Using OUI
NOTE:559305.1 - Cloning An Existing Oracle11g Release 1 (11.1.0.x) RDBMS Installation Using OUI
NOTE:1154613.1 - Master Note For Cloning Oracle Database Server ORACLE_HOME's Using the Oracle Universal Installer (OUI)
NOTE:1351051.2 - Information Center: Install and Configure Database Server/Client Installations
Oracle Database Products > Oracle Database > Oracle Database > Oracle Universal Installer > Oracle Universal Installer > software Cloning
• Oracle Database Products > Oracle Database > Oracle Database > Oracle Server - Enterprise Edition > Dataserver Installation and Relinking issue > Cloning ORACLE_HOME
• Oracle Database Products > Oracle Database > Oracle Database > Oracle Server - Standard Edition > Standard Edition Installation and Relinking Issues > Cloning ORACLE_HOME
|
|