Upgrade database from 11.2.0.3 to 11.2.0.4
------------------------------------------------------
Step#1:
Take database backup running with 11.2.0.3 version( Preferably you can take zip of scheduled backups to save time )
Step#2:
download 11.2.0.4 from below link:
Install Oracle Database version 11.2.0.4 in New home path /u01/app/oracle/product/11.2.0.4/dbhome_1
https://support.oracle.com/epmos/faces/PatchDetail?_adf.ctrl-state=944tiroeg_29&patch_name=13390677&releaseId=80112030&patchId=13390677&languageId=0&platformId=226&_afrLoop=113795957239081
Install Oracle Database version 11.2.0.4 in New home path /u01/app/oracle/product/11.2.0.4/dbhome_1
Step#3:
*********
Before upgrade run the preupgrade tool to check the pre-requisites before proceeding upgrade which is available in new home.
Fix as per output result.
SQL> @/u01/app/oracle/product/11.2.0.4/dbhome_1/rdbms/admin/utlu112i.sql
SQL> col version for a10
SQL> col comp_name for a40
SQL> col comp_id for a20
SQL> set lines 1000
SQL> select comp_id,COMP_NAME,version, status from dba_registry;
COMP_ID COMP_NAME VERSION STATUS
-------------------- ---------------------------------------- ---------- ---------------------------------
CATALOG Oracle Database Catalog Views 11.2.0.3.0 VALID
CATPROC Oracle Database Packages and Types 11.2.0.3.0 VALID
SQL> PURGE DBA_RECYCLEBIN ;
SQL> EXECUTE dbms_stats.gather_dictionary_stats;
SQL>
SQL> set feedback on
SQL> SELECT (translate(value,chr(13)||chr(10),' ')) FROM sys.v$parameter WHERE UPPER(name) ='EVENT' AND isdefault='FALSE';
SQL> SELECT (translate(value,chr(13)||chr(10),' ')) from sys.v$parameter WHERE UPPER(name) = '_TRACE_EVENTS' AND isdefault='FALSE' ;
SQL> col name for a20
SQL> col TIME for a30
SQL> col RESTORE_POINT_TIME for a30
SQL> select * from v$restore_point;
SQL> select * from v$restore_point;
SCN DATABASE_INCARNATION# GUARANTEE STORAGE_SIZE TIME RESTORE_POINT_TIME PRESERVED NAME
---------- --------------------- --------- ------------ ------------------------------ ------------------------------ --------- --------------------
709791434 2 YES 314572800 01-NOV-15 05.50.43.000000000 A YES B4_DB_UPGRADE
SQL> SELECT version FROM v$timezone_file;
VERSION
----------
14
Step#4:
********
Shutdown database and setting new environment variable (11.2.0.4) home
SQL> select name from v$database;
NAME
---------------------------
HCDMP
SQL> shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> !echo $ORACLE_SID
HCDMP
SQL> echo $ORACLE_HOME
SQL> !echo $ORACLE_HOME
/u01/app/oracle/product/11.2.0.3/dbhome_1
cp /u01/app/oracle/product/11.2.0.3/dbhome_1/initorcl.ora /u01/app/oracle/product/11.2.0.4/dbhome_1/initorcl.ora
[oracle@s616183se2vl25 ~]$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/dbhome_1
[oracle@s616183se2vl25 ~]$ export PATH=$PATH:$ORACLE_HOME/bin
[oracle@s616183se2vl25 ~]$ export ORACLE_SID=orcl
SQL> startup upgrade
ORACLE instance started.
Total System Global Area 1043886080 bytes
Fixed Size 2259840 bytes
Variable Size 683672704 bytes
Database Buffers 348127232 bytes
Redo Buffers 9826304 bytes
Database mounted.
Database opened.
SQL> @?/rdbms/admin/catupgrd
Step#5:
*******
Startup the upgraded database and follow post upgrade task.
[oracle@s616183se2vl25 ~]$ sqlplus
SQL*Plus: Release 11.2.0.4.0 Production on Sun Nov 1 06:15:58 2015
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Enter user-name: / as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 1043886080 bytes
Fixed Size 2259840 bytes
Variable Size 683672704 bytes
Database Buffers 348127232 bytes
Redo Buffers 9826304 bytes
Database mounted.
Database opened.
SQL> @?/rdbms/admin/utlu112s
Step#6:
*******
For migrating the baseline from pre 11g database, run the below one if required.
SQL> @/u01/app/oracle/product/11.2.0.4/dbhome_1/rdbms/admin/catuppst.sql
Step#7:
*******
Recompile objects
SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql
Step#8:
*******
For object invalidation in sys schema before upgrade the run below one.
Also run catbundle
SQL> @$ORACLE_HOME/rdbms/admin/utluiobj.sql
SQL> @?/rdbms/admin/catbundle.sql psu apply
Step#9:
*******
Verify the details
SQL> set lines 1000
SQL> col action_name for a30
SQL> col ACTION_TIME for a30
SQL> col version for a30
SQL> col NAMESPACE for a10
SQL> col comments for a30
SQL> col BUNDLE_SERIES for a30
SQL> col action for a20
SQL> select * from registry$history;
SQL> select * from v$version ;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
CORE 11.2.0.4.0 Production
TNS for Linux: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production
SQL> set serverout on
SQL> select object_name from dba_objects where status != 'VALID';
no rows selected
------------------------------------------------------
Step#1:
Take database backup running with 11.2.0.3 version( Preferably you can take zip of scheduled backups to save time )
Step#2:
download 11.2.0.4 from below link:
Install Oracle Database version 11.2.0.4 in New home path /u01/app/oracle/product/11.2.0.4/dbhome_1
https://support.oracle.com/epmos/faces/PatchDetail?_adf.ctrl-state=944tiroeg_29&patch_name=13390677&releaseId=80112030&patchId=13390677&languageId=0&platformId=226&_afrLoop=113795957239081
Install Oracle Database version 11.2.0.4 in New home path /u01/app/oracle/product/11.2.0.4/dbhome_1
Step#3:
*********
Before upgrade run the preupgrade tool to check the pre-requisites before proceeding upgrade which is available in new home.
Fix as per output result.
SQL> @/u01/app/oracle/product/11.2.0.4/dbhome_1/rdbms/admin/utlu112i.sql
SQL> col version for a10
SQL> col comp_name for a40
SQL> col comp_id for a20
SQL> set lines 1000
SQL> select comp_id,COMP_NAME,version, status from dba_registry;
COMP_ID COMP_NAME VERSION STATUS
-------------------- ---------------------------------------- ---------- ---------------------------------
CATALOG Oracle Database Catalog Views 11.2.0.3.0 VALID
CATPROC Oracle Database Packages and Types 11.2.0.3.0 VALID
SQL> PURGE DBA_RECYCLEBIN ;
SQL> EXECUTE dbms_stats.gather_dictionary_stats;
SQL>
SQL> set feedback on
SQL> SELECT (translate(value,chr(13)||chr(10),' ')) FROM sys.v$parameter WHERE UPPER(name) ='EVENT' AND isdefault='FALSE';
SQL> SELECT (translate(value,chr(13)||chr(10),' ')) from sys.v$parameter WHERE UPPER(name) = '_TRACE_EVENTS' AND isdefault='FALSE' ;
SQL> col name for a20
SQL> col TIME for a30
SQL> col RESTORE_POINT_TIME for a30
SQL> select * from v$restore_point;
SQL> select * from v$restore_point;
SCN DATABASE_INCARNATION# GUARANTEE STORAGE_SIZE TIME RESTORE_POINT_TIME PRESERVED NAME
---------- --------------------- --------- ------------ ------------------------------ ------------------------------ --------- --------------------
709791434 2 YES 314572800 01-NOV-15 05.50.43.000000000 A YES B4_DB_UPGRADE
SQL> SELECT version FROM v$timezone_file;
VERSION
----------
14
Step#4:
********
Shutdown database and setting new environment variable (11.2.0.4) home
SQL> select name from v$database;
NAME
---------------------------
HCDMP
SQL> shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> !echo $ORACLE_SID
HCDMP
SQL> echo $ORACLE_HOME
SQL> !echo $ORACLE_HOME
/u01/app/oracle/product/11.2.0.3/dbhome_1
cp /u01/app/oracle/product/11.2.0.3/dbhome_1/initorcl.ora /u01/app/oracle/product/11.2.0.4/dbhome_1/initorcl.ora
[oracle@s616183se2vl25 ~]$ export PATH=$PATH:$ORACLE_HOME/bin
[oracle@s616183se2vl25 ~]$ export ORACLE_SID=orcl
SQL> startup upgrade
ORACLE instance started.
Total System Global Area 1043886080 bytes
Fixed Size 2259840 bytes
Variable Size 683672704 bytes
Database Buffers 348127232 bytes
Redo Buffers 9826304 bytes
Database mounted.
Database opened.
SQL> @?/rdbms/admin/catupgrd
Step#5:
*******
Startup the upgraded database and follow post upgrade task.
[oracle@s616183se2vl25 ~]$ sqlplus
SQL*Plus: Release 11.2.0.4.0 Production on Sun Nov 1 06:15:58 2015
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Enter user-name: / as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 1043886080 bytes
Fixed Size 2259840 bytes
Variable Size 683672704 bytes
Database Buffers 348127232 bytes
Redo Buffers 9826304 bytes
Database mounted.
Database opened.
SQL> @?/rdbms/admin/utlu112s
Step#6:
*******
For migrating the baseline from pre 11g database, run the below one if required.
SQL> @/u01/app/oracle/product/11.2.0.4/dbhome_1/rdbms/admin/catuppst.sql
Step#7:
*******
Recompile objects
SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql
Step#8:
*******
For object invalidation in sys schema before upgrade the run below one.
Also run catbundle
SQL> @$ORACLE_HOME/rdbms/admin/utluiobj.sql
SQL> @?/rdbms/admin/catbundle.sql psu apply
Step#9:
*******
Verify the details
SQL> set lines 1000
SQL> col action_name for a30
SQL> col ACTION_TIME for a30
SQL> col version for a30
SQL> col NAMESPACE for a10
SQL> col comments for a30
SQL> col BUNDLE_SERIES for a30
SQL> col action for a20
SQL> select * from registry$history;
SQL> select * from v$version ;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
CORE 11.2.0.4.0 Production
TNS for Linux: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production
SQL> set serverout on
SQL> select object_name from dba_objects where status != 'VALID';
no rows selected