Unanswered: Archivelog - novice question - limiting number of archived log files
I'm running oracle 9i database on Sun cluster in archivelog mode.
My question is how can I limit number of archived log files created?
Can I simply delete oldest archived log files when they start to eat disk
space? Or can database itself manage that?
You can not limit the number of archive-logs created by the instance.
Archivelogs are copies of 'old' redo-log files. So you can change size of archivelogs by altering the redo-logs.
Archivelogs are required for recovery-scenarios. If you don't care of recovery, just delete them (or turn them off).
The database itself doesn't delete archivelogs, but the backup/recovery-tool RMAN can do a backup of these and delete them afterwards.
Please hav a look at the documentation about backup/recovery, general database administration and tuning issues (and maybe a lot more).
There is a really cool book by O'reilly called Oracle Scripts. The book contains a cd with many useful management scipts. A set of backup scripts is included. These backup scripts will run a hot backup of your database, (which is what you want to run in archivelog mode), and copies you used archive logs to a backup directory. I found these scripts to be very easy to configure as well. RMAN is also a useful tool to manage backups but does take a bit more configuration. If you do not have the infrastructure in place to run RMAN these scripts are a great option.
1. You can control the number of redo log exntries/archived logs for certain operation only. Not all DML & DDL could be stoped of doing that: NOLOGGING
2. Yes, you can do that and you should do that before the system halts because the archived log destination is already full. But remember that you still need them untill the next successful valid cold/hot backup. So don't delete them, but archive them either on tape or another disk partition.