Part 1: Check the Oracle database patch version
1. View All version information:
Oracle@www.bkjia.com :~ /Product/11g/db/OPatch>./opatch lsinventory
Invoking OPatch 11.1.0.8.2
Oracle Interim Patch Installer version 11.1.0.8.2
Copyright (c) 2010, Oracle Corporation. All rights reserved.
Oracle Home:/opt/oracle/product/11g/db
Central Inventory:/opt/oracle/oraInventory
From:/etc/oraInst. loc
OPatch version: 11.1.0.8.2
OUI version: 11.1.0.7.0
OUI location:/opt/oracle/product/11g/db/oui
Log file location:/opt/oracle/product/11g/db/export toollogs/opatch/opatch2011-09-13_15-34-15PM.log
Patch history file:/opt/oracle/product/11g/db/export toollogs/opatch/opatch_history.txt
Lsinventory Output file location:/opt/oracle/product/11g/db/export toollogs/opatch/lsinv/lsinventory2011-09-13_15-34-15PM.txt
--------------------------------------------------------------------------------
Installed Top-level Products (2 ):
Oracle Database 11g 11.1.0.6.0
Oracle Database 11g Patch Set 1 11.1.0.7.0
There are 2 products installed in this Oracle Home.
Interim patches (1 ):
Patch 9352179: applied on Tue Aug 09 12:09:19 CST 2011
Unique Patch ID: 12289084
Created on 1 Apr 2010, 01:07:34 hrs PST8PDT
Bugs fixed:
7378322,906 8088, 8348481,905 listen 3, 6851110,720 6858, 7497788,897 4548
7331867,825 1486, 8851675,821 1920, 9352179,701 3124, 7643188,713 5702
7529174,719 6532, 7515779,770 5669, 8402548,860 8377, 7119382,751 0766
9001453,836 4676, 9066130,742 4804, 7628387,740 8621, 7426336,755 3884
8856696,684 3972, 7694979,856 5708, 6972189,659 8432, 6768362,650 1490
8836375,821 6875, 7527650,771 9143, 8402551,745 4752, 8290478,741
8402555,771 9148, 8284633,831 8050, 7639602,853 9335, 8613137,765 0993
8940197,697 0731, 7589862,917 0608, 7131291,910 9536, 7586451,744 6163
8199266,746 0818, 9114072,661 8461, 7451927,737 3196, 8230457,733 6031
7420394,841 3059, 8402562,891 4979, 8402637,739 listen 4, 8876094,619 6748
7627743,734 8847, 8408887,718 3523, 8531282,744 1663, 7720494,771 9668
8645846,853 9923, 9458811,853 4338, 8339404,823 6851, 9458814,760 2341
9458816,703 6453, 7610362,885 5553, 7384419,769 0421, 9458819,841 9383
8855559,854 3737, 7447559,677 2911, 7175513,734 1598, 7706138,824 3648
8367827,836 5141, 7350127,902 7691, 8549480,846 2173, 7356443,759 3835
8483871,824 2410, 7044551,757 2069, 7639121,945 8829, 8855565,882 5048
7253531,832 8853, 8341623,840 9848, 6851669,731 8276, 8257122,701 3817
8860821,730 9458, 8450529,830 6933, 8306934,684 0740, 9458831,698 1690
8304329,828 1906, 7480809,885 5570, 8339352,734 0448, 8499600,739 3258
8588540,879 0767, 8855575,659 9920, 7630416,742 6959, 8855577,698 0601
8342506,871 7461, 6452375,860 7693, 6407486,765 3579, 7416901,728 1382
8599477,753 5429, 8582594,747 5055, 8217795,740 9110, 7432514,836 2693
7436152,768 0907, 7013835,770 8340, 8499043,836 1398, 6784747,752 4944
7496908,766 2620, 8224083,738 5253, 9189647,722 5720, 6941717,712 2161
8898852,836 3210, 7477246,737 7810, 7299153,911 8620, 8213302,890 9984
9118622,920 9238, 8702276,749 7640, 6991626,763 0874, 7311909,743
7213937,746 2112, 7352414,751 6867, 8199107,729 6258, 6812439,687 0937
7219752,726 3842, 8287680,690 0214, 8870559,688 2739, 8813366,899 0527
8352304,750 0792, 8352309,753 8000, 8834636,832 4760, 7652888,733 0434
7113299,730 7972, 8487273,746 2709, 7486595,865 0661, 9032717,865 8581
8244217,751 5145, 7499911,741 1865, 7276960,889 7432556,761, 3481
7522002,867 listen 3, 7452373,822 1425, 9188010,743 8445, 7334226,919 7917
8284438,749 4333, 7318049,825 0643, 7834195,821 4576, 6679303,881 5639
8277580,771 5244, 7675269,751 6536, 8490879,698 0597, 8301559,749 9353
8496830,735 7462589,664, 8416414,783 7480, 7189645,720
8702535,743 6280, 6955744,750 6785, 7366290,697 7167, 8570572,770 2085
8348464,718 5872, 8625762,605 9178, 7257038,854 2307, 8833297,857 8132
7606362,733 0611, 8226397,762 8866, 6903819,839 1256, 7676737,725 8928
7829321,731 1601, 8433270,751 1040, 7434194,836 9094, 8563941,856 3942
8563943,856 3944, 8563945,856 3946, 7716219,856 3947, 7345904,856 3948
7556778,822 0734, 6870994,759 7354, 9135679,752 3787
--------------------------------------------------------------------------------
OPatch succeeded.
2. query a specified patch number
Oracle@www.bkjia.com :~ /Product/11g/db/OPatch>./opatch lsinventory | grep 9352179
Patch 9352179: applied on Tue Aug 09 15:19:13 CST 2011
7331867,825 1486, 8851675,821 1920, 9352179,701 3124, 7643188,713 5702
Supplement: If the./opatch lsinventory command is executed, an error is returned:
Oracle @ bmsuitedba:/opt/oracle/product/11/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:/opt/oracle/product/11
Central Inventory:/opt/oracle/oraInventory
From:/etc/oraInst. loc
OPatch version: 11.1.0.6.2
OUI version: 11.1.0.7.0
OUI location:/opt/oracle/product/11/oui
Log file location:/opt/oracle/product/11/export toollogs/opatch/opatch2011-09-13_16-24-45PM.log
Inventory load failed... OPatch cannot load inventory for the given Oracle Home.
LsInventorySession failed: Unable to create patchObject
OPatch failed with error code 73
It is very likely because the opatch version is too low, you need to download a later version of opatch, such as: p6880880_111000_Linux-x86-64.zip, directly decompress the can be used.
Part 2: patch oracle
If the database version is 11.1.0.6.0 and you want to upgrade the database to 11.1.0.7.3, perform the following operations:
1. oracle of version 11.1.0.6.0 has a zip package on the official website and can be downloaded directly. The installed version is 11.1.0.6.0;
2. The 11.1.0.7.0 version is based on 11.1.0.6.0 and can only be obtained through a major patch. This major patch must be downloaded by an oracle account. Of course, it may be shared by netizens. For example: p6890831_111070_Linux-x86-64.zip, decompress to get the Disk1 directory, and then perform the following operations:
Oracle @ bmsuitedba :~ /Setup> cd Disk1/
Oracle @ bmsuitedba :~ /Setup/Disk1> ls
111__buglist.htm install patch_note.htm response runInstaller stage
Oracle @ bmsuitedba :~ /Setup/Disk1>./runInstaller -- this step requires a graphical interface.
3. Version 11.1.0.7.3 is based on 11.1.0.7.0 and can be obtained through patching. For example, patch number: 9352179, patch package: p9352179_111070_Linux-x86-64db.zip
Decompress the package and get the 9352179 directory:
Oracle @ bmsuitedba :~ /Setup> cd 9352179/
Oracle @ bmsuitedba :~ /Setup/9352179>/opt/oracle/product/11/OPatch/opatch apply -- Note: To perform this step, you must enter the directory of the patch package that you just extracted, then run opatch using the complete opatch path. Otherwise, an error is reported.
Note: If the opatch version used for oracle installation is too low, an error occurs during the opatch version. In this case, you need to download another opatch package of a later version, for example, in the above operation will report an error, you need to use this version of opatch package: p6880880_111000_Linux-x86-64.zip, directly decompress can be used.