Experience: is what you get soon after you need it.

Experience: is what you get soon after you need it.

****************Got the opportunity to pen a Book on Database Cloud Services.......More details to follow.***************

Title : Database Cloud Revealed
Publisher : Apress
Release Date : Jan-2021


My Cloud Certifications:

AWS Certified Solutions Architect Associate

Azure Certified Architect Expert

Azure Certified Architect

Azure Certified Administrator

Oracle Cloud Infrastructure 2018 Certified Architect Associate.

Oracle Cloud Infrastructure Classic 2018 Certified Architect Associate.

Oracle Database Cloud Administrator Certified Professional.

Oracle Database Cloud Service Operations Certified Associate.

Search This Blog

Tuesday, November 1, 2011

Cleanup patch_storage directories / reclaim space from oracle install directories

Today we had a space constraint issue on one of our database servers.

As usual cleaned up un necessary trace files and did some house keeping stuff.

and realized my oracle binaries disk is keep growing as we go. So on further looking found the the patch_storage directory is taking almost 5 gig and The same server houses three different databases in three different homes. which boils down 4 g each since we apply patches to all the oracle homes without discriminating others. Don't jump to the conclusion why the heck we are using three different homes for three different database and for multiple reasons we have answers for that so lets ignore that fact for a moment and lets continue.

myunixhost(MYDBNAME) /icm01/u0002/stage/OPatch/OPatch
>cd $ORACLE_HOME/.patch_storage
du -h .
4.5G .

And as per support doc

How To Avoid Disk Full Issues Because OPatch Backups Take Big Amount Of Disk Space. [ID 550522.1]
It clearly explains how to cleanup these backup directories.

>/icm01/u0002/stage/OPatch/OPatch/opatch util -help
Invoking OPatch

/icm01/u0002/stage/OPatch/OPatch/opatch util cleanup
Invoking OPatch

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

UTIL session

Oracle Home : /icm01/u0001/app/oracle/product/11.2.0/dbhome_mydbname
Central Inventory : /icm01/u0001/oraInventory
from : /var/opt/oracle/oraInst.loc
OPatch version :
OUI version :
Log file location : /icm01/u0001/app/oracle/product/11.2.0/dbhome_mydbname/cfgtoollogs/opatch/opatch2011-11-01_10-49-32AM.log

Invoking utility "cleanup"
OPatch will clean up 'restore.sh,make.txt' files and 'rac,scratch,backup' directories.
You will be still able to rollback patches after this cleanup.
Do you want to proceed? [y|n]

Size of directory "/icm01/u0001/11.2.0/grid/.patch_storage" before cleanup is 4599166008 bytes.
Size of directory "/icm01/u0001/11.2.0/grid/.patch_storage" after cleanup is 2795551876 bytes.

UtilSession: Backup area for restore has been cleaned up. For a complete list of files/directories
deleted, Please refer log file.

OPatch succeeded.


du -h .
244M .