The Oracle (tm) Users' Co-Operative FAQ

How do I make a log file switch occur at regular intervals?


 

Author's name: Allan W. Tham

Author's Email: allanwtham@hotmail.com

Date written: Nov 13 2001

Oracle version(s): 8.1.7.0.0

Log file will only switch after it's full. How do I make a log file switch occur at regular intervals?

Back to index of questions


You can write a cron job to issue 'alter system switch logfile' at a regular interval. There are only three conditions where log switch takes place.

1. redo log is filled up
2. alter system switch logfile
3. alter system archivelog current

Note that you the two parameters LOG_CHECKPOINT_INTERVAL and LOG_CHECKPOINT_TIMEOUT only ensure the intervals where the checkpoint will occur. It will not ensure the redo log switch. In other words, redo log switch causes checkpoint yet checkpoint doesn't cause a redo log switch.

(Editor's note - someone may like to volunteer a few notes on how to use dbms_job)


Further reading: Metalink 1020043.102 (LOG_CHECKPOINT_INTERVAL and LOG_CHECKPOINT_TIMEOUT Parameters Definition Changed)


Back to top

Back to index of questions