How to use opatch to apply Oracle Critical Patch Update(CPU)

Jephe Wu - http://linuxtechres.blogspot.com

Objective: to apply the latest CPU for Oracle Windows
Environment: Windows 2003 server SP2, Oracle 10.2.0.4 32bit


Steps:

1. backup database (rman, expdp/impdp and code backup if possible)
2. backup oracle home and c:\program files\oracle
3. stop listener, oracle service, zabbix agent and netbackup client service
4. sqlora32.dll cannot be used by other process, use process explorer from systeminternal to check.
5. list number of invalid objects and views
6. select * from registry$history for patching history
7. opatch version requirement, if higher version is required, download the latest opatch
8. opatch lsinventory to list inventory
9. opatch apply to apply patch
10. compile all views again , compare the number of invalid views and objects.