User Tools

Site Tools


wiki:how_to_cleanup_old_updates

This is an old revision of the document!


Old patches are stored in %ORACLE_HOME%\.patch_store

- Run CMD.exe as administrator - Make sure that the %ORACLE_HOME% variable is defined using following command:

echo %ORACLE_HOME%
%ORACLE_HOME%

- When not defined (as above), use following command to define it:

set ORACLE_HOME=C:\oracle\product\19.3.0\dbhome_1
echo %ORACLE_HOME%
C:\oracle\product\19.3.0\dbhome_1

- Make sure that the %PATH% variable contains %ORACLE_HOME%\perl\bin using following command:

echo %PATH%
%PATH%

- When not containing the %ORACLE_HOME%\perl\bin (as above), use following command to define it (Make sure you include the %PATH% or you will overwrite your current variable with wrong setting):

set PATH=%ORACLE_HOME%\perl\bin;%PATH%
echo %PATH%
C:\oracle\product\19.3.0\dbhome_1\perl\bin;C:\oracle\product\19.3.0\dbhome_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Users\admjwa\AppData\Local\Microsoft\WindowsApps

- Navigate to the OPatch folder

cd %ORACLE_HOME%\opatch

- Check that OPatch version is above 12.2.0.1.37 (April 2023)

opatch version
OPatch Version: 12.2.0.1.40
OPatch succeeded.

- List the patches that can be deleted using OPatch

opatch util listorderedinactivepatches
Oracle Interim Patch Installer version 12.2.0.1.40
Copyright (c) 2024, Oracle Corporation.  All rights reserved.
Oracle Home       : C:\oracle\product\19.3.0\dbhome_1
Central Inventory : C:\Program Files\Oracle\Inventory
from           :
OPatch version    : 12.2.0.1.40
OUI version       : 12.2.0.7.0
Log file location : C:\oracle\product\19.3.0\dbhome_1\cfgtoollogs\opatch\opatch2024-01-04_11-03-24AM_1.log
Invoking utility "listorderedinactivepatches"
List Inactive patches option provided
The oracle home has the following inactive patch(es) and their respective overlay patches:
The number of RU chains is  1
***** There are 9 inactive RU patches in chain 1
-Inactive RU/BP 31719903:Windows Database Bundle Patch : 19.9.0.0.201020 (31719903), installed on: Thu Feb 18 10:54:04 CET 2021, with no overlays
-Inactive RU/BP 32062765:Windows Database Bundle Patch : 19.10.0.0.210119 (32062765), installed on: Wed Apr 21 10:03:31 CEST 2021, with no overlays
-Inactive RU/BP 32409154:Windows Database Bundle Patch : 19.11.0.0.210420 (32409154), installed on: Wed May 19 11:16:49 CEST 2021, with no overlays
-Inactive RU/BP 32832237:Windows Database Bundle Patch : 19.12.0.0.210720 (32832237), installed on: Tue Sep 28 13:41:01 CEST 2021, with no overlays
-Inactive RU/BP 33155330:Windows Database Bundle Patch : 19.13.0.0.211019 (33155330), installed on: Thu Dec 02 12:51:24 CET 2021, with no overlays
-Inactive RU/BP 33575656:Windows Database Bundle Patch : 19.14.0.0.220118 (33575656), installed on: Thu Mar 10 11:46:14 CET 2022, with no overlays
-Inactive RU/BP 34110685:Windows Database Bundle Patch : 19.16.0.0.220719 (34110685), installed on: Tue Sep 20 15:45:36 CEST 2022, with no overlays
-Inactive RU/BP 34468114:Windows Database Bundle Patch : 19.17.0.0.221018 (34468114), installed on: Tue May 30 20:02:30 CEST 2023, with no overlays
-Inactive RU/BP 35046439:Windows Database Bundle Patch : 19.19.0.0.230418 (35046439), installed on: Thu Aug 17 19:01:51 CEST 2023, with no overlays
-Active RU/BP 35681552:Windows Database Bundle Patch : 19.21.0.0.231017 (35681552), installed on: Tue Nov 28 10:05:15 CET 2023, with no overlays
OPatch succeeded.

- Delete inactive patches except the latest inactive patche using following command (Last one will be kept in case you need to rollback):

opatch util deleteinactivepatches
Oracle Interim Patch Installer version 12.2.0.1.40
Copyright (c) 2024, Oracle Corporation.  All rights reserved.
Oracle Home       : C:\oracle\product\19.3.0\dbhome_1
Central Inventory : C:\Program Files\Oracle\Inventory
   from           :
OPatch version    : 12.2.0.1.40
OUI version       : 12.2.0.7.0
Log file location : C:\oracle\product\19.3.0\dbhome_1\cfgtoollogs\opatch\opatch2024-01-04_11-07-25AM_1.log
Invoking utility "deleteinactivepatches"
Inactive Patches Cleanup option provided
Delete Inactive Patches .......
***** There are 9 inactive RU patches in chain 1
***** 8 inactive patches will be deleted
-To be deleted inactive RU/BP 31719903:Windows Database Bundle Patch : 19.9.0.0.201020 (31719903), installed on: Thu Feb 18 10:54:04 CET 2021, with no overlays
-To be deleted inactive RU/BP 32062765:Windows Database Bundle Patch : 19.10.0.0.210119 (32062765), installed on: Wed Apr 21 10:03:31 CEST 2021, with no overlays
-To be deleted inactive RU/BP 32409154:Windows Database Bundle Patch : 19.11.0.0.210420 (32409154), installed on: Wed May 19 11:16:49 CEST 2021, with no overlays
-To be deleted inactive RU/BP 32832237:Windows Database Bundle Patch : 19.12.0.0.210720 (32832237), installed on: Tue Sep 28 13:41:01 CEST 2021, with no overlays
-To be deleted inactive RU/BP 33155330:Windows Database Bundle Patch : 19.13.0.0.211019 (33155330), installed on: Thu Dec 02 12:51:24 CET 2021, with no overlays
-To be deleted inactive RU/BP 33575656:Windows Database Bundle Patch : 19.14.0.0.220118 (33575656), installed on: Thu Mar 10 11:46:14 CET 2022, with no overlays
-To be deleted inactive RU/BP 34110685:Windows Database Bundle Patch : 19.16.0.0.220719 (34110685), installed on: Tue Sep 20 15:45:36 CEST 2022, with no overlays
-To be deleted inactive RU/BP 34468114:Windows Database Bundle Patch : 19.17.0.0.221018 (34468114), installed on: Tue May 30 20:02:30 CEST 2023, with no overlays
-To be retained inactive RU/BP 35046439:Windows Database Bundle Patch : 19.19.0.0.230418 (35046439), installed on: Thu Aug 17 19:01:51 CEST 2023, with no overlays
-Active RU/BP 35681552:Windows Database Bundle Patch : 19.21.0.0.231017 (35681552), installed on: Tue Nov 28 10:05:15 CET 2023, with no overlays
Do you want to proceed? [y|n]

- Confirm typing “y” + Enter

y
User Responded with: Y
Deleted RU/BP patch: 31719903
Deleted RU/BP patch: 32062765
Deleted RU/BP patch: 32409154
Deleted RU/BP patch: 32832237
Deleted RU/BP patch: 33155330
Deleted RU/BP patch: 33575656
Deleted RU/BP patch: 34110685
Deleted RU/BP patch: 34468114
OPatch succeeded.
wiki/how_to_cleanup_old_updates.1704473167.txt.gz · Last modified: by wagner.jer

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki