Note that the methods in this note will allow you to check upon an Oracle installation, it is still recommended for a DBA to properly document all applied patches to the software installation. The output of ‘opatch lsinventory’ will give you a list of bug numbers, but it can be awkward to cross reference them with the base bug numbers or specific CPU that was applied. With the addition of logging proper information in dictionary table registry$history we have improved upon this need
RDBMS Versions 9.2 and higherFor 9.2 and up you can simply ask this with “opatch lsinventory” , this will list all installed patches.
Oracle recommend to have latest patch installed .From CPUJan2006 onwards, for the OPatch installed CPU’s it is possible to do the following query:col action for a6
col namespace for a9
col version for a10
col id for 99999999
col comments for a10
select * from registry$history;
SQL> SQL> SQL> SQL> SQL> SQL>
ACTION_TIME ACTION NAMESPACE VERSION ID COMMENTS
—————————- —— ——— ———- ——— ———-
09-MAY-07 07.17.43.371379 AM CPU SERVER 10.2.0.2.0 5689957 CPUJan2007
Alternatively if you want to avoid OPatch you can “grep” the Opatch inventory for the CPU patch numbers by use of a shell script. But since opatch is needed in 9.2 and up to install the CPU patches, it will be always present in 9.2 and up.
RDBMS Verssions prior to 9.2For 8.1.7 and 9.0.1 use of OPatch not possible, however installing a 9.0.1 or 8.1.7 CPU will
create directories and files like %ORACLE_HOME%\cpu\CPUOct2005\patch<component>.log or $ORACLE_HOME/cpu/CPUOct2005/install<timestamp>.log