Amazon books

Saturday, September 4, 2010

How to cleanup .patch_storage directory

If you are experiencing space problems and found that your ORACLE_HOME have a .patch_storage directory that is too big here is a solution.

As you cannot delete this directory because it contains patches that maybe you need to rollback, Oracle provides a method to delete just unnecessary files by using Opatch utility (higher than 10.2.0.x).

This is very simple:

Example:

Size before running Opatch command:
[hostxxxx]/dbname/products/rdbms/.patch_storage> du -sg
2.45 .


--Running Opatch command:
[hostxxxx] opatch util cleanup
Invoking OPatch 10.2.0.4.3

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

UTIL session

Oracle Home : /dbxxx/products/rdbms
Central Inventory : /opt/oracle/oraInventory
from : /etc/oraInst.loc
OPatch version : 10.2.0.4.3
OUI version : 10.2.0.4.0
OUI location : /dbxxx/products/rdbms/oui
Log file location : /dbxxx/products/rdbms/cfgtoollogs/opatch/opatch2010-09-04_1 3-56-38PM.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]
Could not recognize input. Please re-enter.
y
User Responded with: Y
Size of directory "/dbxxx/products/rdbms/.patch_storage" before cleanup is 2618766807 bytes.
Size of directory "/dbxxx/products/rdbms/.patch_storage" after cleanup is 159049176 bytes.

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

OPatch succeeded.

--Size after clean up
[hostxxxx]/dbxxx/products/rdbms/.patch_storage> du -sg
0.15 .


Best Regards,
Paulo Portugal

No comments:

Post a Comment