Wednesday, June 17, 2009

Cleaning An 11i Apps Instance Of Redundant Files

The following are the locations and files that can be considered for deletion:

1. In the $HOME/patch(es) directory, you can delete any zipped files that have been unzipped or any patches that have been applied.
2. In the bin directory of any $PRODUCT_TOP, you may see executable files that have been replaced by patches or a relink of theprogram. You can delete any of the executables that have a .number. a .bak, or a .sav after them. For example in $FND_TOP/bin, you may see:
FNDLIBR
FNDLIBR.bak
FNDLIBR.sav
FNDLIBR.1253
FNDLIBR.41248
FNDLIBR.7978

In this case you can delete the
following:

FNDLIBR.bak
FNDLIBR.sav
FNDLIBR.1253
FNDLIBR.41248
FNDLIBR.7978

If you do delete the current program file by mistake, youcan regenerate it by using adrelink or adadmin.

3. If you have been applying patches, in the $APPL_TOP/admin/<>/log directory, you will find files that end in .req, html, or .lst. If you are not applying patches or running adadmin, you can delete all of these files. Additionally in that same directory, you will find all of the log files for the patches that have been applied. You can delete those that were from patches that have been applied successfully. You can also truncate any adwork< # >.log or adadmin.log files you find. These files can get very large and it is not necessary to keep the data in them for very long.

4. In the $APPL_TOP/admin/<>/out directory, you may see many files. They may end in .out, .mk, .log, .lst. If the files are olderthan 2 weeks old, it wil be safe to delete them. There may also be files in this directory that end in a .number. These can be deleted at the end of two weeks as well.

5. In the $COMMON_TOP/admin/log, $COMMON_TOP/admin/out and the $COMMON_TOP/temp directories there may be files that you can delete. $COMMON_TOP = (/region/oracle/<>/<>comn) You may also find files in any $PROD_TOP/log or $PROD_TOP/out directory.

In the $COMMON_TOP/admin/log directory you can delete the files like Apache<>.txt, these files just contains informational messages.

6.In the 8i $ORACLE_HOME/dbs directory check the init<>.ora, this will list the location of three directories: udump, cdump, and bdump. In the udump directory, you will find any database traces that have been generated. If you do not need these trace files, you can delete them. In the cdump directory, you will find any core dumps that have occurred in the database. You candelete these if you do not need them. In the bdump, you may find trace files generated by the database startup and shutdown. You will also find the alert_<>.log. You can delete the trace files and truncate the alert_<>.log if necessary.

7.In your application $ORACLE_HOME directory, (usually), /region/oracle/<>/<>ora/8.0.6), there may be old files from anyOracle Developer upgrades. If you look in the $ORACLE_HOME/lib directory, you may find files that look like this:

libocl60.a
libocl60.a.PRE_P3
libocl60.a.PRE_P5
libocl60.a.PRE_P7

NOTE:
-------
The files that end in .PRE_P* can be deleted. However you have to be very careful to only delete those files that end in .PRE_P*. If youdelete any files without this suffix, you will corrupt your instance and may require a restore to make it work.

There are many other locations in the 8.0.6 $ORACLE_HOME that have these .PRE_P*files. If you run this command: find . ?name.PRE_P* , you will fin all of these types of files. You can then delete them all.
-------

8. Depending on when an instance core dumps, you may find core files in places other than the cdump directory. After the reason for the core dump has been addressed, you may delete these as well. If you go to your $ORACLE_BASE directory , (usually /<>/oracle/<>), and use the command find .?name core*, you will find any core files in the instance.

9.In the application, you should run "Purge Concurrent Request and/or Manager Data" concurrent program as sysadmin to cleanup oldconcurrent request and concurrent manager logfiles, output files and associated concurrent request/manager database records.

10.In pre-11i versions, files that are replaced by patches are copied as a backup before they are replaced. The old files (eg.pre-patch files) are named <>.<>O with an uppercase letter "O" at the end of the filename;(eg.POXCOC3B.plsO is the pre-patch version of POXCOC3B.pls). Some timeafter patches have been applied and the instance is stable, these oldversions of the Apps files can be removed.

11. In $AU_TOP/java and $JAVA_TOP, you may find files with the name apps.bak. If these are over 2 weeks old, it will be safe to remove them as well.
By maintaining your instance using the above suggestions, your instance will run faster and it will not shutdown due to a lack ofspace.

12)If logs are not required then remove the files from $ORACLE_HOME/network/log

No comments: