Tuesday, 31 May 2016



1.       Take a backup of the database before upgrading the database.

2.       Download database 11.2.0.4 patch 13390677 for Linux x86-64 platform from MOS

3.       Unzip the files


unzip p13390677_112040_Linux-x86-64_1of7.zip -d oracle114
unzip p13390677_112040_Linux-x86-64_2of7.zip -d oracle114

4.       Complete the pre-requisite steps noted in this MOS Doc ID 884522.1

5.       As mentioned in the  MOS Doc ID 884522.1, download the script for the pre-requiste and execute in the database which needs to be upgrade

Connect to the 11.2.0.3 Vision database and execute and the script utlu112i_11204_009.sql

$ sqlplus '/ as sysdba'
SQL> spool upgrade_info.log
SQL> @utlu112i_11204_009.sql

Below is the output of the script, sort out any issue mentioned in the log file and recommendations as well before upgrades start

Oracle Database 11.2 Pre-Upgrade Information Tool 02-26-2016 12:58:47
Script Version: 11.2.0.4.0 Build: 009
.
**********************************************************************
Database:
**********************************************************************
--> name:          XXXXX
--> version:       11.2.0.3.0
--> compatible:    11.2.0.0.0
--> blocksize:     8192
--> platform:      Linux x86 64-bit
--> timezone file: V14
.
**********************************************************************
Tablespaces: [make adjustments in the current environment]
**********************************************************************
--> SYSTEM tablespace is adequate for the upgrade.
.... minimum required size: 962 MB
--> SYSAUX tablespace is adequate for the upgrade.
.... minimum required size: 755 MB
--> UNDOTBS1 tablespace is adequate for the upgrade.
.... minimum required size: 400 MB
--> TEMP tablespace is adequate for the upgrade.
.... minimum required size: 60 MB
.
**********************************************************************
Flashback: OFF
**********************************************************************
**********************************************************************
Update Parameters: [Update Oracle Database 11.2 init.ora or spfile]
Note: Pre-upgrade tool was run on a lower version 64-bit database.
**********************************************************************
--> If Target Oracle is 32-Bit, refer here for Update Parameters:
-- No update parameter changes are required.
.
--> If Target Oracle is 64-Bit, refer here for Update Parameters:
-- No update parameter changes are required.
.
**********************************************************************
Renamed Parameters: [Update Oracle Database 11.2 init.ora or spfile]
**********************************************************************
-- No renamed parameters found. No changes are required.
.
**********************************************************************
Obsolete/Deprecated Parameters: [Update Oracle Database 11.2 init.ora or spfile]
**********************************************************************
-- No obsolete parameters found. No changes are required
.
**********************************************************************
Components: [The following database components will be upgraded or installed]
**********************************************************************
--> Oracle Catalog Views         [upgrade]  VALID   
--> Oracle Packages and Types    [upgrade]  VALID   
--> JServer JAVA Virtual Machine [upgrade]  VALID   
--> Oracle XDK for Java          [upgrade]  VALID   
--> Oracle Workspace Manager     [upgrade]  VALID   
--> OLAP Analytic Workspace      [upgrade]  VALID   
--> OLAP Catalog                 [upgrade]  VALID   
--> EM Repository                [upgrade]  VALID   
--> Oracle Text                  [upgrade]  VALID   
--> Oracle XML Database          [upgrade]  VALID   
--> Oracle Java Packages         [upgrade]  VALID   
--> Oracle interMedia            [upgrade]  VALID   
--> Spatial                      [upgrade]  VALID   
--> Expression Filter            [upgrade]  VALID   
--> Rule Manager                 [upgrade]  VALID   
--> Oracle Application Express   [upgrade]  VALID   
... APEX will only be upgraded if the version of APEX in
... the target Oracle home is higher than the current one.
--> Oracle OLAP API              [upgrade]  VALID   
.
**********************************************************************
Miscellaneous Warnings
<Note: Section can be empty if no such warnings are found.>
**********************************************************************
WARNING: --> Your recycle bin contains 2 object(s).
.... It is REQUIRED that the recycle bin is empty prior to upgrading
.... your database.  The command:
        PURGE DBA_RECYCLEBIN
.... must be executed immediately prior to executing your upgrade.
WARNING: --> Database contains schemas with objects dependent on DBMS_LDAP package.
.... Refer to the 11g Upgrade Guide for instructions to configure Network ACLs.
.... USER APEX_030200 has dependent objects.
.
**********************************************************************
Recommendations
**********************************************************************
Oracle recommends gathering dictionary statistics prior to
upgrading the database.
To gather dictionary statistics execute the following command
while connected as SYSDBA:
    EXECUTE dbms_stats.gather_dictionary_stats;

6.     Install the 11.2.0.4 binaries into a new ORACLE_HOME

·        Create a directory dbhome_2 in the location /app/oracle/product/11.2.0/
·        Install the Oracle binary to the new Oracle home













7.     Upgrading the Database 11.2.0.3 to 11.2.0.4

Set ORACLE_HOME to 11.2.0.4 and export below environment variables and then execute dbua

export ORACLE_BASE=/app/oracle
export ORACLE_HOME=/app/oracle/product/11.2.0/dbhome_2
export PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/perl/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PERL5LIB=$ORACLE_HOME/perl/lib/5.10.:$ORACLE_HOME/perl/lib/site_perl/5.10.0
export PATH=${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin
export PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin:/sbin

Check env, if still path referred to old ORACLE_HOME, then unset and export again, if not it will throw error “selected database has already been upgraded” or “mount database”

















8.     Once upgrade successfully completed, then copy the tnsnames.ora and listener.ora files from old ORACLE_HOME to new ORACLE_HOME

9.     Modify the .bash_profile in oracle point to new ORACLE_HOME

          

10.  Tar the old ORACLE_HOME for safety side incase if we need to roll back.

tar -cvf /backup/dbhome_1.tar dbhome_1

Note: Stop all the DB process before taking a backup



11.  Create a symbolic link to the Oracle new point to dbhome_1

 ln -s dbhome_2 dbhome_1

                  

12.  Change the ORACLE_HOME in the auto start init script

                 










Recovery Manager complete.
[oracle@Total-dev-oracle adump]$ rman target sys/pssword

Recovery Manager: Release 11.2.0.4.0 - Production on Wed Mar 9 16:48:48 2016

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: XXXXX (DBID=3908821090)

RMAN> connect catalog rman/yyyyyy

connected to recovery catalog database
PL/SQL package RMAN.DBMS_RCVCAT version 11.02.00.03 in RCVCAT database is not current
PL/SQL package RMAN.DBMS_RCVMAN version 11.02.00.03 in RCVCAT database is not current

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 11.02.00.04
DBMS_RCVMAN package upgraded to version 11.02.00.04
DBMS_RCVCAT package upgraded to version 11.02.00.04


RMAN>

No comments:

Post a Comment