Wednesday, June 29, 2016

Upgrade Oracle 11g R2 (11.2.0.4) Grid Infrastructure to Oracle 12c (12.1.0.2)

8:15 AM Posted by Dilli Raj Maharjan No comments
Oracle Database can be performed upgrade in two ways: Direct Upgrade and Indirect Upgrade. Direct upgrade can be done with OUI. Different tools as Data Pump, Transportable tablespace and Goldengate replication can be used to do Indirect upgrade. Oracle always recommended to do Direct out-of-place upgrade. That is, install newer version on separate ORACLE_HOME than the existing one.

Minimum version required to upgrade existing Oracle Grid Infrastructure installations to 12.1.0.2

  1. Oracle Clusterware 10g Release 1 (10.1.0.5) or later
  2. Oracle Clusterware 10g Release 2 (10.2.0.3) or later
  3. Oracle Grid Infrastructure 11g Release 1 (11.1.0.6) or later
  4. Oracle Grid Infrastructure 11g Release 2 (11.2) or later
  5. Oracle Grid Infrastructure 11g Release 2 (11.2.0.2) requires patch 11.2.0.2.3 (11.2.0.2 PSU 3) or later.


Create new ORACLE_HOME for new grid clusterware.

mkdir -p /u01/app/oracle/product/12.1.0/grid

Install cvuqdisk rpm package from grid staging directory.

rpm -ivh cvuqdisk-1.0.9-1.rpm 


Verify disk_string ASM instance paramter

SQL> show parameter disk_string
SQL> alter system set asm_diskstring='/dev/raw/ORCL*' scope=both;



Limitation while upgrading grid infrastructure.

  1. Never delete directories in the Grid home. For example, do not delete the directory Grid_home/Opatch. If you delete the directory, then the Grid infrastructure installation owner cannot use OPatch to patch the grid home, and OPatch displays the error message "'checkdir' error: cannot create Grid_home/OPatch".
  2. Before start upgradation, Verify if you need to apply any mandatory patches for upgrade to succeed.
  3. The same user that owned the earlier release Oracle Grid Infrastructure software must perform the Oracle Grid Infrastructure 12c Release 1 (12.1) upgrade.
  4. During a major release upgrade to Oracle Grid Infrastructure 12c Release 1 (12.1), the software in the 12c Release 1 (12.1) Oracle Grid Infrastructure home is not fully functional until the upgrade is completed. Running srvctl, crsctl, and other commands from the new Grid homes are not supported until the final rootupgrade.sh script is run and the upgrade is complete across all nodes.

Unset all oracle related environment variables before starts installation.


unset ORACLE_BASE
unset ORACLE_HOME
unset ORACLE_SID
unset ORA_CRS_HOME
unset ORACLE_HOME
unset ORA_NLS10
unset TNS_ADMIN

Remove $ORACLE_HOME/bin from PATH environment variable and $ORACLE_HOME/lib from LD_LIBRARY_PATH.

export PATH=/usr/sbin:/usr/lib64/qt3.3/bin:/usr/local/bin:/bin:/usr/bin:\
/usr/local/sbin:/usr/sbin:/sbin:/home/oracle/bin
export LD_LIBRARY_PATH=/lib:/usr/lib

Start the installer, and select the option to upgrade an existing Oracle Clusterware and Oracle ASM installation.

./runInstaller

Above splash image will be displayed after executing runInstaller executable.






























Select Upgrade Oracle Grid Infrastructure or Oracle Automatic Storage Management and Click on Next to continue.






























Select languages and click on Next to continue.


If we have any Cloud control installed then specify the OMS host, port, EM Admin username and password.

Select ASM Administrator Group and OSDBA Group and Click on Next to continue.


In my case I have no separate OSASM group so the warning window has been displayed. Click on Yes to continue.


Select Oracle base and Software location for GRID infrastructure. Click on Next to continue.






























Configure Root Script execution configuration. In my case I prefer to manually execute root.sh script. You may add root password or sudo setting so that the root.sh script will be executed automatically. It will make installation easier.


Prerequisite check is on progress.


In my case I have failed Physical Memory Pre-requisite. 





























I have select Ignore All option and Click Next.

Warning Message has been displayed due to ignoring the prerequisite. It may cause problem while installation or after installation.

Summary Page has be displayed. Click on Save Response File.

File save window will be displayed. Provide the file name and click on save to continue.






























Click on Install to begin installation.


Installation in progress. ##########



Installation in progress. ####################


Execute rootupgrade.sh script window will be displayed. Execute script as user root on terminal.

Verify the rootupgrade.sh script execute successfully.



After successfully execution of the rootupgrade.sh script Click on OK.





























Click on Close after successfully Installation.















If we encounter the error "MEMORY_TARGET not supported on this system" as above we need to modify the tmpfs size.


SQL> startup
ORA-00845: MEMORY_TARGET not supported on this system
[oracle@OEL1 bin]$ ./crsctl start res -all
CRS-2501: Resource 'ora.ons' is disabled
CRS-2672: Attempting to start 'ora.evmd' on 'oel1'
CRS-2672: Attempting to start 'ora.LISTENER.lsnr' on 'oel1'
CRS-2672: Attempting to start 'ora.cssd' on 'oel1'
CRS-2672: Attempting to start 'ora.diskmon' on 'oel1'
CRS-2676: Start of 'ora.diskmon' on 'oel1' succeeded
CRS-2676: Start of 'ora.evmd' on 'oel1' succeeded
CRS-2676: Start of 'ora.cssd' on 'oel1' succeeded
CRS-2676: Start of 'ora.LISTENER.lsnr' on 'oel1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'oel1'
CRS-5017: The resource action "ora.asm start" encountered the following error: 
ORA-00845: MEMORY_TARGET not supported on this system
. For details refer to "(:CLSN00107:)" in "/u01/app/oracle/diag/crs/oel1/crs/trace/ohasd_oraagent_oracle.trc".
CRS-2674: Start of 'ora.asm' on 'oel1' failed
CRS-2679: Attempting to clean 'ora.asm' on 'oel1'
CRS-2681: Clean of 'ora.asm' on 'oel1' succeeded
CRS-4000: Command Start failed, or completed with errors.
[oracle@OEL1 bin]$ 

Modify tmpfs size to fix the above issue.

[root@ OEL1 ~]# umount tmpfs
[root@ OEL1 ~]# mount -t tmpfs shmfs -o size=1500m /dev/shm

tmpfs                   /dev/shm                tmpfs   defaults        0 0
tmpfs                   /dev/shm                tmpfs   size=4g        0 0



Downgrading to earlier release

/u01/app/oracle/product/12.1.0/grid/crs/install/rootcrs.sh -downgrade


0 comments:

Post a Comment