I have an Oracle database on a VMWare image that seems to be slowly eating all my available disk space. I would like to know if there is a command or script that would perform some kind of clean up of temporary or log data? This is a development image so data loss isn't a big deal, but available space is huge!
2 Answers
To get you started, check:
- the archivelog destination directory (consider switching to
noarchivelog
if PITR is not required) - whether the datafiles/tempfiles in your tablespaces have
autoextend
enabled and an unlimited maximum size. $ORACLE_HOME/network/log
for the listener log- the various
_dump_dest
directories for tracefiles and the alert log
-
-
1This link was helpful when setting up noarchivelog: myadmin.wordpress.com/2007/02/25/… Aug 17, 2011 at 16:19
-
1@Mondain: doesn't it just list the same steps in the Oracle Docs I linked to? (minus the "Back up the database" step!) Aug 17, 2011 at 16:23
-
Also check
$ORACLE_HOME/network/log
for the listener log, and the various_dump_dest
directories for tracefiles - these can get very big, very quickly.– GaiusAug 18, 2011 at 22:07 -
@Gaius thanks, answer updated. The alert log can also get very big, but that usually happens slowly :) Aug 18, 2011 at 22:22
I agree that the archive logs can be deleted when they are beyond a set period of time. Doing this solved a similar space issue for a database I maintain. However some thought about the "why" would be a good idea. If this is a development database and it is not performing the same way as production then you have an issue with your application stack.
1) Is production performing the same way but you have lots of disk space so you don't care? Or is this only on the development VM image? Just cleaning up log files solves the problem but not the root issue.
2) I have not noticed any differences for Oracle databases that have been virtualized.
3) Check the size of the .dbf files. Do they represent a significant portion of the space used? If so, then you may need to increase the VM disk size.
-
This is a dev vm image and I don't have access to prod. I'm part of a independent contract team. You've got good points but I also cannot increase the disk size. Aug 17, 2011 at 16:44