How do I find all patches applied to a DB

Hi,
Compare a working DB Version and Patch Sets between two databases.

Is there a query? or how?
LVL 2
BILL CarlisleAPEX DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

slightwv (䄆 Netminder) Commented:
Oracle's OPATCH utility will tell you what patches have been applied:
opatch lsinventory
0
DavidSenior Oracle Database AdministratorCommented:
So, the full path would normally be:
$ORACLE_HOME/Opatch/opatch

And the syntax is nicely explained in the blog http://www.oracleportal.org/knowledge-base/oracle-database/database-concepts/installation-and-patching/patching/opatch-utility.aspx.
0
sdstuberCommented:
you can look at dba_registry_history for a list of CPU and PSU changes
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

BILL CarlisleAPEX DeveloperAuthor Commented:
[myuser@mydb ~]$ $ORACLE_HOME/Opatch/opatch
-bash: /u02/oracle/DEVAPPS/apps/tech_st/10.1.2/Opatch/opatch: No such file or directory

still trying to use the users I have.. don't have oracle

Sean, tried dba_registry_history
but it doesn't showPatch 12726556: LAUNCHING APEX FROM FORMS NAVIGATOR
which we installed - like to see what patches were installed

set pages 200
set lin 2000
col COMMENTS format a30
col ACTION format a8
col ACTION_TIME format a30
col NAMESPACE format a6
col VERSION format a10
col BUNDLE_SERIES format a13
select * from dba_registry_history;
0
slightwv (䄆 Netminder) Commented:
>>still trying to use the users I have.. don't have oracle

I believe you need to be the oracle user to run opatch.
0
slightwv (䄆 Netminder) Commented:
or at least a member of the dba group.

Confirm the opatch folder:
ls -al  $ORACLE_HOME
0
BILL CarlisleAPEX DeveloperAuthor Commented:
yes, OPatch dir is there

what is
.patch_storage
0
slightwv (䄆 Netminder) Commented:
>>yes, OPatch dir is there

Then it is a user writes issue.  You need to be oracle or in the dba group.

>>what is .patch_storage

Don't know.
0
DavidSenior Oracle Database AdministratorCommented:
Sorry, I implied you would add the other expert's parameter, as follows:

[myuser@mydb ~]$ $ORACLE_HOME/Opatch/opatch lsinventory
0
BILL CarlisleAPEX DeveloperAuthor Commented:
No, it was case sensitive.. :)  BUT it got errors..

[myuser@mydb OPatch]$ opatch lsinventory
Invoking OPatch 11.1.0.6.2

Oracle Interim Patch Installer version 11.1.0.6.2
Copyright (c) 2007, Oracle Corporation.  All rights reserved.


Oracle Home       : /u02/oracle/DEV/db/tech_st/11.1.0
Central Inventory : /home/test/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 11.1.0.6.2
OUI version       : 11.1.0.7.0
OUI location      : /u02/oracle/myenv/db/tech_st/11.1.0/oui
Log file location : /u02/oracle/myenv/db/tech_st/11.1.0/cfgtoollogs/opatch/opatch2013-09-26_11-58-12AM.log

OPatch failed to locate Central Inventory.
Possible causes are:
    The Central Inventory is corrupted
    The oraInst.loc file specified is not valid.
LsInventorySession failed: OPatch failed to locate Central Inventory.
Possible causes are:
    The Central Inventory is corrupted
    The oraInst.loc file specified is not valid.

OPatch failed with error code 73
0
BILL CarlisleAPEX DeveloperAuthor Commented:
OPatch failed to locate Central Inventory.

Does a  Central Inventory db have to be setup in the beginning?
0
BILL CarlisleAPEX DeveloperAuthor Commented:
What I meant earlier about the dba registry not showing Patch 12726556: LAUNCHING APEX FROM FORMS NAVIGATOR was..

I was wanting to see the Patch numbers if possible that were applied.

We applied Patch 12726556 and so I wanted to see what else was applied.
0
slightwv (䄆 Netminder) Commented:
>>Does a  Central Inventory db have to be setup in the beginning?

Not that I have ever heard of.

There is some information out there on how to possible fix the "OPatch failed to locate Central Inventory" error.

However I'm no longer in a Unix environment and cannot state it this will fix your issues or not.

I would probably open up an SR and have Oracle Support provide the correct steps.

Here is one link I found:
http://pranilesh-chand.blogspot.com/2011/10/opatch-failed-to-locate-central.html
0
BILL CarlisleAPEX DeveloperAuthor Commented:
So is OPatch the only way to get the patch history?
0
slightwv (䄆 Netminder) Commented:
I suppose you could manually traverse the Oracle config files and come up with a list of your own.

I should also point out that some of the patches I have applied in the past don't require opatch.  They were one-off patches that just required manually copying files from the patch folder into the correct Oracle folders.

For these even opatch won't report on them.  I don't know of any way to produce a report for those or even if those types of patches even exist any more.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
BILL CarlisleAPEX DeveloperAuthor Commented:
Yes, it is too bad OPatch doesn't have a GUI to add manual patch items to it for record sake although it would only be as good as the user :)

Our DBA got the OPatch working beautifully!
He had to log in as root and point the Central Inventory to the right place. We have several in our environment.

Thanks for the help All!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.