Applying Patches to Oracle Database:
Oracle continues to recommend that, even though other mitigation measures may be available, Critical Patch Updates be applied as soon as possible in order for organizations to retain their security in depth posture.
Pre-check:
1. Check oracle database full backup.
2. take oracle home backup and inventory backup.
cd $ORACLE_HOME
tar -cvf /u01/oracle/home10204_bkp.tar .
3.chek vaild and invaild object counts.
select owner,object_name,object_type from dba_objects where status='INVALID'
Apply to 10204 home:
================
Shut down DBs and listener on this home
Check for zombie processes: ps -ef | grep ora
if any process is there kill that process.
export PATH=$PATH:/u01/app/oracle/product/10.2.0/db_1/OPatch
which opatch (verify 10.2.0.4)
echo $ORACLE_HOME (verify 10.2.0.4)
Apply Jul2011CPU:
cd /orasw/dba/patches/12419249
opatch napply -skip_subset -skip_duplicate
Hit enter when it asks for e-mail address
Enter "Y" I am ok being uninformed
Then "Y" for All
Once successfully completed. start the database.
Apply to Database:
===============
SQL>Startup
Now run CATBUNDLE for each DB:
#cd $ORACLE_HOME/rdbms/admin
startup
@?/rdbms/admin/catbundle.sql cpu apply
@?/rdbms/admin/utlrp.sql
Post-check:
select *from registry$history;
check the vaild and invaild object counts.
start the listener.
Done!
opatch lsinventory --> os level we can check what are the patchs are applied.
How to rollback:
================
opatch rollback -id <patchid>
Oracle continues to recommend that, even though other mitigation measures may be available, Critical Patch Updates be applied as soon as possible in order for organizations to retain their security in depth posture.
Pre-check:
1. Check oracle database full backup.
2. take oracle home backup and inventory backup.
cd $ORACLE_HOME
tar -cvf /u01/oracle/home10204_bkp.tar .
3.chek vaild and invaild object counts.
select owner,object_name,object_type from dba_objects where status='INVALID'
Apply to 10204 home:
================
Shut down DBs and listener on this home
Check for zombie processes: ps -ef | grep ora
if any process is there kill that process.
export PATH=$PATH:/u01/app/oracle/product/10.2.0/db_1/OPatch
which opatch (verify 10.2.0.4)
echo $ORACLE_HOME (verify 10.2.0.4)
Apply Jul2011CPU:
cd /orasw/dba/patches/12419249
opatch napply -skip_subset -skip_duplicate
Hit enter when it asks for e-mail address
Enter "Y" I am ok being uninformed
Then "Y" for All
Once successfully completed. start the database.
Apply to Database:
===============
SQL>Startup
Now run CATBUNDLE for each DB:
#cd $ORACLE_HOME/rdbms/admin
startup
@?/rdbms/admin/catbundle.sql cpu apply
@?/rdbms/admin/utlrp.sql
Post-check:
select *from registry$history;
check the vaild and invaild object counts.
start the listener.
Done!
opatch lsinventory --> os level we can check what are the patchs are applied.
How to rollback:
================
opatch rollback -id <patchid>