Anda di halaman 1dari 32

This document specifies on how to install 10.2.0.4 patchset on top of 10.2.0.1 binaries and upgrading database from 10.2.0.

1 to 10.2.0.4 Below are the server and database specifications I used OS : Oracle Enterprise Linux 4.7 Database : Oracle 10.2.0.1 STEPS for performing 10.2.0.4 binaries installation 1. We need to take full backup of the database using RMAN
[oracle@dbserver ~]$ rman target /

Recovery Manager: Release 10.2.0.1.0 - Production on Mon Jul 2 21:57:36 2012

Copyright (c) 1982, 2005, Oracle. All rights reserved.

connected to target database: PRODDB (DBID=527661573)

RMAN> backup database plus archivelog;

Starting backup at 02-JUL-12 current log archived using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=154 devtype=DISK channel ORA_DISK_1: starting archive log backupset channel ORA_DISK_1: specifying archive log(s) in backup set input archive log thread=1 sequence=1 recid=1 stamp=787615069

channel ORA_DISK_1: starting piece 1 at 02-JUL-12 channel ORA_DISK_1: finished piece 1 at 02-JUL-12 piece handle=/u01/ora10g/flash_recovery_area/PRODDB/backupset/2012_07_02/o1_mf_annnn_TAG201207 02T215750_7z3m07c2_.bkp tag=TAG20120702T215750 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:04 Finished backup at 02-JUL-12

Starting backup at 02-JUL-12 using channel ORA_DISK_1 channel ORA_DISK_1: starting full datafile backupset channel ORA_DISK_1: specifying datafile(s) in backupset input datafile fno=00001 name=/u01/oradata/proddb/system01.dbf input datafile fno=00003 name=/u01/oradata/proddb/sysaux01.dbf input datafile fno=00002 name=/u01/oradata/proddb/undotbs01.dbf input datafile fno=00004 name=/u01/oradata/proddb/users01.dbf channel ORA_DISK_1: starting piece 1 at 02-JUL-12 channel ORA_DISK_1: finished piece 1 at 02-JUL-12 piece handle=/u01/ora10g/flash_recovery_area/PRODDB/backupset/2012_07_02/o1_mf_nnndf_TAG201207 02T215754_7z3m0bvf_.bkp tag=TAG20120702T215754 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:45 channel ORA_DISK_1: starting full datafile backupset channel ORA_DISK_1: specifying datafile(s) in backupset including current control file in backupset including current SPFILE in backupset channel ORA_DISK_1: starting piece 1 at 02-JUL-12 channel ORA_DISK_1: finished piece 1 at 02-JUL-12

piece handle=/u01/ora10g/flash_recovery_area/PRODDB/backupset/2012_07_02/o1_mf_ncsnf_TAG2012070 2T215754_7z3m1sdd_.bkp tag=TAG20120702T215754 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03 Finished backup at 02-JUL-12

Starting backup at 02-JUL-12 current log archived using channel ORA_DISK_1 channel ORA_DISK_1: starting archive log backupset channel ORA_DISK_1: specifying archive log(s) in backup set input archive log thread=1 sequence=2 recid=2 stamp=787615123 channel ORA_DISK_1: starting piece 1 at 02-JUL-12 channel ORA_DISK_1: finished piece 1 at 02-JUL-12 piece handle=/u01/ora10g/flash_recovery_area/PRODDB/backupset/2012_07_02/o1_mf_annnn_TAG201207 02T215843_7z3m1wpq_.bkp tag=TAG20120702T215843 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02 Finished backup at 02-JUL-12

2. Now, we need to take ORACLE HOME backup. For this we will tar the directories

[oracle@dbserver ~]$ tar -cvf /u03/ORACLE_HOME_10.2.0.1.tar /u01/ora10g /u01/ora10g/ /u01/ora10g/opmn/ /u01/ora10g/opmn/bin/ /u01/ora10g/opmn/bin/ons /u01/ora10g/opmn/logs/

/u01/ora10g/opmn/mesg/ /u01/ora10g/opmn/mesg/ensus.msb /u01/ora10g/opmn/mesg/opmus.msb /u01/ora10g/opmn/conf/ /u01/ora10g/opmn/conf/ons.config /u01/ora10g/opmn/lib/ .. /u01/ora10g/lib/libnmefos.so /u01/ora10g/lib/libplp10.a /u01/ora10g/lib/libnsgrsh10.a /u01/ora10g/lib/xmlcomp.jar [oracle@dbserver ~]$

3. Take Oracle Inventory backup using tar command

[oracle@dbserver ~]$ more /etc/oraInst.loc inventory_loc=/home/oracle/oraInventory inst_group=oinstall [oracle@dbserver ~]$ [oracle@dbserver ~]$ tar -cvf /u03/inventory_backup.tar /home/oracle/oraInventory /home/oracle/oraInventory/ /home/oracle/oraInventory/logs/ /home/oracle/oraInventory/logs/OPatch2012-06-29_07-55-22-PM.log /home/oracle/oraInventory/logs/oraInstall2012-07-02_07-05-28PM.out /home/oracle/oraInventory/logs/OPatch2012-06-29_07-59-06-PM.log /home/oracle/oraInventory/logs/results/ /home/oracle/oraInventory/logs/results/db/

/home/oracle/oraInventory/logs/results/db/db_prereq_results.xml /home/oracle/oraInventory/logs/results/patch_prereqs_results.xml /home/oracle/oraInventory/logs/OPatch2012-06-29_07-58-32-PM.log /home/oracle/oraInventory/logs/OPatch2012-06-29_07-55-36-PM.log /home/oracle/oraInventory/logs/OPatch2012-06-29_07-54-55-PM.log /home/oracle/oraInventory/logs/OPatch2012-06-29_07-59-28-PM.log /home/oracle/oraInventory/logs/OPatch2012-06-29_07-57-32-PM.log /home/oracle/oraInventory/logs/OPatch2012-06-29_07-58-44-PM.log /home/oracle/oraInventory/logs/oraInstall2012-07-02_10-10-48AM.err /home/oracle/oraInventory/logs/OPatch2012-06-29_07-58-11-PM.log /home/oracle/oraInventory/logs/OPatch2012-06-29_07-52-52-PM.log /home/oracle/oraInventory/logs/OPatch2012-06-29_07-51-18-PM.log /home/oracle/oraInventory/logs/OPatch2012-06-29_07-52-36-PM.log /home/oracle/oraInventory/logs/OPatch2012-06-29_07-54-23-PM.log /home/oracle/oraInventory/logs/OPatch2012-06-29_07-58-38-PM.log /home/oracle/oraInventory/oui/ /home/oracle/oraInventory/oui/srcs.lst /home/oracle/oraInventory/Contents/ /home/oracle/oraInventory/Contents/oneoffs1.oo /home/oracle/oraInventory/Contents/CompsList0.ser /home/oracle/oraInventory/Contents/oneoffs0.oo /home/oracle/oraInventory/Contents/CompsList2.ser /home/oracle/oraInventory/Contents/oneoffs2.oo /home/oracle/oraInventory/Contents/OracleHomesList.ser /home/oracle/oraInventory/Contents/PatchesList2.ser /home/oracle/oraInventory/Contents/PatchesList1.ser /home/oracle/oraInventory/Contents/PatchesList0.ser /home/oracle/oraInventory/Contents/CompsList1.ser

/home/oracle/oraInventory/orainstRoot.sh /home/oracle/oraInventory/ContentsXML/ /home/oracle/oraInventory/ContentsXML/comps.xml /home/oracle/oraInventory/ContentsXML/inventory.xml /home/oracle/oraInventory/ContentsXML/libs.xml /home/oracle/oraInventory/sessionContext.ser /home/oracle/oraInventory/backup/ /home/oracle/oraInventory/backup/2012-07-02_07-15-09PM/ /home/oracle/oraInventory/backup/2012-07-02_07-15-09PM/ContentsXML/ /home/oracle/oraInventory/backup/2012-07-02_07-15-09PM/ContentsXML/comps.xml /home/oracle/oraInventory/backup/2012-07-02_07-15-09PM/ContentsXML/inventory.xml /home/oracle/oraInventory/backup/2012-07-02_07-15-09PM/ContentsXML/libs.xml /home/oracle/oraInventory/backup/2012-06-18_07-11-37AM/ /home/oracle/oraInventory/backup/2012-06-18_07-11-37AM/ContentsXML/ /home/oracle/oraInventory/backup/2012-06-18_07-11-37AM/ContentsXML/comps.xml /home/oracle/oraInventory/backup/2012-06-18_07-11-37AM/ContentsXML/inventory.xml /home/oracle/oraInventory/backup/2012-06-18_07-11-37AM/ContentsXML/libs.xml /home/oracle/oraInventory/install.platform /home/oracle/oraInventory/oraInst.loc /home/oracle/oraInventory/oraInstaller.properties

4. Shutdown the databases, listener, EM etc oracle services under this ORACLE_HOME

[oracle@dbserver ~]$ ps -ef | grep smon oracle 1494 1 0 21:44 ? 00:00:00 ora_smon_proddb

oracle 2832 5294 0 22:11 pts/1 00:00:00 grep smon

[oracle@dbserver ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jul 2 22:11:55 2012

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options

SQL> shut immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> exit Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options

[oracle@dbserver ~]$ ps -ef | grep tns oracle 2869 5294 0 22:12 pts/1 00:00:00 grep tns oracle 5687 1 0 18:48 ? 00:00:00 /u01/ora10g/bin/tnslsnr LISTENER_PRODDB inherit

[oracle@dbserver ~]$ lsnrctl stop LISTENER_PRODDB

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 02-JUL-2012 22:13:05

Copyright (c) 1991, 2005, Oracle. All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=TCP)(HOST=dbserver.kannatechnologies.com)(PORT=1523)) The command completed successfully

[oracle@dbserver ~]$ ps -ef | grep ema oracle 843 31476 0 21:40 pts/2 00:00:02 /u01/ora10g/bin/emagent

oracle 2879 5294 0 22:13 pts/1 00:00:00 grep ema

[oracle@dbserver ~]$ emctl stop dbconsole TZ set to Asia/Calcutta Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved. http://dbserver.kannatechnologies.com:1158/em/console/aboutApplication Stopping Oracle Enterprise Manager 10g Database Control ... ... Stopped.

5. Unzip the 10.2.0.4 patchset software to a location. This will create a directory by name Disk1

[oracle@dbserver u03]$ unzip p6810189_10204_Linux-x86.zip .. extracting: Disk1/install/images/rdbms_7.gif extracting: Disk1/install/images/rdbms_8.gif inflating: Disk1/install/lsnodes extracting: Disk1/install/addLangs.sh inflating: Disk1/install/addNode.sh inflating: Disk1/install/oraparamsilent.ini

inflating: Disk1/10204_buglist.htm

6. Invoke VNCSERVER in order to initiate GUI on VNC VIEWER

[oracle@dbserver u03]$ cd /usr/bin [oracle@dbserver bin]$ ./vncserver vncserver: couldn't find "xauth" on your PATH. You will get above error because of X11R6 utility is missing from PATH variable. So add it as shown below

[oracle@dbserver bin]$ echo $PATH /usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/oracle/bin:/u01/ora10g/bin [oracle@dbserver bin]$ export PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/oracle/bin:/u01/ora10g/bin:/usr/X11R6/bin [oracle@dbserver bin]$ [oracle@dbserver bin]$ ./vncserver

New 'dbserver.kannatechnologies.com:2 (oracle)' desktop is dbserver.kannatechnologies.com:2

Starting applications specified in /home/oracle/.vnc/xstartup Log file is /home/oracle/.vnc/dbserver.kannatechnologies.com:2.log

7. Invoke VNC VIEWER from windows (local machine) and goto Disk1 directory. Start runInstaller from there

If correct ORACLE_HOME is not pointing here, please use browse option and select it

In the next screen, you need to provide My Oracle Support details. But I have not seen most od DBAs really provide any details

Execute root.sh as root user (in real time, DBAs will not have root access, so to execute this script SYS admins will help us)

[oracle@dbserver ~]$ su - root Password: [root@dbserver ~]# /u01/ora10g/root.sh Running Oracle10 root.sh script...

The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /u01/ora10g

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.

8. Now that 10.2.0.4 binaries installation completed. Now we need to upgrade our database to 10.2.0.4 This we can either using DBUA or Manual method. In this document, I am showing how to do that using DBUA DBUA Database upgrade assistant is used to upgrade database to higher versions and can be invoked just like DBCA. The disadvantage of DBUA is, it can be used only once

In the next screen, DBUA provides the option for taking backup. If we have not done backup already, we can use this

Below is the method to find out if upgrade is successful or not

Anda mungkin juga menyukai