Blog dedicated to Oracle Applications (E-Business Suite) Technology; covers Apps Architecture, Administration and third party bolt-ons to Apps

Thursday, August 30, 2007

How can I see if a Critical Patch Update(CPU) is installed ?

I did a little research after Virag Sharma gave the query of select * from dba_registry_history as a comment in my previous post, to check CPU status. This view is available on 9.2.0.8 and 10.2.0.x database releases only. A little more digging revealed the source table:

SQL> select text from dba_views
2 where view_name='DBA_REGISTRY_HISTORY';

TEXT
--------------------------------------------------------------------------------
SELECT action_time, action, namespace, version, id, comments
FROM registry$history

Metalink Note 352783.1 says:

From CPUJan2006 onwards, for the OPatch installed CPU's it is possible to do the following query:

col action_time for a28
col action for a6
col namespace for a9
col version for a10
col id for 99999999
col comments for a10
select * from registry$history;
This select will list the installed CPU's since CPUJAN2006, if you get ora-942 CPUJan2006 has not been installed, previous ones might have been.

Example for RDBMS version 10.2.0.1:

select * from registry$history;

ACTION_TIME ACTION NAMESPACE VERSION ID COMMENTS
---------------------------- ------ --------- ---------- --------- ----------
30-JAN-06 12.31.23.139000 PM CPU SERVER 10.2.0.1.0 4751539 CPUJan2006

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.

For 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.log or $ORACLE_HOME/cpu/CPUOct2005/install.log

So by logging in as applmgr you could do

cd $IAS_ORACLE_HOME/cpu
ls -ltr

to see what CPU is applied on IAS_ORACLE_HOME.


3 comments:

Anonymous said...

> This view is available on 9.2.0.8 and 10.2.0.x
but not in early 10.1

Anonymous said...

actually, starting with CPU Jan2006 you can query the registry$history table even in 10.1

have a look at Note:352783.1

Vikram Das said...

Hi Laurent,

I have already mentioned about the note no. 352783.1 in my post and also the fact that dba_registry_history view is available from 9.2.0.8 and 10.2.0.x onwards.(line 2 in my post) The underlying table for the this view is registry$history which is available from Jan 2006 CPU onwards for all supported 9i and 10g releases.

Thanks

- Vikram