1. Current Version Details :
=====================
Database : 9.2.0.5
Application : 11.5.10
Refer Doc : Oracle Database Upgrade Path Reference List (Doc ID 730365.1)
1. Backup the Database before patch set installation.
2. Download and Extract the patch set Installation Software:
=============================================
Download and extract the patch set p4547809_9208_LINUX.zip installation archive to a directory that is not the Oracle home directory or under the Oracle home directory. For example, Oracle_patch.
Enter the following commands to unzip and extract the installation files:
$ unzip p4547809_9208_LINUX.zip
3. Install the 9.2.0.8.0 patchset on top of the existing 9.2.0.X.0 ORACLE_HOME:
=============================================================
[oraprod@db 9.2.0.8patches]$ pwd
/u01/upgrade/9.2.0.8patches
[oraprod@db 9.2.0.8patches]$ ls -ltr
total 374368
-rwxr-xr-x 1 oraprod dba 143435 Aug 22 2006 README.html
-rwxr-xr-x 1 oraprod dba 143435 Aug 22 2006 README.htm
drwxr-xr-x 7 oraprod dba 4096 Aug 22 2006 Disk1
drwxr-xr-x 5 oraprod dba 4096 Aug 22 2006 Translations
-rw-r--r-- 1 oraprod dba 382660178 Feb 9 14:26 p4547809_92080_LINUX.zip
4. Set the ORACLE_HOME and ORACLE_SID Environment Variables:
======================================================
Enter the following commands to set the ORACLE_HOME and ORACLE_SID environment variables:
Bourne, Bash, or Korn shell:
$ ORACLE_HOME=oracle_home
$ ORACLE_SID=sid
$ export ORACLE_HOME ORACLE_SID
[oraprod@db 9.2.0.8patches]$ echo $ORACLE_SID
prod
[oraprod@db 9.2.0.8patches]$ echo $ORACLE_HOME
/d01/oraprod/tech_st/9.2.0
5. Shut Down Oracle Databases
========================
Shut down any existing Oracle database instances with normal or immediate priority. On Oracle RAC systems, shut down all instances on each node.
SQL> select status from v$instance;
STATUS
------------
OPEN
SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
6. Stop All Processes
================
Stop all listener and other processes running in the Oracle home directory where you want to install the patch set.
[oraprod@db 9.2.0.8patches]$ cd $TNS_ADMIN
[oraprod@db prod_db]$ pwd
/d01/oraprod/tech_st/9.2.0/network/admin/prod_db
[oraprod@db prod_db]$ lsnrctl stop prod
LSNRCTL for Linux: Version 9.2.0.5.0 - Production on 11-FEB-2014 13:00:42
Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROCprod))
The command completed successfully
[oraprod@db oraprod]$ cd $TNS_ADMIN
[oraprod@db prod_db]$ lsnrctl status prod
LSNRCTL for Linux: Version 9.2.0.5.0 - Production on 17-FEB-2014 14:51:18
Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROCprod))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 2: No such file or directory
Connecting to (ADDRESS=(PROTOCOL=TCP)(Host=db.sapcle.com)(Port=1525))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
[oraprod@db prod_db]$
7. Installing the Patch Set Interactively
=============================
1. Log in as the Oracle software owner (typically oracle).
[root@db ~]# su - oraprod
[oraprod@db oraprod]$ echo $ORACLE_SID
prod
2. If you are not installing the software on the local system, enter the following command to direct X applications to display on the local system:
Bourne, Bash, or Korn shell:
$ DISPLAY=local_host:0.0 ; export DISPLAY
[oraprod@db oraprod]$ echo $DISPLAY
db:1.0
3. Set the LD_LIBRARY_PATH environment variable to $ORACLE_HOME/lib
Bourne, Bash, or Korn shell:
$ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib; export LD_LIBRARY_PATH
[oraprod@db 9.2.0.8patches]$ echo $LD_LIBRARY_PATH
/d01/oraprod/tech_st/9.2.0/lib:/usr/X11R6/lib:/usr/openwin/lib:/d01/oraprod/tech_st/9.2.0/ctx/lib
4. Enter following commands to start Oracle Universal Installer, where patchset_directory is the directory you unzipped the patch set software:
[oraprod@db Disk1]$ cd /u01/upgrade/9.2.0.8patches/Disk1
[oraprod@db Disk1]$ pwd
/u01/upgrade/9.2.0.8patches/Disk1
[oraprod@db Disk1]$ ls -ltr
total 3356
drwxr-xr-x 4 oraprod dba 4096 Aug 20 2006 Translations
drwxr-xr-x 9 oraprod dba 4096 Aug 20 2006 stage
-rwxr-xr-x 1 oraprod dba 1263 Aug 20 2006 runInstaller
drwxr-xr-x 2 oraprod dba 4096 Aug 20 2006 response
drwxr-xr-x 6 oraprod dba 4096 Aug 20 2006 oracm
drwxr-xr-x 4 oraprod dba 4096 Aug 20 2006 install
-rw-r----- 1 oraprod dba 143435 Aug 22 2006 patchnotes.htm
-rw-rw-r-- 1 oraprod dba 3255964 Aug 22 2006 9208_buglist.htm
[oraprod@db Disk1]$
5. Enter following commands to start Oracle Universal Installer, where patchset_directory is the directory you unzipped the patch set software:
$ cd /u01/upgrade/9.2.0.8patches/Disk1
$ ./runInstaller
6. On the Welcome screen, click Next.
7. On the Specify File Locations screen, click Browse next to the Path field in the Source section.
8. Select the products.xml file from the stage directory where you unpacked the patch set files, then click Next. For example:
patchset_directory/Disk1/stage/products.xml
9. In the Name field in the Destination section, select the name of the Oracle home that you want to update from the drop down list, then click Next.
10. On the Summary screen, click Install.
This screen lists all of the patches available for installation.
11. When prompted, run the $ORACLE_HOME/root.sh script as the root user. If you are applying the patch set to an Oracle RAC installation, then run the root.sh script on each node of the cluster.
12. On the End of Installation screen, click Exit, then click Yes to exit from Oracle Universal Installer.
Find the below attached document for Patchset Installation Screen Shots.
13. Bring up the Upgraded 9.2.0.8 Database and listener
[oraprod@db Disk1]$ !sq
sqlplus "/ as sysdba"
SQL*Plus: Release 9.2.0.8.0 - Production on Mon Feb 17 16:32:19 2014
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 581505840 bytes
Fixed Size 451376 bytes
Variable Size 402653184 bytes
Database Buffers 167772160 bytes
Redo Buffers 10629120 bytes
ORA-32700: error occurred in DIAG Group Service
SQL> shut immediate;
ORA-01507: database not mounted
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
***********
Solution :
***********
[oraprod@db Disk1]$ cd /d01/oraprod/tech_st/9.2.0/rdbms/lib/
[oraprod@db lib]$ make -f ins_rdbms.mk rac_off ioracle
rm -f /d01/oraprod/tech_st/9.2.0/lib/libskgxp9.so
cp /d01/oraprod/tech_st/9.2.0/lib//libskgxpd.so /d01/oraprod/tech_st/9.2.0/lib/libskgxp9.so
rm -f /d01/oraprod/tech_st/9.2.0/lib/libskgxn9.so
cp /d01/oraprod/tech_st/9.2.0/lib//libskgxns.so /d01/oraprod/tech_st/9.2.0/lib/libskgxn9.so
/usr/bin/ar d /d01/oraprod/tech_st/9.2.0/rdbms/lib/libknlopt.a kcsm.o
/usr/bin/ar cr /d01/oraprod/tech_st/9.2.0/rdbms/lib/libknlopt.a /d01/oraprod/tech_st/9.2.0/rdbms/lib/ksnkcs.o
- Linking Oracle
rm -f /d01/oraprod/tech_st/9.2.0/rdbms/lib/oracle
gcc -o /d01/oraprod/tech_st/9.2.0/rdbms/lib/oracle -L/d01/oraprod/tech_st/9.2.0/rdbms/lib/ -L/d01/oraprod/tech_st/9.2.0/lib/ -L/d01/oraprod/tech_st/9.2.0/lib/stubs/ -Wl,-E `test -f /d01/oraprod/tech_st/9.2.0/rdbms/lib/skgaioi.o && echo /d01/oraprod/tech_st/9.2.0/rdbms/lib/skgaioi.o` /d01/oraprod/tech_st/9.2.0/rdbms/lib/opimai.o /d01/oraprod/tech_st/9.2.0/rdbms/lib/ssoraed.o /d01/oraprod/tech_st/9.2.0/rdbms/lib/ttcsoi.o /d01/oraprod/tech_st/9.2.0/lib/nautab.o /d01/oraprod/tech_st/9.2.0/lib/naeet.o /d01/oraprod/tech_st/9.2.0/lib/naect.o /d01/oraprod/tech_st/9.2.0/lib/naedhs.o /d01/oraprod/tech_st/9.2.0/rdbms/lib/config.o -lserver9 -lodm9 -lskgxp9 -lskgxn9 -lclient9 -lvsn9 -lwtcserver9 -lcommon9 -lgeneric9 /d01/oraprod/tech_st/9.2.0/rdbms/lib/defopt.o -lknlopt `if /usr/bin/ar tv /d01/oraprod/tech_st/9.2.0/rdbms/lib/libknlopt.a | grep xsyeolap.o > /dev/null 2>&1 ; then echo "-loraolap9" ; fi` -lslax9 -lpls9 -lplp9 -lserver9 -lclient9 -lvsn9 -lwtcserver9 -lcommon9 -lgeneric9 -lknlopt -lslax9 -lpls9 -lplp9 -ljox9 -lserver9 -locijdbcst9 -lwwg9 `cat /d01/oraprod/tech_st/9.2.0/lib/ldflags` -lnsslb9 -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9 -lnro9 `cat /d01/oraprod/tech_st/9.2.0/lib/ldflags` -lnsslb9 -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9 -lmm -lnls9 -lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9 `cat /d01/oraprod/tech_st/9.2.0/lib/ldflags` -lnsslb9 -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9 -lnro9 `cat /d01/oraprod/tech_st/9.2.0/lib/ldflags` -lnsslb9 -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9 -ltrace9 -lnls9 -lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9 `if /usr/bin/ar tv /d01/oraprod/tech_st/9.2.0/rdbms/lib/libknlopt.a | grep "kxmnsd.o" > /dev/null 2>&1 ; then echo " " ; else echo "-lordsdo9"; fi` -lctxc9 -lctx9 -lzx9 -lgx9 -lctx9 -lzx9 -lgx9 -lordimt9 -lnls9 -lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9 -lsnls9 -lunls9 -lxsd9 -lnls9 -lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9 `cat /d01/oraprod/tech_st/9.2.0/lib/sysliblist` -Wl,-rpath,/d01/oraprod/tech_st/9.2.0/lib:/lib/i686:/lib:/usr/lib -lm `cat /d01/oraprod/tech_st/9.2.0/lib/sysliblist` -ldl -lm `test -f /d01/oraprod/tech_st/9.2.0/rdbms/lib/skgaioi.o && echo -laio`
mv -f /d01/oraprod/tech_st/9.2.0/bin/oracle /d01/oraprod/tech_st/9.2.0/bin/oracleO
mv /d01/oraprod/tech_st/9.2.0/rdbms/lib/oracle /d01/oraprod/tech_st/9.2.0/bin/oracle
chmod 6751 /d01/oraprod/tech_st/9.2.0/bin/oracle
[oraprod@db lib]$ echo $ORACLE_SID
prod
[oraprod@db lib]$ !sq
sqlplus "/ as sysdba"
SQL*Plus: Release 9.2.0.8.0 - Production on Mon Feb 17 16:37:41 2014
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 581505840 bytes
Fixed Size 451376 bytes
Variable Size 402653184 bytes
Database Buffers 167772160 bytes
Redo Buffers 10629120 bytes
Database mounted.
Database opened.
SQL>
8. PatchSet Post Installation Task :
==========================
1. Check Tablespace Sizes and Set Parameter Values
Review the following sections before upgrading a database.
2. Check SYSTEM Tablespace Size
If JServer is part of the installation ensure that there is at least 10 MB of free space allocated to the SYSTEM tablespace.
3 Set the SHARED_POOL_SIZE and JAVA_POOL_SIZE Initialization Parameters
SQL> select status from v$instance;
STATUS
------------
OPEN
SQL> SHOW PARAMETER PFILE;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string
SQL> SHOW PARAMETER SHARED_POOL_SIZE
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
shared_pool_size big integer 301989888
SQL> SHOW PARAMETER JAVA_POOL_SIZE
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
java_pool_size big integer 67108864
4. If the system is using a server parameter file:
If necessary, set the value of the SHARED_POOL_SIZE initialization parameter to at least 150 MB:
SQL> alter system set shared_pool_size='150M' scope=spfile;
System altered.
If necessary, set the value of the JAVA_POOL_SIZE initialization parameter to at least 150 MB:
SQL> alter system set java_pool_size='150M' scope=spfile;
System altered.
5. Shut down the database.
SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
6. Upgrade the Database
After you install the patch set, you must perform the following steps on every database associated with the upgraded Oracle home:
i. Log in as the Oracle software owner (typically oracle).
ii. Start the Oracle Net listener as follows:
$ lsnrctl start
7. Enter the following SQL*Plus commands:
SQL> startup migrate
ORACLE instance started.
Total System Global Area 547951368 bytes
Fixed Size 451336 bytes
Variable Size 369098752 bytes
Database Buffers 167772160 bytes
Redo Buffers 10629120 bytes
Database mounted.
Database opened.
SQL> spool patch.log
SQL> @/d01/oraprod/tech_st/9.2.0/rdbms/admin/catpatch.sql
DOC> BEGIN CATPATCH.SQL */
PL/SQL procedure successfully completed.
Session altered.
Session altered.
9 rows deleted.
:
:
:
:
DOC>*/
DOC> END CATPATCH.SQL */
SQL> SQL> commit;
Commit complete.
SQL> spool off;
SQL>
8. Review the patch.log file for errors and inspect the list of components that is displayed at the end of catpatch.sql script.
This list provides the version and status of each SERVER component in the database.
9. Restart the database:
SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 547951368 bytes
Fixed Size 451336 bytes
Variable Size 369098752 bytes
Database Buffers 167772160 bytes
Redo Buffers 10629120 bytes
Database mounted.
Database opened.
SQL>
10. Run the utlrp.sql script to recompile all invalid PL/SQL packages now instead of when the packages are accessed for the first time. This step is optional but recommended.
SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql
11. If you are using the Oracle Recovery Manager catalog, enter the following command:
$ rman catalog username/password@alias
RMAN> UPGRADE CATALOG;
[oraprod@db prod_db]$ rman catalog rman/rman@prod
Recovery Manager: Release 9.2.0.8.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to recovery catalog database
RMAN> upgrade catalog;
recovery catalog owner is RMAN
enter UPGRADE CATALOG command again to confirm catalog upgrade
RMAN> upgrade catalog;
recovery catalog upgraded to version 09.02.00
DBMS_RCVMAN package upgraded to version 09.02.00
DBMS_RCVCAT package upgraded to version 09.02.00
RMAN>
12. Oracle Internet Directory release 9.2.0 is not installed in the Oracle home.
[oraprod@db prod_db]$ sh $ORACLE_HOME/bin/oidpatchca.sh -connect Connect_String -lsnrport 1525 -systempwd manager -odspwd oracle -sudn Super-User_DN -supwd oracle -dippwd oracle
sh: /d01/oraprod/tech_st/9.2.0/bin/oidpatchca.sh: No such file or directory
[oraprod@db prod_db]$ cd /d01/oraprod/tech_st/9.2.0/bin/
[oraprod@db bin]$ ls -ltr oidpatchca.sh
ls: oidpatchca.sh: No such file or directory
[oraprod@db bin]$
13. Running changePerm.sh script on an Oracle database server home
***********
Important:
***********
Oracle recommends using the most restrictive file permissions possible for your given implementation. Perform these optional steps only after considering all security ramifications and only if you need to share this installation.
During patchset installation, all new files and directories are created with restricted access, by default. Users or third party applications with a different group identifier from that of the database, which try to access client-side utilities or libraries in the database home, will see permission errors when trying to access these files or directories. Perform the following steps only if you wish to change the permissions
1. Change your directory to:
$ cd $ORACLE_HOME/install
2. Run changePerm.sh and specify the patched server Oracle home location, before accessing client-side utilities or libraries in the database home.
[oraprod@db bin]$ cd $ORACLE_HOME/install
[oraprod@db install]$ ls -ltr changePerm.sh
-rwxr-xr-x 1 oraprod dba 6041 Aug 17 2006 changePerm.sh
[oraprod@db install]$ pwd
/d01/oraprod/tech_st/9.2.0/install
[oraprod@db install]$ sh changePerm.sh /d01/oraprod/tech_st/9.2.0/
-------------------------------------------------------------------------------
Disclaimer: The purpose of this script is to relax permissions on some of the
files in the database Oracle Home so that all clients can access them.
Please note that Oracle Corporation recommends using the most restrictive file
permissions as possible for your given implementation. Running this script
should be done only after considering all security ramifications.
-------------------------------------------------------------------------------
Do you wish to continue (y/n) [n]: \c
y
Finished running the script successfully
[oraprod@db install]$
9. Final Step :
===========
1. Bring down the Database and Listener.
2. Bring up the Listener and Database.
3. Check the Database Upgraded Version.
SQL> select banner from v$version;
BANNER
----------------------------------------------------------------
Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
PL/SQL Release 9.2.0.8.0 - Production
CORE 9.2.0.8.0 Production
TNS for Linux: Version 9.2.0.8.0 - Production
NLSRTL Version 9.2.0.8.0 - Production
SQL> select name,open_mode from v$database;
NAME OPEN_MODE
--------- ----------
PROD READ WRITE
Now Oracle Database Successfully Upgraded from 9.2.0.5 to 9.2.0.8.