Upgradation ( 10.2.0.4.0 to 11.2.0.4.0 )

Before doing to upgradation be careful to  check and take care of  prerequisite.
this is useful for interview point of preparation manily.

1. Install the 11.2.0.4 Binaries

2. run the Preupgrade script in old home database 

      spool /db/RMAN/preupgrade_AUTOSK.log 

    @/Oracle/app/oracle/product/11.2.0/rdbms/admin/utlu112i.sql

    spool off
 
    Note : utlu112i.sql to check space on tablespace obsolete (invalid) / deprecated parameters etc

3. run the utlrp,sql 

  SQL> @/Oracle/app/oracle/product/11.2.0/rdbms/admin/utlrp.sql


    Note : utlrp.sql to recompile invalid objects

4. copy the pfile,spfile,orapwd,listener.ora,tnsnames.ora,sqlnet.ora .... from old to new home 


5. change the value of compatiable in new home pfile 

     compatible=11.2.0


6. take the invalid object count and dba_registry

  SQL>  select comp_name,status,version from dba_registry;

                            COMP_NAME                      STATUS      VERSION
                           ------------------------------         -----------     ------------------------------
                        Oracle Database Catalog Views  VALID       10.2.0.4.0
                        Oracle Database Packages and T VALID       10.2.0.4.0



7. shutdown the database in old home

             SQL>shutdown immediate;



8. start the database in mount stage in old home 

              SQL>startup mount


9. connect to RMAN

rman target /

* database full database backup in old home
* take the backup of the database 
Rman>run
{
allocate channel ch1 type DISK;
allocate channel ch2 type DISK;
allocate channel ch3 type DISK;
allocate channel ch4 type DISK;
backup as compressed backupset format '/db/RMAN/%d_%T_%t_%s_%p.dbf' database ;
backup current controlfile format '/db/RMAN%d_%T_%t_%s_%p.ctl';
release channel ch1;
release channel ch2;
release channel ch3;
release channel ch4;
}

  

10. shutdown the database in old home because it is mount why means we have taken the backup 

          SQL>shutdown immediate;   (old home )

11.    start the database in upgrade mode using new 11g24 home.
    
  export ORACLE_SID=AUTOSK
 export ORACLE_HOME=/Oracle/app/oracle/product/11.2.0
 export TNS_ASDMIN=$ORACLE_HOME/network/admin
 export LD_LIBRARY_PATH=$ORACLE_HOME/lib
 export PATH=$ORACLE_HOME/bin:$PATH


12. Becareful if you above script don't user (. oraenv) mind it 


13.sql>startup upgrade

     sql> spool /db/RMAN/upgrade.log
     @/Oracle/app/oracle/product/11.2.0/rdbms/admin/catupgrd.sql
     spool off

14. spool /db/RMAN/upgrade.log
    @/Oracle/app/oracle/product/11.2.0/rdbms/admin/catupgrd.sql
     spool off

   Note :IT WILL TAKE SOME TIME AFTER RUN THE SCRIPT OF catupgrd.sql

15.run the utlrp.sql in new home

startup the database and run utlrp.sql located on new home

@/Oracle/app/oracle/product/11.2.0/rdbms/admin/utlrp.sql


16. chekc the invalid object count and check version,status from ( dba_registry )

select comp_name,version,status from dba_registry;
select owner,count(*),object_name,object_type,status from dba_objects where status='INVALID' group by owner,object_name,object_type,status;


17. Check in New Home
SQL>select owner,count(*),object_name,object_type,status from dba_objects where                                       status='INVALID' group by owner,object_name,object_type,status;



18. SQL> select comp_name,version,status from dba_registry;

COMP_NAME                      VERSION                        STATUS
------------------------------ ------------------------------ -----------
Oracle Database Catalog Views  11.2.0.4.0                     VALID
Oracle Database Packages and T 11.2.0.4.0                     VALID



                                                    Thank you






 






No comments:

Post a Comment