steps to upgrade 11.1.0.6.0 to 11.1.0.7.0
Step1:
using winSCP or anyother tool copy the patch file p6890831_111070_Linux-x86-64.zip to the environment from the machine where you are having patch file.
Step2:
login : oracle
password:
Uncompress the binary source
$unzip p6890831_111070_Linux-x86-64.zip
Example:-
After unzipping , you can find the below folder Disk1
c111ptqhdd009: /home/oracle
$ cd /oracle/app/patches/
c111ptqhdd009: /oracle/app/patches
$ ls
Disk1 p6890831_111070_Linux-x86-64.zip
Step3:
Bring down the application
Step4:
login : oracle
password:
Bring down the database
sqlplus '/as sysdba'
sql>shutdown immediate;
sql>exit
>ps -ef |grep pmon
Make sure that oracle is not running
>lsnrctl stop
>lsnrctl status
Make sure that the listener is not running.
Take a cold database backup
Controlfiles, datafiles, redo logs, archive files, tempfiles must be included in the backup. If the files are in different paths, the same has to be backedup.
>mkdir /backup_date
>cp /App1/oracle/oradata/orcl/*.* /backup/backup_date
>cd $ORACLE_HOME/dbs
>cp inittest.ora inittest.ora_bkpdate
>cp spfiletest.ora spfiletest.or_bkpdate
>cp orapwtest.ora orapwtest.ora_bkpdate
Step5:
login : oracle
password:
Take a backup of home path
>mkdir product_bkp
>cd /App1/oracle/product
>tar czf /backup/oracle_11106.tar.gz 11.1.0
Step6:
dbhome, coraenv,oraenv backup
login : root
password:
#cd /usr/local/bin
#cp dbhome dhome_bkpdate
#cp coraenv coraenv_bkpdate
#cp oraenv oraenv_bkpdate
Step7:
login : oracle
Installation of patchset
Invoke the runInstaller using the software xming to install patch graphically.
cd /oracle/app/patches/Disk1/
>./runInstaller
Select the ORACLE_HOME to upgrade and then click next, the prerequisites steps will complete last click INSTALL. At the end up the installation it will ask to run root.sh as root user. We need root user password or sudo user privilege to run root.sh script. Follow the step 8
Step8:
login : root
password:
or
login : your_SUDU_USERNAME
password:
cd /App1/oracle/product/11.1.0/db_1
./root.sh
Or
Sudu ./root.sh
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /App1/oracle/product/11.1.0/db_1
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ... overwrite (Y/N) : Y
Copying oraenv to /usr/local/bin ... overwrite (Y/N) : Y
Copying coraenv to /usr/local/bin ... overwrite (Y/N) : Y
Step9:
login : oracle
password:
Prerequisite check before upgradation
cd $ORACLE_HOME/rdbms/admin
sqlplus '/as sysdba'
sql> startup upgrade;
sql>spool pre_upgrade.log
sql> @utlu111i.sql
If the all the values obtained above are valid, please proceed to step 10 , otherwise please correct it.
Step10:
Upgradation script execution
login : oracle
password:
cd $ORACLE_HOME/rdbms/admin
sqlplus '/as sysdba'
sql> spool upgrade_date.log
sql> @catupgrd.sql
Step11:
login : oracle
password:
Take check the validity, version of the installed components
sqlplus '/as sysdba'
sql>set pages 250
sql> set lines 1000
sql> col comp_name for a40
sql> select comp_name, version, status from dba_registry;
Note : The status column of the displayed output should be 'Valid' and the version column should be '11.1.0.7'
Upgradation ends with this step12. If in case any problem during the installation and the old version needs to be reverted back
sql>shutdown immediate;
Step12:
Recompiling the invalid objects
login : oracle
password:
cd $ORACLE_HOME/rdbms/admin
sqlplus '/as sysdba'
sql>startup;
sql>spool recompile.log
sql> @utlrp.sql
Fallback plan Or To revert back to old version (11.1.0.6.0)
1. untar the binary backup
2. Backup the database the current database and then replace them with cold back taken before applying the patch.
login : root
password:
cd /usr/local/bin
#cp dbhome_bkpdate dbhome
#cp coraenv_bkpdate coraenv
#cp oraenv_bkpdate oraenv
login : oracle
password:
oracle binary restoration
cd /App1/oracle/product
>\rm -rf 11.1.0
>mkdir 11.1.0
>cp /backup/oracle_11106.tar.gz 11.1.0
>cd 11.1.0
>gunzip oracle_11106.tar.gz
>tar -xvf oracle_11106.tar
Datafile backup restoration
cd /App/oracle/oradata/orcl/
>\rm *
>cd /backup/backup_date
>cp *.* /App1/oracle/oradata/orcl/
>cd $ORACLE_HOME/dbs
>cp inittest.ora_bkpdate inittest.ora
>cp spfiletest.ora_bkpdate spfiletest.ora
>cp orapwtest.ora_bkpdate orapwtest.ora
sqlplus '/as sysdba'
sql>startup;
sql>select * from v$version;
sql>select comp_name, version, status from dba_registry;
Output should be 11.1.0.6 for version column and valid for status column.
*******************************************************************************
Thank You
Tuesday, October 18, 2011
Subscribe to:
Posts (Atom)