Log rotation setup for Oracle log files

Oracle logs grow without limit and need rotation to be set. The main goal is to keep online only a subset of logs that is useful for troubleshooting. Some historical logs can also be retained for a few months.

A script based on Linux logrotate demon is proposed. This script is installed by copying it into the /etc/logrotate.d directory (for example in /etc/logrotate.d/ora_cern_listener_udump_bdump_adump_rotate)

The logrot_ora_install script is in the ~/scripts directory in pdb-backup (that should be copied to a node before installing it).

You should run the following commands in each local node.

Usage example (2 steps):
1. cd $HOME/scripts
2- ./logrot_ora_install $DB_NAME $INST_NUM >ora_cern_listener_udump_bdump_adump_rotate
3- sudo mv ora_cern_listener_udump_bdump_adump_rotate /etc/logrotate.d

  Example: ./logrot_ora_install cmsr 3 >ora_cern_listener_udump_bdump_adump_rotate
            sudo mv ora_cern_listener_udump_bdump_adump_rotate /etc/logrotate.d



This topic: PSSGroup > PhysicsDatabasesSection > DbaArea > Logrotation
Topic revision: r12 - 2007-03-16 - LucaCanali
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback