?
Solved

Oracle 11g: archive logs management

Posted on 2013-05-27
4
Medium Priority
?
809 Views
Last Modified: 2013-06-06
What is the best practice for archive logs management?
Partition for archive logs is getting filled up and it's well known that database stops when partition is full.

Is there a log rotation similar to mechanism presented in Linux?
Aren't archive logs deleted automatically after backup?
0
Comment
Question by:marianhe
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 12

Accepted Solution

by:
Praveen Kumar Chandrashekatr earned 1350 total points
ID: 39198618
You can configure in rman for auto deletion or archivelog i.e

rman>CONFIGURE ARCHIVELOG DELETION POLICY TO applied on standby;

or

you can use delete archivelog command in your backup scripts.

rman>RUN
{
  # manually allocate a channel, in order to specify that the backup run by this
  # channel should go to both pools "first_copy" and "second_copy"
  ALLOCATE CHANNEL c1 DEVICE TYPE sbt
      PARMS='ENV=(NSR_DATA_VOLUME_POOL=second_copy)';
  ALLOCATE CHANNEL c2 DEVICE TYPE sbt
      PARMS='ENV=(NSR_DATA_VOLUME_POOL=first_copy)';
  BACKUP CHANNEL C1 ARCHIVELOG UNTIL TIME 'SYSDATE'
    NOT BACKED UP 2 TIMES # back up only logs without 2 backups on tape
    TAG SECOND_COPY;
  BACKUP CHANNEL C2 ARCHIVELOG UNTIL TIME 'SYSDATE'
    NOT BACKED UP 2 TIMES # back up only logs without 2 backups on tape
    TAG FIRST_COPY;
}

# now delete from disk all logs that have been backed up to tape at least twice
DELETE ARCHIVELOG ALL
  BACKED UP 2 TIMES TO DEVICE TYPE sbt;

check these doc for refferences.

http://www.di.unipi.it/~ghelli/didattica/bdldoc/B19306_01/backup.102/b14191/rcmbackp009.htm

http://www.dbasupport.com/forums/showthread.php?61244-rman-CONFIGURE-ARCHIVELOG-DELETION
0
 
LVL 77

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 150 total points
ID: 39201080
>>Aren't archive logs deleted automatically after backup?

As mentioned above:  No.  Not unless you tell the backups to delete them.

>>What is the best practice for archive logs management?

Personally, I keep as many of them around on disk as I can for as long as I can.  How long for you depends on your backup strategy and tape rotation.

IMHO, you want as many copies of your archived redo logs on as many tapes that you can afford.
0
 

Assisted Solution

by:marianhe
marianhe earned 0 total points
ID: 39213127
I've managed to set up archive logs management using Enterprise Manager console.
0
 

Author Closing Comment

by:marianhe
ID: 39224977
Enterprise Manager console is solution for those who prefer GUI to CLI.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
Via a live example, show how to take different types of Oracle backups using RMAN.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question