Upgrade Oracle database from 11.2.0.1 to 11.2.0.4 using RMAN backup

This article explains how to upgrade Oracle database from the version 11gR2 (11.2.0.1) to the version 11.2.0.4 using the RMAN Full backup.

Table of Contents:

– Introduction

– Description of the environments

– Steps of Oracle Database 11g (11.2.0.1) Backup

– Steps of Oracle Database 11g (11.2.0.4) Restore

1. Introduction:

Recovery Manager (RMAN) is an Oracle Database client that performs backup and recovery tasks on your databases and automates administration of your backup strategies. It greatly simplifies backing up, restoring, and recovering database files. For more information.

2. Description of the environments:

This table describes the environments of the Oracle Database server source and destination:

up_11201_11204_OS_1

 

 

 

 

  • Configuration of the file /etc/hosts on both Linux Server:
172.16.1.110    dbserv11g.localdomain     dbserv11g
172.16.1.140    dbserv11204.localdomain      dbserv11204
  • Creation of needed directory on both Linux Server:
# mkdir  /orabin11g  /oradata   /orafra
# chown oracle:oinstall /orabin11g  /oradata   /orafra
# chmod 775  /orabin11g    /oradata   /orafra

3. Steps of Oracle Database 11g backup:

Note: This article describes the backup steps on the production server and also the restore steps on the 11.2.0.4 Server, and doesn’t describe the steps how to install the Oracle database 11g which they has been described on the previous articles.

Step 1: Verify that the archive log is enabled on the Linux database 11g.

dbserv11gSQL> archive log list;

up_11201_11204_archiev_log_list

 

 

 

Step 2: Verify the backup destination on the 11g Server:

up_11201_11204_show parameter recovery

 

 

 

Step 3: Backup 11g database plus archive log:

up_11201_11204_backup_database

 

 

 

 

 

 

Step 4: Verify the backup on the 11g Server:

– List Backup summary:

up_11201_11204_list_backup_summary

– List backup piece 1:

up_11201_11204_list_backupset_1

– List backup piece 2:

up_11201_11204_list_backupset_2

– List backup piece 3 (contains the control file backup):

up_11201_11204_list_backupset_3

– List backup piece 4:

up_11201_11204_list_backupset_4

Step 5: Copy the backup pieces from Server 11g to Server 11.2.0.4:

$ scp -r /orafra/ORCL/backupset/2015_08_20/ dbserv11204:/orafra/

Step 6: Create and copy the pfile from source 11g to destination 11.2.0.4:

Create a PFILE for the 11.2.0.4 database. Since we are restoring the database with the same filesystem and locations as the original, we don’t need to convert the file names. In this case, the PFILE is called “initorcl.ora” and is placed in the “$ORACLE_HOME/dbs” directory on the 11.2.0.4 server.

  • Create a pfile
dbserv11gSQL> create pfile='/tmp/initorcl.ora' from spfile;
  • Copy the pfile to the remote server:
$ scp /tmp/initorcl.ora dbserv11204:/orabin11g/product/11.2.0/dbhome_1/dbs

4. Steps of Oracle Database 11.2.0.4 Restore:

Note: After the installation of the Oracle 11.2.0.4 Binary, and the creation of the Listener using the netca tool, it’s time to modify the pfile and the creation of the password file:

Step 1: Verify the pfile initorcl.ora on the 11.2.0.4 Server:

up_11201_11204_pwd_initorcl.ora

 

 

 

Step 2: Set UP the pfile parameters:

Note: Create the absent directory:

up_11201_11204_mkdir_11g

 

Step 3: Create the password file on the 11.2.0.4 Server. (On my case password=oracle)

up_11201_11204_orapwd

 

Step 4: Startup the orcl 11.2.0.4  instance on the 11.2.0.4 Server.

up_11201_11204_startup_nomount

 

 

 

 

 

 

Step 5: Restore the Control file on the 11.2.0.4 Server.

up_11201_11204_restore_controlfile

 

Step 6: Startup mount

up_11201_11204_mount

 

 

 

Step 7: Re-Startup the instance with spfile:

up_11201_11204_create_spfile

 

 

 

 

 

 

 

 

 

 

Step 8: Catalog the 11g backup within the controlfile:

up_11201_11204_catalog_start_with

 

 

 

 

 

 

 

 

 

 

 

 

 

Step 9: Restore database:

up_11201_11204_restore_database

Step 10: Recover database:

up_11201_11204_recover_database

 

 

 

 

 

 

Step 11: Alter database open resetlogs:

            Note 1: After the restore of the controlfile, we should open the database with the  options resetlogs or notresetlogs.

            Note 2: While the backup is done with 11.2.0.1 and the restore with 11.2.0.4, we see the natural behavior ORA-39700.

up_11201_11204_alter_database_open

 

 

 

 

Step 12: startup upgrade:

SQL> startup upgrade

Step 13: Run the Upgrade script “$ORACLE_HOME/rdbms/admin/catupgrd.sql”:

SQL> @/orabin11g/product/11.2.0/dbhome_1/rdbms/admin/catupgrd.sql

Step 14: Verify the upgrade of the Oracle database components:

up_11201_11204_dba_registry

 

 

 

 

 

 

 

 

 

Step 15: Recompile the Invalid objects after upgrade using the script utlrp.sql :

up_11201_11204_utlrp

 

 

Step 16: Re-verification of the Oracle database components:

up_11201_11204_dba_registry_after_utlrp

Step 17: Configure the file /etc/oratab:

up_11201_11204_cat_oratab

 

Conclusion:

This article explains how to Upgrade Oracle Database 11.2.0.1 to the version 11.2.0.4 using the backup RMAN.

Bookmark the permalink.
Loading Facebook Comments ...

Leave a Reply