I have a base on version (10.1.3.1) on that box and this article is about to show how to clone, patch and replace the original JVM of an Oracle AS home.
Logged in as oracle.
$ id -a
uid=1001(oracle) gid=1001(oinstall) groups=1001(oinstall),1002(dba)
List of the non-RDBMS Oracle homes on the machine.
$ egrep -v '^$|^#' /etc/oratab | grep '^*'
*AS1:/usr/lib/oracle/app/oracle/product/10.1.3.1/as_1:N
*MRCA:/usr/lib/oracle/app/oracle/product/10.1.4.0/mrca:N
*CLN:/usr/lib/oracle/app/oracle/product/10.2.0/client_1:N
Select the appropriate Oracle home and check the environment before proceeding to patching.
$ . oraenv
ORACLE_SID = [*AS1] ?
$ env | grep -i ora
USER=oracle
LD_LIBRARY_PATH=/usr/lib/oracle/app/oracle/product/10.1.3.1/as_1/lib
ORACLE_SID=*AS1
USERNAME=oracle
TNS_ADMIN=/home/oracle/network/admin
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin:/usr/lib/oracle/app/oracle/product/10.1.3.1/as_1/bin
PWD=/home/oracle
HOME=/home/oracle
LOGNAME=oracle
ORACLE_HOME=/usr/lib/oracle/app/oracle/product/10.1.3.1/as_1
Check perl where it is and what's the version of it.
$ which perl
/usr/bin/perl
$ perl -v
This is perl, v5.8.8 built for i486-linux-gnu-thread-multi
Copyright 1987-2006, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
Cloning an Oracle AS home is quite easy, first I prepare the current home (the process is further detailed in Oracle AS's admin guide)
$ perl $ORACLE_HOME/clone/bin/prepare_clone.pl ORACLE_HOME=$ORACLE_HOME
Clone log file location: /usr/lib/oracle/app/oracle/product/10.1.3.1/as_1/clone/logs/clone1245401177.log
Error log file location: /usr/lib/oracle/app/oracle/product/10.1.3.1/as_1/clone/logs/error1245401177.log
Fri Jun 19 10:46:17 2009 INFO: Starting with the Prepare Clone operation at the source
Fri Jun 19 10:46:17 2009 INFO: The temp directory being used is /tmp
Fri Jun 19 10:46:17 2009 INFO: The prepare clone operation completed successfully.
After the preparation finished copy the original Oracle home as it is and do the cloning.
$ cp -Rpv $ORACLE_HOME $ORACLE_HOME/../as_2 &< copy.log
$ export ORACLE_HOME=/usr/lib/oracle/app/oracle/product/10.1.3.1/as_2
$ perl $ORACLE_HOME/clone/bin/clone.pl ORACLE_HOME=$ORACLE_HOME ORACLE_HOME_NAME=oracleas2 -instance as_2 -oc4jadmin_old_password <old_pwd> -oc4jadmin_new_password <new_pwd>
Execute root.sh since it always has to be done in situations like this.
# /usr/lib/oracle/app/oracle/product/10.1.3.1/as_2/root.sh
Registering the newly created Oracle AS home must be done manually.
$ vim /etc/oratab
...
*AS1:/usr/lib/oracle/app/oracle/product/10.1.3.1/as_1:N
*AS2:/usr/lib/oracle/app/oracle/product/10.1.3.1/as_2:N
...
Oracle AS patchset installation is coming which is very common, so I'm not going to specify it in-depth.
Tell OPMN to shut all running managed processes down.
$ . oraenv
ORACLE_SID = [*AS1] ? *AS2
$ $ORACLE_HOME/opmn/bin/opmnctl shutdown
opmnctl: shutting down opmn and all managed processes...
Unpack the patch set and launch the installer.
$ mkdir -p ~/install/ias_patch3
$ cd ~/install/ias_patch3
$ unzip /path/to/Downloads/p7272722_101340_LINUX.zip
$ cd Disk1
$ ./runInstaller -ignoreSysPrereqs
No comments:
Post a Comment