Solved

Oracle 11g: archive logs management

Posted on 2013-05-27
4
788 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 450 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 50 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows how to recover a database from a user managed backup

738 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