Solved

Oracle 11g: archive logs management

Posted on 2013-05-27
4
773 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
  • 2
4 Comments
 
LVL 12

Accepted Solution

by:
praveencpk 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 76

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
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.
This video shows how to recover a database from a user managed backup

786 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