Archive log backupset deletion
Hi all,
DB version is 10.2.0.4 Have recently changed the retention policy from backup from 2 to 1. After changing the redundancy to 1 Datafile backup sets are getting deleted after backup and all archivelog backupsets remain in the backup location. How do i delete those archivelog backupsets during backup.
thanks,
baskar.l
baskar.l wrote:
Hi all,
DB version is 10.2.0.4 Have recently changed the retention policy from backup from 2 to 1. After changing the redundancy to 1 Datafile backup sets are getting deleted after backup and all archivelog backupsets remain in the backup location. How do i delete those archivelog backupsets during backup.
thanks,
baskar.lSince these are backups of archivelogs, their final determination of 'obsolete' has to be measured against the backupsets of the datafiles. Are you also taking regular backups of the datafiles?
for instance, you set retention policy to redundancy of 1. You take a full, Incremental 0 backup. Then you take an incremental level 1 backup. Then you take another incremental level 1 backup. Then you take a backup of your archivelogs. THen you take another backup of archive logs. And another. At this point, nothing is obsolete, because it is all still required to perform a recovery from that one and only full backup.
Similar Messages
-
Backup archive log with delete all input clause
Our database is 10.2.0.3 RAC db and database server is window 2003.
Our RMAN catalog db was down for a couple of weeks. During this two weeks period we use control file instead. But when I compare the log files before using control file and after going back to catalog db I found the following differences. I also pasted backup script below. It looks like that after we reuse the catalog db it is able to delete all archive logs as soon as it is backed up. The only change I can think of is one of the archive log destination is changed from F:\archive to G:\archive. This db has a physical standby db which is not up to date. Can you help me to figure out why this differences in the backup process since I am kind of worried if we bring the standby db up to date we will not be able to ship the archive log since they are deleted from the backup process. Thank you so much for your help. Shirley
10> resync catalog;
11> #change archivelog all crosscheck;
12> crosscheck archivelog all;
13>
14> #Backup Database and archive log files.
15> backup as compressed backupset
16> incremental level 0 format 'F:\backup\%d_LVL0_%T_%u_s%s_p%p' filesperset 5 tag 'INDRAC'
17> database plus archivelog format 'F:\backup\%d_LVL0_%T_%u_s%s_p%p'
18> filesperset 10 tag 'INDRAC'
19> delete all input;
Before using control file:
channel ORA_DISK_2: finished piece 1 at 24-MAY-08
piece handle=F:\BACKUP\PRODRAC_LVL0_20080524_04JH7588_S41988_P1 tag=INDRAC comment=NONE
channel ORA_DISK_2: backup set complete, elapsed time: 00:04:17
RMAN-08137: WARNING: archive log not deleted as it is still needed
archive log filename=F:\ARCHIVE\PRODRAC_004_04966_0575926036.ARC thread=4 sequence=4966
RMAN-08137: WARNING: archive log not deleted as it is still needed
archive log filename=E:\ARCHIVE\PRODRAC_004_04966_0575926036.ARC thread=4 sequence=4966
RMAN-08137: WARNING: archive log not deleted as it is still needed
archive log filename=F:\ARCHIVE\PRODRAC_004_04967_0575926036.ARC thread=4 sequence=4967
RMAN-08137: WARNING: archive log not deleted as it is still needed
archive log filename=E:\ARCHIVE\PRODRAC_004_04967_0575926036.ARC thread=4 sequence=4967
After went back to catalog:
channel ORA_DISK_2: backup set complete, elapsed time: 00:02:47
channel ORA_DISK_2: deleting archive log(s)
archive log filename=G:\ARCHIVE\PRODRAC_004_05760_0575926036.ARC recid=51689 stamp=660017344
archive log filename=E:\ARCHIVE\PRODRAC_004_05760_0575926036.ARC recid=51688 stamp=660017344
archive log filename=G:\ARCHIVE\PRODRAC_004_05761_0575926036.ARC recid=51697 stamp=660032069
archive log filename=E:\ARCHIVE\PRODRAC_004_05761_0575926036.ARC recid=51696 stamp=660032069
archive log filename=E:\ARCHIVE\PRODRAC_004_05762_0575926036.ARC recid=51704 stamp=660051690
archive log filename=G:\ARCHIVE\PRODRAC_004_05762_0575926036.ARC recid=51705 stamp=660051690
archive log filename=E:\ARCHIVE\PRODRAC_004_05763_0575926036.ARC recid=51710 stamp=660061718
archive log filename=G:\ARCHIVE\PRODRAC_004_05763_0575926036.ARC recid=51711 stamp=660061718
archive log filename=E:\ARCHIVE\PRODRAC_004_05764_0575926036.ARC recid=51716 stamp=660069980
archive log filename=G:\ARCHIVE\PRODRAC_004_05764_0575926036.ARC recid=51717 stamp=660069980
archive log filename=E:\ARCHIVE\PRODRAC_004_05765_0575926036.ARC recid=51720 stamp=660081117
archive log filename=G:\ARCHIVE\PRODRAC_004_05765_0575926036.ARC recid=51721 stamp=660081117
archive log filename=G:\ARCHIVE\PRODRAC_004_05766_0575926036.ARC recid=51723 stamp=660087215
archive log filename=E:\ARCHIVE\PRODRAC_004_05766_0575926036.ARC recid=51722 stamp=660087214
channel ORA_DISK_1: finished piece 1 at 14-JUL-08
piece handle=F:\BACKUP\PRODRAC_LVL0_20080714_1MJLG8GQ_S45110_P1 tag=INDRAC comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:04:43Shirley,
If there was no change to the E: then the logs should have been kept (RMAN-8137) unless they were possibly aged out of the controlfile (unlikely since it defaults to 65K) or have been applied already. (The F: logs would have been marked as EXPIRED at the next crosscheck). Check to see which are EXPIRED:
RMAN> list expired archivelog all;
To see the earliest log:
select sequence# from v$log_history where rownum <2;
Have you checked the V$MANAGED_STANDBY to insure they were not already applied? Given that your latest rman log shows logs being deleted with no RMAN-8137 raised would indicate that they are not needed for the standby. -
RMAN-08120: WARNING: archived log not deleted, not yet applied by standby
i get RMAN-08120: WARNING: archived log not deleted, not yet applied by standby on primary
but when i run below query i get the same result from primary and standby
SQL> select max(sequence#) from v$archived_log;
MAX(SEQUENCE#)
44051
SQL>
standby is one log switch behind only!i get RMAN-08120: WARNING: archived log not deleted, not yet applied by standby on primary You already have answer by post of Mseberg.
but when i run below query i get the same result from primary and standby
SQL> select max(sequence#) from v$archived_log;
MAX(SEQUENCE#)
44051
SQL>
standby is one log switch behind only!this is wrong query used on primary & standby. even if any one of archive gap available lets suppose sequence *44020* , this archive not transported to standby due to some network problem and so on. later if archives from *44021* all the archives transported on standby upto *44051* , then it shows the maximum sequence transferred to standby, It wont shows applied sequence.
Check the below queries.
Primary:-
SQL> select thread#,max(sequence#) from v$archived_log group by thread#;
Standby:-
SQL> select thread#,max(sequence#) from v$archived_log where applied='YES' group by thread#;
HTH. -
WARNING: archive log not deleted as it is still needed
Our Oralce Database is a single node database of version 10.1.0.
Dataguard/Standby is not configured.....we are executing the following command for archivelog backup
run
allocate channel c1 device type sbt;
backup archivelog all delete input;
This script is successfull in backingup all the archvied log files however it is not deleteing the input files. Instead it gives the warning....
"WARNING: archive log not deleted as it is still needed"
What could be the problem?If you do a Metalink seach on "WARNING: archive log not deleted as it is still needed." you'll find a couple of documents that explain the issue.
The short answer is that RMAN has backed up logs which have not yet shipped to standby, so it won't delete them, cause they're still needed till they're successfully shipped to standby.
-Mark -
Current archive log got deleted, how to recover using previous archive log?
Hi
My current log sequence #819 and it is got deleted and no choice to get it back and I have previous archived logs with sequences #814 to 818.
When I starting my database it is showing that use 'MUST USE RESETLOGS OR NORESETLOGS option for database open then I used the command
SQL> ALTER DATABASE OPEN RESETLOGS;
ALTER DATABASE OPEN RESETLOGS
ERROR at line 1:
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: 'E:\APP\ADMINISTRATOR\ORADATA\ORCL\SYSTEM01.DBF'
SQL> alter database recover;
alter database recover
ERROR at line 1:
ORA-00283: recovery session canceled due to errors
ORA-01610: recovery using the BACKUP CONTROLFILE option must be done
SQL> alter database recover using backup controlfile;
alter database recover using backup controlfile
ERROR at line 1:
ORA-00279: change 8433746 generated at 01/15/2013 19:51:59 needed for thread 1
ORA-00289: suggestion :
E:\APP\ADMINISTRATOR\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2013_01_16\O1_MF_1_819_
%U_.ARC
ORA-00280: change 8433746 for thread 1 is in sequence #819
now I don't have the archive log with sequence 819, I have recover from 818. please tell me how to do it?You probably should post to the correct forum too: Recovery Manager (RMAN)
cheers -
RMAN-08137: WARNING: archived log not deleted as it is still needed
I am trying to delete archive logs older than 7 days in streams environment.
1) we dont have a standby database
2) checkpoint_retention_time = 7
Please help me with this.
Regards,
MikeSQL> set serveroutput on
DECLARE
hScn number := 0;
lScn number := 0;
sScn number;
ascn number;
alog varchar2(1000);
begin
select min(start_scn), min(applied_scn) into sScn, ascn
from dba_capture;
DBMS_OUTPUT.ENABLE(2000);
for cr in (select distinct(a.ckpt_scn)
from system.logmnr_restart_ckpt$ a
where a.ckpt_scn <= ascn and a.valid = 1
and exists (select * from system.logmnr_log$ l
where a.ckpt_scn between l.first_change# and l.next_change#)
order by a.ckpt_scn desc)
loop
if (hScn = 0) then
hScn := cr.ckpt_scn;
else
lScn := cr.ckpt_scn;
exit;
end if;
end loop;
if lScn = 0 then
lScn := sScn;
end if;
dbms_output.put_line('Capture will restart from SCN ' || lScn ||' in the following file:');
for cr in (select name, first_time
from DBA_REGISTERED_ARCHIVED_LOG
where lScn between first_scn and next_scn order by thread#)
loop
dbms_output.put_line(cr.name||' ('||cr.first_time||')');
end loop;
end;
After i ran the above script from metalink i got the below output.
When I have run the above code that is given in metalink to check the minimum archive logs required to restart streams i got the below ouput.
Capture will restart from SCN 55313283790in the following file:
+FLASH/ORCL/archivelog/2011_02_22/thread_1_seq_842.346.443519740 (11-MAR-11)*
+FLASH/ORCL/archivelog/2011_02_22/thread_2_seq_832.189.440690538 (11-MAR-11)*
Does this mean that I will not be able to delete the archive logs from 11-mar-11 ?
Regards,
Mike -
Keep archived logs but deleting backup of db
Hey
I'm running a backup script every night that issues a "backup database plus archivelog" and saves the backup to disk. Due to disk space limitations I have to delete the obsolete backup taken the night before. However the "delete obsolete" also deletes the archived logs on disk. Is there a way to delete the obsolete backup but still keep the logs on disk?
Tried the "delete backup of database completed before 'sysdate-1' but I cant seem to get passed the promting for deletion - it has to run automatically.
Thanks for any advice..Why don't you work with retention and than you delete the obsolete?
delete backup of database will remove the full backup of the database (datafiles, archivelog, spfile). You can create a script to delete the backup of a given list of datafiles.
RMAN> report obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 2
Report of obsolete backups and copies
Type Key Completion Time Filename/Handle
Archive Log 540 26-MAY-05 /db/ARON/fs1/archived_for_logminer/1_1.dbf
Archive Log 541 26-MAY-05 /db/ARON/fs1/archived_for_logminer/1_2.dbf
RMAN> configure retention policy to redundancy 1;
old RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
new RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete
RMAN> report obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
Report of obsolete backups and copies
Type Key Completion Time Filename/Handle
Backup Set 3125 22-JUL-05
Backup Piece 3127 22-JUL-05 /db/ARON/BACKUP/RMAN/backup_ARON_564316052_208_1_6ggq5hsk_1_1.bck
Backup Set 3126 22-JUL-05
Backup Piece 3128 22-JUL-05 /db/ARON/BACKUP/RMAN/backup_ARON_564316052_207_1_6fgq5hsk_1_1.bck
Backup Set 3139 22-JUL-05
Backup Piece 3140 22-JUL-05 /db/ARON/BACKUP/RMAN/backup_ARON_564316097_209_1_6hgq5hu1_1_1.bck
Backup Set 3190 24-OCT-05
Backup Piece 3193 24-OCT-05 /db/ARON/BACKUP/RMAN/backup_ARON_572546170_212_1_6kh20n3q_1_1.bck
Backup Set 3191 24-OCT-05
Backup Piece 3194 24-OCT-05 /db/ARON/BACKUP/RMAN/backup_ARON_572546170_213_1_6lh20n3q_1_1.bck
Backup Set 3192 24-OCT-05
Backup Piece 3195 24-OCT-05 /db/ARON/BACKUP/RMAN/backup_ARON_572546180_214_1_6mh20n44_1_1.bck
Archive Log 540 26-MAY-05 /db/ARON/fs1/archived_for_logminer/1_1.dbf
Archive Log 541 26-MAY-05 /db/ARON/fs1/archived_for_logminer/1_2.dbfBye, Aron -
RMAN-08138: WARNING: archived log not deleted - must create more backups
I ran:
1. CROSSCHECK ARCHIVELOG ALL
2. DELETE EXPIRED ARCHIVELOG ALL
I am getting this error. I am trying to free my arciver after an ORA-00257 error.
Can anyone help me out?Basically this error means you are trying to delete archivelogs still needed for recovery (according to your retention policy). Develop a strategy which backs up the archivelogs in regular intervals, after a successful backup delete the archivelogs from disk, for example:
backup archivelog all delete all input;
Werner -
Recovery window retention policy deletes archive logs before a backup?
Hi All,
Oracle 11G on Windows 2008 R2
This afternoon, I changed my RMAN retention policy from 'RETENTION POLICY REDUNDANCY 3' to RETENTION POLICY RECOVERY WINDOW OF 3 DAYS'
However, i checked tonight and after my daily backup ran, all the archive logs prior to the backup had been deleted! Thus meaning i dont think i can restore to any point in time, prior to my daily backup. All the .arc logs were there after the backup. So i tried another test and kicked off the daily backup again. During the backup process, the archive logs got deleted again! Now i don't have any archive logs..
Is this proper behaviour of RETENTION POLICY RECOVERY WINDOW?? I thought it would keep all the files needed for me to restore to any point in time for the previous 3 days. When i used REDUNDANCY, with my daily backups, it kept 3 days worth of backups+ archive logs so i could restore point-in-time to any point. How can i use RECOVERY WINDOW so that i can actually restore to any point-in-time for the 3 days??
I wanted to change to RECOVERY WINDOW since i read that by using REDUNDANCY it only keeps X copies of a backup (so if i ran the backup 3 times in a day, i would only have those 3).
Thanks in advance.Hi All,
Here is the SHOW ALL output:
RMAN> show all;
RMAN configuration parameters for database with db_unique_name MMSPRD7 are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 3 DAYS;
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOA
D TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'D:\ORACLE\DATABASE\ORA11G\DATABASE\SNCFM
MSPRD7.ORA'; # default
Here is the RMAN script:
Recovery Manager: Release 11.2.0.3.0 - Production on Mon Jan 20 23:03:12 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: XXX (DBID=)
RMAN> CROSSCHECK ARCHIVELOG ALL;
2> CROSSCHECK BACKUPSET;
3> CROSSCHECK BACKUP;
4> CROSSCHECK COPY;
5> DELETE NOPROMPT EXPIRED ARCHIVELOG ALL;
6> DELETE NOPROMPT EXPIRED BACKUPSET;
7> DELETE NOPROMPT OBSOLETE;
8> BACKUP CURRENT CONTROLFILE;
9> BACKUP AS COMPRESSED BACKUPSET DATABASE PLUS ARCHIVELOG DELETE INPUT;
Also, not sure if you needed the whole RMAN output, but here is the deletion part:
RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 3 days
using channel ORA_DISK_1
Deleting the following obsolete backups and copies:
Type Key Completion Time Filename/Handle
Backup Set 1392 15-JAN-14
Backup Piece 1392 15-JAN-14 F:\ORAFRA\MMSPRD7\BACKUPSET\2014_01_15\O1_MF_NNNDF_TAG20140115T190054_9FG89R8N_.BKP
Backup Set 1393 15-JAN-14
Backup Piece 1393 15-JAN-14 F:\ORAFRA\MMSPRD7\BACKUPSET\2014_01_15\O1_MF_ANNNN_TAG20140115T192204_9FG9KDHX_.BKP
Backup Set 1397 16-JAN-14
Backup Piece 1397 16-JAN-14 F:\ORAFRA\MMSPRD7\BACKUPSET\2014_01_16\O1_MF_ANNNN_TAG20140116T190027_9FJWNW6L_.BKP
Backup Set 1400 17-JAN-14
Backup Piece 1400 17-JAN-14 F:\ORAFRA\MMSPRD7\BACKUPSET\2014_01_17\O1_MF_ANNNN_TAG20140117T190138_9FMK349M_.BKP
deleted backup piece
backup piece handle=F:\ORAFRA\MMSPRD7\BACKUPSET\2014_01_15\O1_MF_NNNDF_TAG20140115T190054_9FG89R8N_.BKP RECID=1392 STAMP=836938856
deleted backup piece
backup piece handle=F:\ORAFRA\MMSPRD7\BACKUPSET\2014_01_15\O1_MF_ANNNN_TAG20140115T192204_9FG9KDHX_.BKP RECID=1393 STAMP=836940124
deleted backup piece
backup piece handle=F:\ORAFRA\MMSPRD7\BACKUPSET\2014_01_16\O1_MF_ANNNN_TAG20140116T190027_9FJWNW6L_.BKP RECID=1397 STAMP=837025228
deleted backup piece
backup piece handle=F:\ORAFRA\MMSPRD7\BACKUPSET\2014_01_17\O1_MF_ANNNN_TAG20140117T190138_9FMK349M_.BKP RECID=1400 STAMP=837111700
Deleted 4 objects -
Question about Archive Log Deletion policy
I've a problem to understand the Archive Log Deletion policy, and I I'd like to this problem explain with the following example.
Messages of the database are in German, but I guess you'll understand them.
SQL> startup
ORACLE-Instance hochgefahren.
Total System Global Area 5344731136 bytes
Fixed Size 2129240 bytes
Variable Size 2684355240 bytes
Database Buffers 2617245696 bytes
Redo Buffers 41000960 bytes
Datenbank mounted.
Datenbank geöffnet.
SQL> archive log list
Datenbank-Log-Modus Archive-Modus
Automatische Archivierung Aktiviert
Archivierungsziel E:\oracle\thetis_iv\arch
Älteste Online-Log-Sequenz 17917
Nächste zu archivierende Log-Sequenz 17919
Aktuelle Log-Sequenz 17919
SQL> alter system switch logfile;
System wurde geändert.I created a brand new archive log.
SQL> exit
Verbindung zu Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options beendet
D:\OracleDB\product\11.1.0\db_1\BIN>dir E:\oracle\thetis_iv\arch
Datenträger in Laufwerk E: ist Volume
Volumeseriennummer: 3EBD-77E5
Verzeichnis von E:\oracle\thetis_iv\arch
06.04.2011 15:04 <DIR> .
06.04.2011 15:04 <DIR> ..
06.04.2011 15:04 17.137.152 ARC17919_0721667907.001
1 Datei(en), 17.137.152 Bytes
2 Verzeichnis(se), 41.073.258.496 Bytes freiand this is the only archive log in the directory. Now I start rman:
D:\OracleDB\product\11.1.0\db_1\BIN>rman target / catalog rmanrepo@rmanrepo
Recovery Manager: Release 11.1.0.7.0 - Production on Mi Apr 6 15:05:35 2011
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Mit Ziel-Datenbank verbunden: ENTWIV (DBID=21045568)
Kennwort für Recovery-Katalog-Datenbank:
Verbindung mit Datenbank des Recovery-Katalogs
RMAN> show all;
RMAN-Konfigurationsparameter für Datenbank mit db_unique_name ENTWIV sind:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
CONFIGURE CONTROLFILE AUTOBACKUP OFF;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'E:\oracle\thetis_iv\backup\CF_%F_ENTWIV.ORA';
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # default
CONFIGURE DEVICE TYPE SBT_TAPE PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS 'ENV=(TPDO_OPTFILE=D:\Services\Tivoli\TSM\AgentOBA64\tpdo.opt)';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BZIP2'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 2 TIMES TO 'SBT_TAPE';
CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'D:\ORACLEDB\PRODUCT\11.1.0\DB_1\DATABASE\SNCFENTWIV.ORA'; # defaultThe archive log deletion policy says the the logfiles have to be backed up for two times before they get deleted.
Now I backup all archive logs, that havn't been backed up for at least two times.
RMAN> run { backup archivelog all not backed up 2 times
2> format '%d_AR_%Y%M%D_%s_%t'
3> tag 'ARCHIVE LOGS'
4> DELETE ALL INPUT;
5> }
Starten backup um 06.04.2011 15:08:01
Aktuelles Log archiviert
Zugewiesener Kanal: ORA_SBT_TAPE_1
Kanal ORA_SBT_TAPE_1: SID=253 Device-Typ=SBT_TAPE
Kanal ORA_SBT_TAPE_1: Data Protection for Oracle: version 5.5.1.0
Kanal ORA_SBT_TAPE_1: Backup Set für Archive Log wird begonnen
Kanal ORA_SBT_TAPE_1: Archive Logs in Backup Set werden angegeben
Eingabe-Archive-Log-Thread=1 Sequence=17919 RECID=147 STAMP=747759899
Eingabe-Archive-Log-Thread=1 Sequence=17920 RECID=148 STAMP=747760081
Kanal ORA_SBT_TAPE_1: Piece 1 wird auf 06.04.2011 15:08:02 begonnen
Kanal ORA_SBT_TAPE_1: Piece 1 auf 06.04.2011 15:08:09 beendet
Piece Handle=ENTWIV_AR_20110406_23_747760082 Tag=ARCHIVE LOGS Kommentar=API Version 2.0,MMS Version 5.5.1.0
Kanal ORA_SBT_TAPE_1: Backup Set vollstõndig, abgelaufene Zeit: 00:00:08
Kanal ORA_SBT_TAPE_1: Archive Logs werden gel÷scht
Archive Log-Dateiname=E:\ORACLE\THETIS_IV\ARCH\ARC17919_0721667907.001 RECID=147 STAMP=747759899
Archive Log-Dateiname=E:\ORACLE\THETIS_IV\ARCH\ARC17920_0721667907.001 RECID=148 STAMP=747760081
Beendet backup um 06.04.2011 15:08:10
RMAN> exit
Recovery Manager abgeschlossen.
D:\OracleDB\product\11.1.0\db_1\BIN> dir E:\oracle\thetis_iv\arch
Datenträger in Laufwerk E: ist Volume
Volumeseriennummer: 3EBD-77E5
Verzeichnis von E:\oracle\thetis_iv\arch
06.04.2011 15:08 <DIR> .
06.04.2011 15:08 <DIR> ..
0 Datei(en), 0 Bytes
2 Verzeichnis(se), 41.090.396.160 Bytes freirman deleted all archive logs, even I they are on tape only once by now.
Thats not what I expected. Where is my mistake?Hi,
I do new tests it's very strange.
BACKUP ARCHIVELOG command is not obeying the policy of archivelog.
You can open a SR on MOS. (to check bugs)
I reproduce the same test and the result was the same, it seems that this is a bug.
CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 2 TIMES TO DISK;
RMAN> backup archivelog all not backed up 2 times delete all input;
Starting backup at 06-APR-11
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=15 RECID=16 STAMP=747753711
input archived log thread=2 sequence=20 RECID=17 STAMP=747753714
input archived log thread=1 sequence=16 RECID=19 STAMP=747753729
input archived log thread=2 sequence=21 RECID=18 STAMP=747753729
channel ORA_DISK_1: starting piece 1 at 06-APR-11
channel ORA_DISK_1: finished piece 1 at 06-APR-11
piece handle=+DATA/orcl/backupset/2011_04_06/annnf0_tag20110406t132210_0.304.747753731 tag=TAG20110406T132210 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_1: deleting archived log(s)
archived log file name=+DATA/orcl/archivelog/2011_04_06/thread_1_seq_15.293.747753711 RECID=16 STAMP=747753711
archived log file name=+DATA/orcl/archivelog/2011_04_06/thread_2_seq_20.295.747753715 RECID=17 STAMP=747753714
archived log file name=+DATA/orcl/archivelog/2011_04_06/thread_1_seq_16.294.747753729 RECID=19 STAMP=747753729
archived log file name=+DATA/orcl/archivelog/2011_04_06/thread_2_seq_21.298.747753729 RECID=18 STAMP=747753729
Finished backup at 06-APR-11
RMAN> list archivelog all;
specification does not match any archived log in the repositoryOracle Docs Says:
The BACKUP ARCHIVELOG ... DELETE INPUT command deletes archived log files after they are backed up.
This command eliminates the separate step of manually deleting archived redo logs.
With DELETE INPUT, RMAN deletes only the specific copy of the archived log chosen for the backup set.
With DELETE ALL INPUT, RMAN deletes each backed-up archived redo log file from all log archiving destinations.
As explained in "Configuring an Archived Redo Log Deletion Policy",
the BACKUP ... DELETE INPUT and DELETE ARCHIVELOG commands obey the archived redo log deletion policy
for logs in all archiving locations. For example, if you specify that logs should only be deleted when backed
up at least twice to tape, then BACKUP ... DELETE honors this policy.http://download.oracle.com/docs/cd/E11882_01/backup.112/e10642/rcmbckba.htm#BRADV89524
But in ours case it's not honors this policy.
Only with the FORCE command should this happen. But it is not our case.
Oracle Docs:
If FORCE is not specified on the deletion commands,
then these deletion commands obey the archived log deletion policy.
If FORCE is specified, then the deletion commands ignore the archived log deletion policy.http://download.oracle.com/docs/cd/E11882_01/backup.112/e10643/rcmsynta010.htm#RCMRF113
Alternatively you can do the following:
Set the commands separately.
Check this:
RMAN> run {
2> backup archivelog all not backed up 2 times ;
3> delete archivelog all backed up 2 times to disk;
4> }
Starting backup at 06-APR-11
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=2 sequence=22 RECID=21 STAMP=747755128
input archived log thread=1 sequence=17 RECID=20 STAMP=747755127
channel ORA_DISK_1: starting piece 1 at 06-APR-11
channel ORA_DISK_1: finished piece 1 at 06-APR-11
piece handle=+DATA/orcl/backupset/2011_04_06/annnf0_tag20110406t134528_0.295.747755129 tag=TAG20110406T134528 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 06-APR-11
released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=78 instance=orcl1 device type=DISK
RMAN-08138: WARNING: archived log not deleted - must create more backups
archived log file name=+DATA/orcl/archivelog/2011_04_06/thread_1_seq_17.298.747755127 thread=1 sequence=17
RMAN-08138: WARNING: archived log not deleted - must create more backups
archived log file name=+DATA/orcl/archivelog/2011_04_06/thread_2_seq_22.294.747755129 thread=2 sequence=22
RMAN>Edited by: Levi Pereira on Apr 6, 2011 1:35 PM -
Unable to delete archive log.
Hi,
Our database server's archive log destination is full,but after running
backup archivelog all delete input;
it's taking archive log backup,but not deleting archivelogs.
Could you suggest me what is the reason.RMAN> backup archivelog all delete input;
Starting backup at 17-DEC-10
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=155 recid=422 stamp=737092752
input archive log thread=1 sequence=156 recid=425 stamp=737156432
input archive log thread=1 sequence=157 recid=428 stamp=737257293
input archive log thread=1 sequence=158 recid=431 stamp=737322402
input archive log thread=1 sequence=159 recid=434 stamp=737389991
input archive log thread=1 sequence=160 recid=437 stamp=737408597
input archive log thread=1 sequence=161 recid=440 stamp=737476660
input archive log thread=1 sequence=162 recid=443 stamp=737542384
input archive log thread=1 sequence=163 recid=446 stamp=737634615
input archive log thread=1 sequence=164 recid=449 stamp=737658567
input archive log thread=1 sequence=165 recid=452 stamp=737726432
input archive log thread=1 sequence=166 recid=455 stamp=737827094
input archive log thread=1 sequence=167 recid=456 stamp=737860748
input archive log thread=1 sequence=168 recid=464 stamp=737980097
input archive log thread=1 sequence=169 recid=461 stamp=737980094
input archive log thread=1 sequence=170 recid=467 stamp=737980099
input archive log thread=1 sequence=171 recid=470 stamp=737980425
input archive log thread=1 sequence=172 recid=472 stamp=737981508
input archive log thread=1 sequence=173 recid=474 stamp=737985385
channel ORA_DISK_1: starting piece 1 at 17-DEC-10
channel ORA_DISK_1: finished piece 1 at 17-DEC-10
piece handle=D:\RMAN\BACKUP\0MLVPGRB_1_1 comment=NONE
channel ORA_DISK_1: starting piece 2 at 17-DEC-10
channel ORA_DISK_1: finished piece 2 at 17-DEC-10
piece handle=D:\RMAN\BACKUP\0MLVPGRB_2_1 comment=NONE
channel ORA_DISK_1: starting piece 3 at 17-DEC-10
channel ORA_DISK_1: finished piece 3 at 17-DEC-10
piece handle=D:\RMAN\BACKUP\0MLVPGRB_3_1 comment=NONE
channel ORA_DISK_1: starting piece 4 at 17-DEC-10
channel ORA_DISK_1: finished piece 4 at 17-DEC-10
piece handle=D:\RMAN\BACKUP\0MLVPGRB_4_1 comment=NONE
channel ORA_DISK_1: starting piece 5 at 17-DEC-10
channel ORA_DISK_1: finished piece 5 at 17-DEC-10
piece handle=D:\RMAN\BACKUP\0MLVPGRB_5_1 comment=NONE
channel ORA_DISK_1: starting piece 6 at 17-DEC-10
channel ORA_DISK_1: finished piece 6 at 17-DEC-10
piece handle=D:\RMAN\BACKUP\0MLVPGRB_6_1 comment=NONE
channel ORA_DISK_1: starting piece 7 at 17-DEC-10
channel ORA_DISK_1: finished piece 7 at 17-DEC-10
piece handle=D:\RMAN\BACKUP\0MLVPGRB_7_1 comment=NONE
channel ORA_DISK_1: starting piece 8 at 17-DEC-10
channel ORA_DISK_1: finished piece 8 at 17-DEC-10
piece handle=D:\RMAN\BACKUP\0MLVPGRB_8_1 comment=NONE
channel ORA_DISK_1: starting piece 9 at 17-DEC-10
channel ORA_DISK_1: finished piece 9 at 17-DEC-10
piece handle=D:\RMAN\BACKUP\0MLVPGRB_9_1 comment=NONE
channel ORA_DISK_1: starting piece 10 at 17-DEC-10
channel ORA_DISK_1: finished piece 10 at 17-DEC-10
piece handle=D:\RMAN\BACKUP\0MLVPGRB_10_1 comment=NONE
channel ORA_DISK_1: starting piece 11 at 17-DEC-10
channel ORA_DISK_1: finished piece 11 at 17-DEC-10
piece handle=D:\RMAN\BACKUP\0MLVPGRB_11_1 comment=NONE
channel ORA_DISK_1: starting piece 12 at 17-DEC-10
channel ORA_DISK_1: finished piece 12 at 17-DEC-10
piece handle=D:\RMAN\BACKUP\0MLVPGRB_12_1 comment=NONE
channel ORA_DISK_1: starting piece 13 at 17-DEC-10
channel ORA_DISK_1: finished piece 13 at 17-DEC-10
piece handle=D:\RMAN\BACKUP\0MLVPGRB_13_1 comment=NONE
channel ORA_DISK_1: starting piece 14 at 17-DEC-10
channel ORA_DISK_1: finished piece 14 at 17-DEC-10
piece handle=D:\RMAN\BACKUP\0MLVPGRB_14_1 comment=NONE
channel ORA_DISK_1: starting piece 15 at 17-DEC-10
channel ORA_DISK_1: finished piece 15 at 17-DEC-10
piece handle=D:\RMAN\BACKUP\0MLVPGRB_15_1 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:03:41
channel ORA_DISK_1: deleting archive log(s)
archive log filename=D:\ORANT\ARCLOG3\REDO03.LOGARC00155.001 recid=422 stamp=737
092752
archive log filename=D:\ORANT\ARCLOG3\REDO03.LOGARC00156.001 recid=425 stamp=737
156432
archive log filename=D:\ORANT\ARCLOG3\REDO03.LOGARC00157.001 recid=428 stamp=737
257293
archive log filename=D:\ORANT\ARCLOG3\REDO03.LOGARC00158.001 recid=431 stamp=737
322402
archive log filename=D:\ORANT\ARCLOG3\REDO03.LOGARC00159.001 recid=434 stamp=737
389991
archive log filename=D:\ORANT\ARCLOG3\REDO03.LOGARC00160.001 recid=437 stamp=737
408597
archive log filename=D:\ORANT\ARCLOG3\REDO03.LOGARC00161.001 recid=440 stamp=737
476660
archive log filename=D:\ORANT\ARCLOG3\REDO03.LOGARC00162.001 recid=443 stamp=737
542384
archive log filename=D:\ORANT\ARCLOG3\REDO03.LOGARC00163.001 recid=446 stamp=737
634615
archive log filename=D:\ORANT\ARCLOG3\REDO03.LOGARC00164.001 recid=449 stamp=737
658567
archive log filename=D:\ORANT\ARCLOG3\REDO03.LOGARC00165.001 recid=452 stamp=737
726432
archive log filename=D:\ORANT\ARCLOG3\REDO03.LOGARC00166.001 recid=455 stamp=737
827094
archive log filename=D:\ORANT\ARCLOG1\REDO01.LOGARC00167.001 recid=456 stamp=737
860748
archive log filename=D:\ORANT\ARCLOG3\REDO03.LOGARC00168.001 recid=464 stamp=737
980097
archive log filename=D:\ORANT\ARCLOG3\REDO03.LOGARC00169.001 recid=461 stamp=737
980094
archive log filename=D:\ORANT\ARCLOG3\REDO03.LOGARC00170.001 recid=467 stamp=737
980099
archive log filename=D:\ORANT\ARCLOG3\REDO03.LOGARC00171.001 recid=470 stamp=737
980425
archive log filename=D:\ORANT\ARCLOG2\REDO02.LOGARC00172.001 recid=472 stamp=737
981508
archive log filename=D:\ORANT\ARCLOG1\REDO01.LOGARC00173.001 recid=474 stamp=737
985385
Finished backup at 17-DEC-10
Starting Control File and SPFILE Autobackup at 17-DEC-10
piece handle=D:\RMAN\BACKUP\C-1738882432-20101217-02 comment=NONE
Finished Control File and SPFILE Autobackup at 17-DEC-10 -
How to find out who deleted the archive logs
Hi All,
Recently some archive logs were deleted from one of our servers. Is there any way to find out which user has deleted the archive logs through OS or through database ?
OS Version :-
SunOS Generic_Virtual sun4u sparc SUNW,SPARC-Enterprise
Database Version:-
SQL*Plus: Release 9.2.0.8.0 - Production on Mon Apr 9 01:12:15 2012888132 wrote:
Hi All,
Recently some archive logs were deleted from one of our servers. Is there any way to find out which user has deleted the archive logs through OS or through database ?
OS Version :-
SunOS Generic_Virtual sun4u sparc SUNW,SPARC-Enterprise
Database Version:-
SQL*Plus: Release 9.2.0.8.0 - Production on Mon Apr 9 01:12:15 2012As explained by others, from oracle database there is no record if they are deleted from OS.
But you can probably find the history of OS command been run with history command :). You can get the date and time.
Following link can help
http://stackoverflow.com/questions/99755/how-do-i-get-the-command-buffer-in-solaris-10
http://www.cyberciti.biz/faq/unix-linux-bash-history-display-date-time/
http://www.linuxquestions.org/questions/solaris-opensolaris-20/in-solaris-command-line-how-to-get-the-previous-commands-573814/
But i suggest you to post in Sun OS forum to get more details as its nothing to do with Database(in this scenario) -
I want to setup RMAN not to delete any archive log files that will be used by GoldenGate. Once GoldenGate is completed with the archive log file, the archive log file can be backup and deleted by RMAN. It's my understanding that I can issue the following command "REGISTER EXTRACT <ext_name>, LOGRETENTION" to enable to functionally. Is this the only thing I need to do to execute to enable this functionally?
Hello,
Yes this is the rigth way using clasic capture.
Using the command : REGISTER EXTRACT Extract_name LOGRETENTION.
Create a Oracle Streams Group Capture (Artificial) that prevent RMAN archive deletion if these are pending to process for Golden Gate capture process.
You can see this integration doing a SELECT * FROM DBA_CAPTURE; after execute the register command.
Then, when RMAN try to delete a archive file pending to process for GG this warning appear AT RMAN logs:
Error: RMAN 8317 (RMAN-08317 RMAN-8317)
Text: WARNING: archived log not deleted, needed for standby or upstream capture process.
Then , this is a good manageability feature. I think is a 11.1 GG new feature.
Tip. To avoid RMAN backup multiples times a archive pending to process, there is a option called BACKUP archivelog not backed 1 times.
If you remove a Capture process that is registered with the database you need to use this comand to remove the streams capture group:
unREGISTER EXTRACT extract_name LOGRETENTION;
Then if you query dba_capture, the artificial Streams group is deleted.
I hope help.
Regards
Arturo -
How to delete archive log entries from catalog?
Some old, not needed archive logs are deleted from disk using OS commands but RMAN catalog still lists them.
How can I get rid of them in RMAN?First mark them expired
crosscheck archivelog all;then delete them from the RMAN catalog
delete expired archivelog all;Cheers -
hello,
I am using oracle 10g on linux i want to delete archive log file automaticaly there is any way to do this.or anyone can tell me scripts for do this.ur help regarding this is highly appreciated
Regard,s
Umair IqbalHi,
Can you please let us know why you want to delete the archive log file?
BTW, you can use RMAN to achieve this by taking the backup of archive log and delete the original file using the following command:
Backup archivelog all delete input;Regards
Maybe you are looking for
-
My Macbook is not working. i dont know what to do. Please help
-
Some websites appear to crash Finder
I have an iMac 2.4 GHz Intel Core 2 Duo, bought new in Feb 2009, now running OS 10.6.8. For the last 3-4 months I have had a problem with the Finder crashing that I never had before. It seems to happen when using the internet to visit certain website
-
My new I pad retina display restarts automatically in every 3 minutes
I purchased it ( new ipad with retina display wifi + cellular ) one month back. It restarts automatically in every 3 minutes. I tried few tips already like reset n all but all failed. Pls help me
-
Does anyone have some sort of how-to guide in using the HTTP Adapter ? From the point of having installed to HTTP Adapter - Once you have deployed the Servlet, and have tested that it loops.. I realize there are AQ's to be set up as well. Am not an O
-
My partner and I both have an iPhone 5s on the Three network in the UK Both phones are on iOS 8.03 We are currently in portugal and because Three do not currently allow minutes from the UK to be used in Portugal. We both bought the europass data to u