How to Force Oracle RMAN to Delete All Archive log files

advertisements

_____________________________________________________________________________________________________________________

The Eucharistic Miracles of the World
As a DBA, in many situations you get archive destination going to be filled or filled with archivelogs. Immedidately you are force to remove some or all archives. Here are the commands to remove the archivelogs.
Note: If you remove archivelogs with out backing up it is better to take a fresh level 0 backup of the database to avoid the data lose.

Commands:

RMAN> delete archivelog all;

released channel: ORA_DISK_1
released channel: ORA_DISK_2
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=396 instance=PROD41 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=464 instance=PROD41 device type=DISK
RMAN-08138: WARNING: archived log not deleted - must create more backups
archived log file name=+RECO/PROD4/archivelog/2011_12_03/thread_1_seq_1720.4904.768890065 thread=1 sequence=1720

Normally you get warning message if you try to delete the archive log files which are not backed up. In that case you have to FORCE keyword to delete the archive logs.


RMAN> delete force archivelog all;

released channel: ORA_DISK_1
released channel: ORA_DISK_2
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=396 instance=PROD41 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=464 instance=PROD41 device type=DISK
List of Archived Log Copies for database with db_unique_name PROD4

Suppose if you wanted to remove the archive logs using some pattern you can use the below mentioned command.

RMAN> delete  force  archivelog like '+RECO/prod4/archivelog/2011_10_03/*17*';

_____________________________________________________________________________________________________________________

A visitor from Sao paulo viewed 'How to Find / Retrieve / Get ACL details in Oracle' 2 hrs 52 mins ago
A visitor from New york viewed 'How to Check When was the Table Insert, Update, De' 3 hrs 8 mins ago
A visitor from Victoria viewed 'Oracle Imp show=y & Indexfile: How to generate sql' 3 hrs 36 mins ago
A visitor from Toronto viewed 'Troubleshoot Fix Resolve Ora-00020: Maximum Number' 3 hrs 50 mins ago
A visitor from Atlanta viewed 'How to Check What is Getting / Being Audited in Or' 3 hrs 51 mins ago

0 comments:

Post a Comment

Labels

Oracle (629) Script (86) General (77) Unix (47) Blog (23) Technology (19) gadget (6) games (6) Business (3) OCI (3) SQL* Loader (3) Datapump (2)
 

acehints.com Copyright 2011-25 All Rights Reserved | Site Map | Contact | Disclaimer