1 2 Previous Next 24 Replies Latest reply: Jul 1, 2011 8:05 AM by Nicolas.Gasparotto RSS

    How to know the patches applied on DB?

    430126
      Hello,

      I was little curious to know, how we can find the name & no of patches that were applied to a database eariler. Is there any query (static or dynamic views) that we can use to find out?? Actually, Im trying to figure the patches that were already applied to our production Database.

      I would appreicate, if someone can help me with this.

      Thanks

      Ratheesh
        • 1. Re: How to know the patches applied on DB?
          435383
          Use the command :

          $opatch lsinventory -details

          Make sure ur ORACLE_HOME env variable is set.

          Bhupinder
          • 2. Re: How to know the patches applied on DB?
            181444
            The proper response is dependent on your Oracle version but try this

            # to get list of installed patches
            $ORACLE_HOME/OPatch/opatch lsinventory


            HTH -- Mark D Powell --
            • 3. Re: How to know the patches applied on DB?
              Nicolas.Gasparotto
              $ORACLE_HOME/OPatch/opatch lsinventory
              This is only from 9i, before 9i, there is no way to know the pacthes applied. No other way than write into a precious document what patches were applied on the database.

              Nicolas.
              • 4. Re: How to know the patches applied on DB?
                451902
                What about 10g ?

                I tried the above and get the following error
                ERROR: Problem with parsing the opatch command.

                I am using AIX and Oracle 10.1.0.4.0 64 bit

                Regards

                Ramanbir S
                • 5. Re: How to know the patches applied on DB?
                  Nicolas.Gasparotto
                  Hi,

                  It's work fine for me :
                  E:\>set ORACLE_HOME=e:\oracle\ora101

                  E:\>cd %ORACLE_HOME%\opatch

                  E:\oracle\ora101\OPatch>opatch lsinventory

                  Oracle Interim Patch Installer version 1.0.0.0.53
                  Copyright (c) 2005 Oracle Corporation. All Rights Reserved..

                  We recommend you refer to the OPatch documentation under
                  OPatch/docs for usage reference. We also recommend using
                  the latest OPatch version. For the latest OPatch version
                  and other support related issues, please refer to document
                  293369.1 which is viewable from metalink.oracle.com

                  Oracle Home = e:\oracle\ora101
                  Location of Oracle Universal Installer components = E:\oracle\ora101\oui
                  Location of OraInstaller.jar  = "E:\oracle\ora101\oui\jlib"
                  Oracle Universal Installer shared library = E:\oracle\ora101\oui\lib\win32\oraIn
                  staller.dll
                  Location of Oracle Inventory Pointer = N/A
                  Location of Oracle Inventory = E:\oracle\ora101\inventory
                  Path to Java = "E:\oracle\ora101\jre\1.4.2\bin\java.exe"
                  Log file = e:\oracle\ora101/.patch_storage/<patch ID>/*.log

                  Creating log file "E:\oracle\ora101\.patch_storage\LsInventory__04-17-2006_17-05
                  -25.log"

                  Result:


                  There is no Interim Patch




                  OPatch succeeded.
                  OPatch returns with error code = 0
                  It should be work even if you're on AIX box server.
                  Use export instead of set, and $ORACLE_HOME instead of %ORACLE_HOME%

                  Nicolas.
                  • 6. Re: How to know the patches applied on DB?
                    181444
                    We have AIX 5.2L and Oracle 9.2.0.6 and 10.1.0.4 both 64 bit RAC and the command worked for both versions.

                    -- Mark D Powell --
                    • 7. Re: How to know the patches applied on DB?
                      430126
                      Thanks guyz but I"m still unable to find the patches applied on our production DB. We are working on SUN OS 5.8 and ORACLE 9.2.0.5.0. I've used the command
                      lsinventory -details but it says COMMAND not found.

                      Can anybody help me with this??

                      Ratheesh
                      • 8. Re: How to know the patches applied on DB?
                        181444
                        Well first off you have the command wrong. See the earlier post in the thread that shows the command. Notice that you have to full path it since opatch is not normally in the search path. lsinventory is a parameter to the command, not the command itself.

                        The -details option is a valid option. I tested it with 9.2.0.6

                        HTH -- Mark D Powell --
                        • 9. Re: How to know the patches applied on DB?
                          Laurent Schneider
                          opatch does not list the patches applied on DB. it lists the interim patches applied on oracle binaries.

                          the patched applied on DB are listed with
                          select * from registry$history;
                          • 10. Re: How to know the patches applied on DB?
                            181444
                            OP is on a version 9i database.

                            I find no such object in my 9.2 or 10.1.0.4 databases:

                            O9I1 > select * from registry$history;
                            select * from registry$history
                            *
                            ERROR at line 1:
                            ORA-00942: table or view does not exist


                            O9I1 > select owner from dba_objects where object_name =
                            2 upper('registry$history');

                            no rows selected

                            O9I1 > select owner from dba_objects where object_name =
                            2 upper ('v$session');

                            OWNER
                            ------------------------------
                            PUBLIC

                            A search of v$fixed_table also gave me no likely hits.

                            HTH -- Mark D Powell --
                            • 11. Re: How to know the patches applied on DB?
                              Laurent Schneider
                              I have no old instances to try this today, but it works on my 10gR2 DB. I did not know that was a new feature.
                              SYS@LSC01> select * from sys.registry$history;
                              ACTION_TIME                    ACTION   NAMESPACE VERSION      ID COMMENTS
                              ------------------------------ -------- --------- ------------ -- ------------------------------
                              11-APR-06 01.09.27.315196 PM   UPGRADE  SERVER    10.2.0.2.0      Upgraded from 10.2.0.1.0
                              Message was edited by:
                              Laurent Schneider
                              there were no interim patch. interim patch would be displayed too after catcpu execution
                              • 12. Re: How to know the patches applied on DB?
                                181444
                                A Little research makes me believe that this feature was introduced with the JAN 2006 Critical Patch Update.

                                See metalink Note:352783.1

                                We have not applied the patch set yet.

                                -- Mark D Powell --
                                • 13. Re: How to know the patches applied on DB?
                                  Nicolas.Gasparotto
                                  It's work fine on a 10.1.0.5 :
                                  SQL> select * from sys.registry$history;

                                  ACTION_TIME                  ACTION NAMESPACE VERSION           ID COMMENTS
                                  ---------------------------- ------ --------- ---------- --------- ----------
                                  18/03/06 21:57:58,890000     PATCH  SERVER    10.1.0.5.0           Patched from 10.1.0.4.0 to 10.1.0.5.0


                                  SQL>
                                  • 14. Re: How to know the patches applied on DB?
                                    Gab2
                                    I think the information you get from "select * from sys.registry$history" is bogus; I recently had to rollback a patch (from 10.1.0.4 to 10.1.0.5, back to 10.0.1.4) because it broke too many things, but it's still listed as an upgrade.

                                    Gabriel
                                    1 2 Previous Next