Day by day, alert log size will grow in Oracle database. So for housekeeping, we need to move the existing alert log to a backup location and compress there. Upon moving the alert log, the database will create a fresh alert log automatically.

  1. Below is the shell script.

WE need to define the ORACLE_HOME in the script. and ORACLE_SID will be passed as an argument while running the script.

2. Configure in crontab:

SCHEDULE – Weekly once

Here, we have passed the ORACLE_SID (PRODDB) as argument