ORACLE DATABASE UPGRADATION FROM 11GR2 TO 12C

12C Up-Gradation

Prerequisite Check:-

Step One:-
  • Operating System Requirements –
      Red Hat Enterprise Linux 6: 2.6.18-238.0.0.0.1.el5 or later
Step Two:-
      • For Red Hat Linux 6

      • binutils-2.17.50.0.6
        compat-libstdc++-33-3.2.3
        compat-libstdc++-33-3.2.3 (32 bit)
        coreutils-5.97-23.el5_4.1
        gcc-4.1.2
        gcc-c++-4.1.2
        glibc-2.5-58
        glibc-2.5-58 (32 bit)
        glibc-devel-2.5-58
        glibc-devel-2.5-58 (32 bit)
        ksh
        libaio-0.3.106
        libaio-0.3.106 (32 bit)
        libaio-devel-0.3.106
        libaio-devel-0.3.106 (32 bit)
        libgcc-4.1.2
        libgcc-4.1.2 (32 bit)
        libstdc++-4.1.2
        libstdc++-4.1.2 (32 bit)
        libstdc++-devel 4.1.2
        libXext-1.0.1
        libXext-1.0.1 (32 bit)
        libXtst-1.0.1
        libXtst-1.0.1 (32 bit)
        libX11-1.0.3
        libX11-1.0.3 (32 bit)
        libXau-1.0.1
        ibXau-1.0.1 (32 bit)
        libXi-1.0.1
        libXi-1.0.1 (32 bit)
        make-3.81
        sysstat-7.0.2
Step Three:-
        • Kernel Parameter

        • kernel.shmall = 4294967296
          kernel.shmmax = 90765600768
          kernel.shmmni = 4096
          kernel.sem = 250 32000 100 128
          fs.file-max = 6815744
          fs.aio-max-nr = 3145728
          net.ipv4.ip_local_port_range = 9000 65500
          net.core.rmem_default = 262144
          net.core.rmem_max = 4194304
          net.core.wmem_default = 262144
          net.core.wmem_max = 1048576
       

Up Gradation Steps:-

  1. Install oracle 12C binary in a new home.
  2. Oracle base needs to be set.
  3. Set the present ENV and run the below sql from 12C home.

SQL> @<12C Oracle Home>/rdbms/admin/preupgrd.sql

It will generate preupgrade_fixups.sql

  1. Run the sql.
  2. Needs to change the compatible parameter to 11.2.0.
  3. Perform any manual fix up steps identified by the Pre-Upgrade Information Tool.
  4. Take the full backup of the database.
  5. Gather dictionary statistics.

SQL> EXECUTE dbms_stats.gather_dictionary_stats;

  1. Check database registry.
  2. Shut down the database.
  3. Copy the parameter file and password file to new home.
  4. Change the oratab file or the environment file.
  5. Set the new ENV(12C).
  6. Start the database in upgrade mode.

SQL> startup upgrade;

  1. cd $ORACLE_HOME/rdbms/admin
  2. $ORACLE_HOME/perl/bin/perl catctl.pl -n 8 catupgrd.sql
    NOTE: -n option stands for parallel execution. Can change it to any other value depending upon database/server configuration.
  3. Start the database.

Post Up Gradation Steps:-

  1. Run the postupgrade_fixups.sql if it has any recommendation

            #>sqlplus “/ as ssydba”

            SQL> @/cfgtoollogs//preupgrade/postupgrade_fixups.sql

NOTE: Please follow the instruction in the postupgrade_fixups.sql properly. It may contain some manual intervention like –

EXECUTE DBMS_STATS.GATHER_FIXED_OBJECTS_STATS;

cd /d01/oracle/product/v.12.1.0.2/rdbms/admin

  SQL> @utlu121s.sql

  SQL> @catuppst.sql

  SQL> @utlrp.sql

  SQL> @utluiobj.sql

  SQL> @utlu121s.sql

    2. Configure the listener and start the same.

12C Down-Gradation

  1. Downgrade to release 11.2.0.1 is not supported.
  2. Take full backup
  3. If database vault is enabled, it needs to be disabled before downgrade.
  4. To find if Oracle Database Vault is enabled, query the V$OPTION dynamic view as follows. Enter Oracle Database Vault in the case shown in this query. If the output is TRUE, then Oracle Database Vault is enabled

    SQL> SELECT parameter, VALUE FROM V$OPTION WHERE PARAMETER like ‘%Vault%’;

  5. Perform the actual down grade

            cd ORACLE_HOME/rdbms/admin

            sqlplus “/ as sysdba”

             SQL> startup downgrade pfile=pfile_name              

             SQL> @catdwgrd.sql (spool before run)              

             SQL> shutdown immediate

       6.  Change the environment settings to 11g

       7.  Copy parameter file, password file to old home

       8.  Execute the environment file

      9.  Perform reloading the appropriate version for each of the database components in the downgraded database

           SQL> startup upgrade 

           SQL> @catrelod.sql (spool before run) 

           SQL> shutdown immediate

    10. Start database and check for invalid object compilation  

           SQL> startup              

           SQL> @utlrp.sql 

Leave a Comment

Your email address will not be published. Required fields are marked *