Tuesday, July 29, 2014

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

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

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

For Installation,


Step 2.Run Pre-upgrade Information Tool 

SQL>spool /utlu112i.log

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

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.

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

Step 7.Upgrade database manually.

[oracle@localhost admin]$ echo $ORACLE_HOME

cd $ORACLE_HOME/rdbms/admin

sql>sqlplus / as sysdba
sql>spool /tmp/catupgrd.log
sql>startup upgrade
sql>set echo on;
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.



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.


Monday, July 28, 2014

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

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

For Applying patchset on oracle database.We need to 1st download all the requiesite downloads from support.oracle.com.

Before upgrade start,Download the below files from oracle.com









Now, follow below steps to complete the task of upgradation of to patchset.

Estimated time for downtime is around 10hours.

Step1.Install Oracle yo different home.

a) Create directory inside current home
mkdir /u01/oracle/product/
chown -R oracle:dba /u01/oracle/product/

b)unzip the above all .zip files to particular location.

c)Connect to oracle & run the installer
cd  /oracle11g/

Click next,
Click on fix & check agaian.
After that run /tmp/CVU_11. at root level.
Click Ok to continue.

 check ignore all.

Click Yes.

For real time production, Do not go further untill all requirement fulfill.

It will take next 30 minutes to finish the installation.

Run root.sh at root level.


[root@localhost]# /u01/oracle/product/
Performing root user operation for Oracle 11g

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/oracle/product/

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Finished product-specific root actions.

Click Ok to finish the installation.

Go to Upgrade .