Tuesday, July 29, 2014

Oracle 11g:Upgrade 11.2.0.x version to latest 11.2.0.4.1 patchset:Upgrade

Oracle 11g:Upgrade 11.2.0.x version  to latest 11.2.0.4.1 patchset:Upgrade 




Once We finish the installation of 11.2.0.4 on different then we will go further for upgrade database.


For Installation,


http://oracle-mssql-dba.blogspot.in/2014/07/oracle-11gupgrade-1120x-version-to.html

Step 2.Run Pre-upgrade Information Tool 

SQL>spool /utlu112i.log
SQL>@ORACLE_HOME/rdbms/admin/utlu112i.sql

Check timezone .Need to upgrade if it is require by tool.

Step 3.Run dbupgdiag.sql.Check any invalid objects in dba_registry.
Valid all Dba_registry object by running utlrp.sql

sql>sqlplus / as sysdba
sql>@?/rdbms/admin/utlrp.sql


Step 4.Backup database.

a)take rman backup with latest spfile & controlfile.
b)take cold backup by mount the database after shutdown normal db.


Step 5.Shut down database normal.

SQL>shutdown normal.

Step 6.Set New Oracle_HOME,PATH,LIBRARY_PATH.Copy tnsnames.ora,listener.ora,spfile,pfile & password to new oracle_home location.Update /etc/oratab.

a)update oratab.
#oraupg:/u01/oracle/product/11.2.0/dbhome_1:N
oraupg:/u01/oracle/product/11.2.0.4:N

b)export ORACLE_HOME=/u01/oracle/product/11.2.0.4/
   export ORACLE_SID=oraupg
c) Copy pfile,spfile & password files
cp *ora /u01/oracle/product/11.2.0.4/dbs/
d)Copy tnsnames.ora,listener.ora & sqlnet.ora
cp *ora /u01/oracle/product/11.2.0.4/network/admin/


Step 7.Upgrade database manually.

a)
[oracle@localhost admin]$ echo $ORACLE_HOME
/u01/oracle/product/11.2.0.4



cd $ORACLE_HOME/rdbms/admin


sql>sqlplus / as sysdba
sql>spool /tmp/catupgrd.log
sql>startup upgrade
sql>set echo on;
sql>@catupgrd.sql
sql>spool off;
sql>shutdown normal

catupgrd.sql will take around 5 hours to finish on single database.Do parallel if more than 1 databases.


b)Check catupgrd.sql spool file for errors.

c)Restart database normal.

d)SQL>@$ORACLE_HOME/rdbsm/admin/catuppst.sql

e)SQL>@$ORACLE_HOME/rdbms/admin/utlrp.sql

f)Run dbupgdiag.sql scirpt for invalid objects in dba_registry. and no invalid objects in dba_objects.

Step 8.Gather stats of whole database.


******************************************FINISH*******************************************************

2 comments:

  1. SQL> SELECT TO_NUMBER('DATA_VAULT_OPTION_ON') FROM v$option
    2 WHERE
    3 value = 'TRUE' and parameter = 'Oracle Database Vault';
    SELECT TO_NUMBER('DATA_VAULT_OPTION_ON') FROM v$option
    *
    ERROR at line 1:
    ORA-01722: invalid number



    ---\

    Solution::::

    SQL> shut immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> exit

    [oracle@localhost admin]$ cd $ORACLE_HOME/rdbms/lib
    [oracle@localhost lib]$ pwd
    /u01/oracle/product/11.2.0.4/rdbms/lib
    [oracle@localhost lib]$ make -f ins_rdbms.mk dv_off
    /usr/bin/ar d /u01/oracle/product/11.2.0.4/rdbms/lib/libknlopt.a kzvidv.o
    /usr/bin/ar cr /u01/oracle/product/11.2.0.4/rdbms/lib/libknlopt.a /u01/oracle/product/11.2.0.4/rdbms/lib/kzvndv.o
    [oracle@localhost lib]$ cd $ORACLE_HOME/bin
    [oracle@localhost bin]$ relink all
    writing relink log to: /u01/oracle/product/11.2.0.4/install/relink.log

    --Again start database in Step 7

    ReplyDelete
  2. I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in Oracle 11g, kindly contact us http://www.maxmunus.com/contact
    MaxMunus Offer World Class Virtual Instructor led training on Oracle 11g. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
    For Demo Contact us:
    Name : Arunkumar U
    Email : arun@maxmunus.com
    Skype id: training_maxmunus
    Contact No.-+91-9738507310
    Company Website –http://www.maxmunus.com


    ReplyDelete

Dear User,

Thank you very much for your kind response