Oracle Database
--
Questions
--
Followers
Top Experts
My archive logs, when they occupied the whole space allocated, are making my db hanging again and again.
Questions: what are the best practices for managing archive logs, so they won't hang/halt the database?
thanks.
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
or
RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
Delete obsolete files
RMAN> DELETE OBSOLETE ;
but during this period wht should one do:
a scenerio:
online full on every wednesday: 7 am
online cumulative everyday: 7 am except wednesday
logsbkup: everyday at 1:30 pm
but if after 1:30 archive logs got full, then only wht should be the best practice....command or script
because the next archive log cleanup is next day at 1:30 everythng is schedule and automated, this is all Unix with tivoli scheduling tool
And the big question to ask before you even plan a strategy - what is the recovery requirements for your Application ?
There is no one best practice. Everybody has their own best practice based on their business requirements. You can plan a strategy that will cover every situation or you can plan a simple strategy that will suffice the minimum need. But here is a raw outline of what you may want to do.
So your database is backed up 3 days a week. And you are required to keep a week worth of backups. Then you need to keep archives dated/timed same as your oldest backup on disk. That would be 8 days worth. So your disk should be planned out to keep archives for atleast 8 days.
And then how to maintain them - In UNIX, you can write a shell script and schedule it in cron that deletes archives older than 8 days. Same thing with Windows, schedule a bat scrip that keeps your archives clean.
Alternatively, if you have a huge backup mount point, you can move archive logs every 1 hr or so to this backup mount points. Clean them after 8 days.

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
we are dong backups on a regular basis, and everythng is cool,
but only some time this happened that application start loading some data or somthng happend which filled up my whole archivlog destination, before the next cleanup which is next day at 1:30 pm, and due to this the db hanged.
can't even connect as sysdba...
I have scripts which cleaned up my archive logs, but they halted too, and nothing is happening.
In this situation what are best possible options and practices, keep in mind that can't even login as sysdba...!






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
as soon as this happen it'll send an email and also execute the cleanup job for archive logs
RMAN> backup archivelog all skip inaccessible delete input;
so u want me to move the archive log from there loc to some temp place, using mv command
and then db should be normal again,
and then wht ?
can it be possible u put a plan and step it out one after the another
thanks

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
1) Create an RMAN script to backup the logs + controlfile only (kinda llike this):
# Backup Archived Logs
SQL "ALTER SYSTEM ARCHIVE LOG CURRENT";
BACKUP
  FORMAT "${backupdir}/${sid}_${INC
  ARCHIVELOG ALL
  DELETE INPUT;
RELEASE CHANNEL ch01;
# Control file backup
BACKUP
  FORMAT "${backupdir}/${sid}_${INC
  CURRENT CONTROLFILE;
RELEASE CHANNEL ch00;
}
exit
2) Schedule in crontab (or task manager) the script to execute every hour:
# crontab every 15min example:
00,15,30,45 01-20 * * * /oracle/util/db_rman_backu
RMAN> backup archivelog all skip inaccessible delete input;






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
2. Try to schedule a task to ftp the files in binary mode on another computer
Today the tape devices are not seen as reliable option (what will happen if the tape is out or full, or
the device only simulates recording???).
Still waiting for your script, which checks the filesystem for space utilization.
can you pls assist, thanks
Oracle Database
--
Questions
--
Followers
Top Experts
Oracle is an object-relational database management system. It supports a large number of languages and application development frameworks. Its primary languages are SQL, PL/SQL and Java, but it also includes support for C and C++. Oracle also has its own enterprise modules and application server software.