RMAN – Managing Archivelogs

Posted by admin on Apr 8, 2009 in Archivelog Mode - 10g, Oracle, RMAN |

RMAN archivelog management
List archivelog all;

Delete a specific archivelog:
RMAN> delete archivelog logseq=22;

using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=152 device type=DISK
List of Archived Log Copies for database with db_unique_name VISK4
=====================================================================

Key Thrd Seq S Low Time
——- —- ——- – ———
21 1 22 A 19-MAR-08
Name: +DATA/visk4/archivelog/2008_03_19/thread_1_seq_22.264.649776809

Do you really want to delete the above objects (enter YES or NO)? YES
deleted archived log
archived log file name=+DATA/visk4/archivelog/2008_03_19/thread_1_seq_22.264.649776809 RECID=21 STAMP=649776849
Deleted 1 objects

To delete a range of archivelogs:
RMAN> delete archivelog from logseq=20 until logseq=21;

released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=152 device type=DISK
List of Archived Log Copies for database with db_unique_name VISK4
=====================================================================

Key Thrd Seq S Low Time
——- —- ——- – ———
20 1 21 A 19-MAR-08
Name: +DATA/visk4/archivelog/2008_03_19/thread_1_seq_21.293.649776759

Do you really want to delete the above objects (enter YES or NO)? YES
deleted archived log
archived log file name=+DATA/visk4/archivelog/2008_03_19/thread_1_seq_21.293.649776759 RECID=20 STAMP=649776805
Deleted 1 objects

To delete a range of archivelogs without being prompted:
RMAN> delete noprompt archivelog from logseq=22 until logseq=35;

released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=152 device type=DISK
List of Archived Log Copies for database with db_unique_name VISK4
=====================================================================

Key Thrd Seq S Low Time
——- —- ——- – ———
22 1 23 A 19-MAR-08
Name: +DATA/visk4/archivelog/2008_03_19/thread_1_seq_23.292.649776857

23 1 24 A 19-MAR-08
Name: +DATA/visk4/archivelog/2008_03_19/thread_1_seq_24.291.649776903

24 1 25 A 19-MAR-08
Name: +DATA/visk4/archivelog/2008_03_19/thread_1_seq_25.290.649776949


To delete all the archivelogs;
Delete archivelog all;

RMAN archivelog management
List archivelog all;

Delete a specific archivelog:
RMAN> delete archivelog logseq=22;

using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=152 device type=DISK
List of Archived Log Copies for database with db_unique_name VISK4
=====================================================================

Key Thrd Seq S Low Time
——- —- ——- – ———
21 1 22 A 19-MAR-08
Name: +DATA/visk4/archivelog/2008_03_19/thread_1_seq_22.264.649776809

Do you really want to delete the above objects (enter YES or NO)? YES
deleted archived log
archived log file name=+DATA/visk4/archivelog/2008_03_19/thread_1_seq_22.264.649776809 RECID=21 STAMP=649776849
Deleted 1 objects

To delete a range of archivelogs:
RMAN> delete archivelog from logseq=20 until logseq=21;

released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=152 device type=DISK
List of Archived Log Copies for database with db_unique_name VISK4
=====================================================================

Key Thrd Seq S Low Time
——- —- ——- – ———
20 1 21 A 19-MAR-08
Name: +DATA/visk4/archivelog/2008_03_19/thread_1_seq_21.293.649776759

Do you really want to delete the above objects (enter YES or NO)? YES
deleted archived log
archived log file name=+DATA/visk4/archivelog/2008_03_19/thread_1_seq_21.293.649776759 RECID=20 STAMP=649776805
Deleted 1 objects

To delete a range of archivelogs without being prompted:
RMAN> delete noprompt archivelog from logseq=22 until logseq=35;

released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=152 device type=DISK
List of Archived Log Copies for database with db_unique_name VISK4
=====================================================================

Key Thrd Seq S Low Time
——- —- ——- – ———
22 1 23 A 19-MAR-08
Name: +DATA/visk4/archivelog/2008_03_19/thread_1_seq_23.292.649776857

23 1 24 A 19-MAR-08
Name: +DATA/visk4/archivelog/2008_03_19/thread_1_seq_24.291.649776903

24 1 25 A 19-MAR-08
Name: +DATA/visk4/archivelog/2008_03_19/thread_1_seq_25.290.649776949


To delete all the archivelogs;
Delete archivelog all;

Delete all the archivelogs without being prompted:
RMAN> delete noprompt archivelog all;

using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=115 device type=DISK
List of Archived Log Copies for database with db_unique_name VISK4
=====================================================================

To copy a single archivelog out of ASM:

RMAN> backup as copy archivelog from logseq=78 until logseq=78 format ‘/tmp/%t%r%s%p’;

Starting backup at 21-MAR-08
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=124 device type=DISK
channel ORA_DISK_1: starting archived log copy
input archived log thread=1 sequence=78 RECID=77 STAMP=649959634
output file name=/tmp/649960068%r211 RECID=78 STAMP=649960076
channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:15
Finished backup at 21-MAR-08

Comments are closed.

Copyright © 2010 Edward’s Blurg All rights reserved. Theme by Laptop Geek.