Archive logs deletion using VI or VIM editor
Dear professional,
Recently I moved from one organization to another. In my team all are deleting archive log files using VI editor, They are copying archivelog file names in new vi file and deleting simply.. Can anyone suggest me how to do that (with Deletion command)?
Thanks
Sagar
Thank you for your response..
This is the way we are deleting archivelog files after backups done to make free space in disk.
[root@apps /]# mkdir test
[root@apps /]# cd test
[root@apps test]# vim test1.log
[root@apps test]# vim test2.log
[root@apps test]# vim test3.log
[root@apps test]# vim test4.log
[root@apps test]# vim test5.log
[root@apps test]#
[root@apps test]# ls -lrt
total 20
-rw-r--r-- 1 root root 23 Sep 4 20:36 test1.log
-rw-r--r-- 1 root root 17 Sep 4 20:36 test2.log
-rw-r--r-- 1 root root 7 Sep 4 20:36 test3.log
-rw-r--r-- 1 root root 14 Sep 4 20:37 test4.log
-rw-r--r-- 1 root root 14 Sep 4 20:37 test5.log
[root@apps test]# vim list
test1.log
test2.log
test3.log
test4.log
test5.log
:wq
[root@apps test]# cat list
test1.log
test2.log
test3.log
test4.log
test5.log
[root@apps test]# rm -R `cat list`
[root@apps test]# ls
list
[root@apps test]# rm list
[root@apps test]# ls
[root@apps test]#
Thanks
Similar Messages
-
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 -
RMAN-08591: WARNING: invalid archived log deletion policy
Hi,
My database is 11.2.0.1 running on OEL 5.
We have stndby database running on other server, i have configured rman like this
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
But while running db backup, getting the error
RMAN-08591: WARNING: invalid archived log deletion policy.
RMAN retention policy is set to redundancy 1.
The archive files are deleting even though they are not applied on standby.
Thanks,kkrm333 wrote:
Hi,
My database is 11.2.0.1 running on OEL 5.
We have stndby database running on other server, i have configured rman like this
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
But while running db backup, getting the error
RMAN-08591: WARNING: invalid archived log deletion policy.
RMAN retention policy is set to redundancy 1.
The archive files are deleting even though they are not applied on standby.
Thanks,
bcm@bcm-laptop:~$ oerr rman 8591
8591, 3, "WARNING: invalid archived log deletion policy"
// *Cause: An invalid ARCHIVELOG DELETION POLICY was supplied. The archived
// log deletion policy was APPLIED but there was no mandatory
// archived log destinations.
// *Action: One of the following:
// 1) Change archived log deletion policy using CONFIGURE command
// 2) Make one or more of standby destination as MANDATORY. -
How to remove archive log files using Enterprise Manger
Hi,
I took backup of the archive log files and i deleted those files at OS level but it is not reflecting in the Enterprise Manager it is showing the same. Can any one help in how to delete the archive log files by using Enterprise Manger.
version 10.2.0.1.0
any help is appreciated.
Regards,
AshrafI have the same problem. I have 10gr1 and 10gr2 on different servers. On 10gr1, under administration/manage current backup/image, I can see archivelog files, and can mange them. But on 10gr2, the image doesn't show archivelog files. I can only remove them using rman. I wonder if it's because the different design on 10gr2 or I missed something when setup the backup?
-
Backup archive logs problem using RMAN
Hi guys
I got failure when using RMAN to backup archive log files:
Starting backup at 20-APR-06
current log archived
released channel: c1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 04/20/2006 21:53:57
RMAN-06059: expected archived log not found, lost of archived log compromises recoverability
ORA-19625: error identifying file /opt/oracle/flash_recovery_area/DB10G/archivelog/2006_03_17/o1_mf_1_1_21p5c251_.arc
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
RMAN> **end-of-file**
My archive log files location:
SQL> show parameter log_archive_dest
NAME TYPE VALUE
log_archive_dest_1 string LOCATION=/opt/oracle/oradata/DB10G/arch/
Current archive log files:
$ ls /opt/oracle/oradata/DB10G/arch
1_17_586191737.dbf 1_21_586191737.dbf 1_25_586191737.dbf 1_29_586191737.dbf 1_33_586191737.dbf
1_18_586191737.dbf 1_22_586191737.dbf 1_26_586191737.dbf 1_30_586191737.dbf 1_34_586191737.dbf
1_19_586191737.dbf 1_23_586191737.dbf 1_27_586191737.dbf 1_31_586191737.dbf 1_35_586191737.dbf
1_20_586191737.dbf 1_24_586191737.dbf 1_28_586191737.dbf 1_32_586191737.dbf afiedt.buf
$
But when I check v$archived_log:
SQL> select name,status,deleted from v$archived_log;
NAME S DEL
D YES
D YES
D YES
D YES
D YES
D YES
D YES
D YES
D YES
D YES
D YES
/opt/oracle/flash_recovery_area/DB10G/archivelog/2006_03_17/ A NO
/opt/oracle/flash_recovery_area/DB10G/archivelog/2006_03_18/ A NO
/opt/oracle/flash_recovery_area/DB10G/archivelog/2006_03_19/ A NO
/opt/oracle/oradata/DB10G/redo01.log A NO
/opt/oracle/oradata/DB10G/redo02.log A NO
/opt/oracle/oradata/DB10G/redo03.log A NO
/opt/oracle/oradata/DB10G/arch/1_5_585926175.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_6_585926175.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_7_585926175.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_1_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_2_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_3_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_4_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_5_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_6_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_7_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_8_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_9_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_10_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_11_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_12_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_13_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_14_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_15_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_16_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_17_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_18_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_19_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_20_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_21_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_22_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_23_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_24_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_25_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_26_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_27_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_28_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_29_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_30_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_31_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_32_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_33_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_34_586191737.dbf A NO
More records than actual archived logs. How could it happen? How to solve?
THanks in advance.
SharonHi,
Use
RMAN>crosscheck archivelog all; cmd -
Hi
I Have deleted 3 of my archivedlogs manually,but they have not marked deleted in V$ARCHIVED_LOG .
so when i'm trying to backup my remained archived logs in RMAN.It doesn't back them up.because RMAN has not been notified with thw deletion.So..
How can I notify RMAN & mark them deleted in V$ARCHIVED_LOG.
Thankshi
use crosscheck
SQL> select name from v$archived_log;
NAME
D:\ORACLE\PRODUCT\10.1.0\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2006_11_23\O1_MF_1_
25_2PC98N8M_.ARC
D:\ORACLE\PRODUCT\10.1.0\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2006_11_23\O1_MF_1_
26_2PC9CZF4_.ARC
C:\>del D:\ORACLE\PRODUCT\10.1.0\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2006_11_23\
*.ARC
C:\>sqlplus "sys as sysdba"
SQL*Plus: Release 10.1.0.2.0 - Production on Thu Nov 23 18:54:39 2006
Copyright (c) 1982, 2004, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> select name from v$archived_log;
NAME
D:\ORACLE\PRODUCT\10.1.0\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2006_11_23\O1_MF_1_
25_2PC98N8M_.ARC
D:\ORACLE\PRODUCT\10.1.0\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2006_11_23\O1_MF_1_
26_2PC9CZF4_.ARC
SQL> host rman target=sys
Recovery Manager: Release 10.1.0.2.0 - Production
Copyright (c) 1995, 2004, Oracle. All rights reserved.
target database Password:
connected to target database: ORCL (DBID=1134976990)
RMAN> crosscheck archivelog all;
released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=215 devtype=DISK
validation failed for archived log
archive log filename=D:\ORACLE\PRODUCT\10.1.0\FLASH_RECOVERY_AREA\ORCL\ARCHIVELO
G\2006_11_23\O1_MF_1_25_2PC98N8M_.ARC recid=1 stamp=607282901
validation failed for archived log
archive log filename=D:\ORACLE\PRODUCT\10.1.0\FLASH_RECOVERY_AREA\ORCL\ARCHIVELO
G\2006_11_23\O1_MF_1_26_2PC9CZF4_.ARC recid=2 stamp=607283007
Crosschecked 2 objects
RMAN> delete expired archivelog all;
released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=215 devtype=DISK
List of Archived Log Copies
Key Thrd Seq S Low Time Name
1 1 25 X 23-NOV-06 D:\ORACLE\PRODUCT\10.1.0\FLASH_RECOVERY_AREA\OR
CL\ARCHIVELOG\2006_11_23\O1_MF_1_25_2PC98N8M_.ARC
2 1 26 X 23-NOV-06 D:\ORACLE\PRODUCT\10.1.0\FLASH_RECOVERY_AREA\OR
CL\ARCHIVELOG\2006_11_23\O1_MF_1_26_2PC9CZF4_.ARC
Do you really want to delete the above objects (enter YES or NO)? yes
deleted archive log
archive log filename=D:\ORACLE\PRODUCT\10.1.0\FLASH_RECOVERY_AREA\ORCL\ARCHIVELO
G\2006_11_23\O1_MF_1_25_2PC98N8M_.ARC recid=1 stamp=607282901
deleted archive log
archive log filename=D:\ORACLE\PRODUCT\10.1.0\FLASH_RECOVERY_AREA\ORCL\ARCHIVELO
G\2006_11_23\O1_MF_1_26_2PC9CZF4_.ARC recid=2 stamp=607283007
Deleted 2 EXPIRED objects
SQL> select name,deleted from v$archived_log;
NAME
DEL
YES
YESHope this helps
Taj -
RMAN,Data Guard and Archive log deletion
Our DG environment is running Oracle 11g R2
we have a 3 node DG environment with
A being the Primary
B and C being Active Data Guard Standbys
Backups are taken off of B and go directly to tape.
Standby Redo Logs and Fast Recovery Area are being used
Taking recommendation from "Using Recovery Manager with Oracle Data Guard in Oracle Database 10g"
RMAN Setting on Primary ("A")
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY
RMAN Setting on Standby ("B") where Backup is done
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE
RMAN Setting on other Standby ("C")
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY
How can we know what archive logs are eligible to be deleted from "A" and "C" ?
When does the delete take place?
How can we tell when the archive logs are being deleted from "A" and "C" ?Dear user10260925,
The documentation that you have read is reliable but insufficient.
The Oracle can manage the archivelog directory and knows which one is eligible for the deletion. Those stuff you have posted in here has been taken from the online documentation and is supported and can be used when the Oracle knows and manages the archivelogs. That is simply called the flash recovery area. Please read about the FRA in this very moment.
Under normal circumstances people in the industry uses some scripts to achive the archivelog deletion on the standby system.
Here is a useful example to you;
# Remove old archivelogs
00,30 * * * * /home/oracle/scripts/delete_applied_redo_logs_OPTSTBY.sh
vals3:/home/oracle#cat /home/oracle/scripts/delete_applied_redo_logs_OPTSTBY.sh
export ORACLE_SID=optstby
export ORACLE_HOME=/oracle/product/10.2.0/db_1
cd /db/optima/archive/OPTPROD/archivelog
/oracle/product/10.2.0/db_1/bin/sqlplus "/ as sysdba" @delete_applied_redo_logs.sql
grep arc delete_applied_redo_logs.lst > delete_applied_redo_logs_1.sh
chmod 755 delete_applied_redo_logs_1.sh
sh delete_applied_redo_logs_1.sh
rm delete_applied_redo_logs_1.sh
rm delete_applied_redo_logs.lst
vals3:/home/oracle#cd /db/optima/archive/OPTPROD/archivelog
vals3:/db/optima/archive/OPTPROD/archivelog#cat delete_applied_redo_logs.sql
set echo off
set heading off
spool /db/optima/archive/OPTPROD/archivelog/delete_applied_redo_logs.lst
select 'rm -f ' || name from v$archived_log where applied = 'YES';
spool off
exit
vals3:/db/optima/archive/OPTPROD/archivelog#Hope That Helps.
Ogan -
Hello,
-rw-r----- 1 oracle dba 193739264 Jun 22 13:23 1_5_754473298.dbf
-rw-r----- 1 oracle dba 193052160 Jun 22 15:00 1_6_754473298.dbf
-rw-r----- 1 oracle dba 492818944 Jun 22 16:14 2_161956_733073720.dbf
-rw-r----- 1 oracle dba 491902976 Jun 22 16:14 2_161955_733073720.dbf
-rw-r----- 1 oracle dba 193459200 Jun 22 16:14 2_161957_733073720.dbf
-rw-r----- 1 oracle dba 193587200 Jun 22 16:14 2_161958_733073720.dbf
-rw-r----- 1 oracle dba 193142272 Jun 22 16:14 2_161959_733073720.dbf
rw-r----- 1 oracle dba 1024 Jun 23 23:17 1_56660_733073720.dbf
-rw-r----- 1 oracle dba 196693504 Jun 23 23:17 2_163084_733073720.dbf
-rw-r----- 1 oracle dba 493167104 Jun 23 23:18 2_163085_733073720.dbf
-rw-r----- 1 oracle dba 492434944 Jun 23 23:19 2_163086_733073720.dbf
-rw-r----- 1 oracle dba 226295808 Jun 24 04:07 c-1981727300-20110624-00
-rw-r----- 1 oracle dba 226263040 Jun 24 10:09 52mfm6c2_1_1
-rw-r----- 1 oracle dba 491752448 Jun 26 23:29 2_164881_733073720.dbf
-rw-r----- 1 oracle dba 192917504 Jun 26 23:31 2_164882_733073720.dbf
-rw-r----- 1 oracle dba 1024 Jun 26 23:31 1_57258_733073720.dbf
-rw-r----- 1 oracle dba 193144320 Jun 26 23:32 2_164883_733073720.dbf
-rw-r----- 1 oracle dba 193007616 Jun 26 23:34 2_164884_733073720.dbf
-rw-r----- 1 oracle dba 194516480 Jun 27 23:48 2_165577_733073720.dbf
-rw-r----- 1 oracle dba 195362816 Jun 27 23:48 2_165578_733073720.dbf
-rw-r----- 1 oracle dba 1024 Jun 27 23:48 1_57490_733073720.dbf
-rw-r----- 1 oracle dba 194276864 Jun 27 23:49 2_165579_733073720.dbf
-rw-r----- 1 oracle dba 494327296 Jun 27 23:51 2_165580_733073720.dbf
-rw-r----- 1 oracle dba 493318656 Jun 27 23:53 2_165581_733073720.dbf
-rw-r----- 1 oracle dba 1024 Jun 27 23:56 1_57491_733073720.dbf
-rw-r----- 1 oracle dba 193768448 Jun 27 23:56 2_165582_733073720.dbf
-rw-r----- 1 oracle dba 193017344 Jun 28 00:10 2_165583_733073720.dbf
-rw-r----- 1 oracle dba 197171712 Jun 28 00:12 2_165584_733073720.dbf
-rw-r----- 1 oracle dba 1024 Jun 28 00:13 1_57492_733073720.dbf
-rw-r----- 1 oracle dba 491688448 Jun 28 00:14 2_165585_733073720.dbf
-rw-r----- 1 oracle dba 494400512 Jun 28 00:15 2_165586_733073720.dbf
-rw-r----- 1 oracle dba 195551232 Jun 28 00:15 2_165587_733073720.dbf
-rw-r----- 1 oracle dba 1024 Jun 28 00:15 1_57493_733073720.dbf
-rw-r----- 1 oracle dba 195021824 Jun 28 00:15 2_165588_733073720.dbf
22,23,24,26,27 of june archive log exist in archive folder when i run
delete archivelog all completed before 'SYSDATE -1'
this command 26 june of some archive deleted but i want to delete above 22,23,24,27 of june archive.how can i delete above dates archivelog.
Thanks,
UmairHi;
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF X DAYS; << it says how many days you will keep your db and archive backups If you set it 2 its mean 2 days bakcup will be keep your db backups
For your issue you can set this parameter or you can delete them manualy and then can run crosscheck from rman(Both method mention by Mdtaylor already)
For me i am also using this:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
delete noprompt backup of archivelog until time 'sysdate-4'; << My system is keep my backups 7 days but wiht this command i can delete sysdate-4 hours archivelog from system(Dont forget it will delete wiht hour base,i mean if your time is now 10.00 am than it will delete sysdate-4 until 10.00 am, you can see 10.20 asrchivelog on your system)
Regard
Helios -
Logical standby | archive log deleted | how to remove gap ???
hi gurus...
i have problem on logical standby
by mistake standby log coming to logical standby has been deleted , now how to fill up the gap ???
ON STANDBY
SEQUENCE# FIRST_CHANGE# NEXT_CHANGE# APPLIED
228 674847 674872 YES
229 674872 674973 CURRENT
230 674973 674997 NO
231 674997 675023 NO
232 675023 675048 NO
233 675048 675109 NO
234 675109 675135 NO
235 675135 675160 NO
236 675160 675183 NO
237 675183 675208 NO
238 675208 675232 NO
239 675232 675257 NO
240 675257 675282 NO
241 675282 675382 NO
242 675382 675383 NO
243 675383 675650 NO
244 675650 675652 NO
245 675652 675670 NO
246 675670 675688 NO
247 675688 675791 NO
248 675791 678524 NO
archive log are shipping to standby location also and getting registered
ALERT LOG OF STANDBY
Fri May 7 12:25:36 2010
Primary database is in MAXIMUM PERFORMANCE mode
RFS[21]: Successfully opened standby log 5: '/u01/app/oracle/oradata/BEST/redo05.log'
Fri May 7 12:25:37 2010
RFS LogMiner: Registered logfile [u01/app/oracle/flash_recovery_area/BEST/archivelog/archBEST_248_1_715617824.dbf] to LogMiner session id [1]
but i dont have standby log after 229 sequence ...
ON PRIMARY
SYS@TEST AS SYSDBA> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/app/oracle/flash_recovery_area/TEST/standlogOldest online log sequence 247
Next log sequence to archive 249
Current log sequence 249
what to do next to apply sequences and bring both in sync.
please help me ,,,,
Edited by: user12281508 on May 7, 2010 9:45 AMthanks for response.
no its pure logical standby
i have tried to ftp the archive logs of primary to standby and applied manually
SYS@BEST AS SYSDBA> alter database register logfile '/u01/app/oracle/flash_recovery_area/BEST/archivelog/archBEST_230_1_715617824.dbf';
alter database register logfile '/u01/app/oracle/flash_recovery_area/BEST/archivelog/archBEST_230_1_715617824.dbf'
ERROR at line 1:
ORA-01289: cannot add duplicate logfile
SYS@BEST AS SYSDBA> alter database register logfile '/u01/app/home/archTEST_230_1_715617824.dbf';
alter database register logfile '/u01/app/home/archTEST_230_1_715617824.dbf'
ERROR at line 1:
ORA-01289: cannot add duplicate logfile
any other way ???? -
Auto archive log deletion from single location out of multiple locations.
Hi,
I am running database on 11r1 version.
I have set two archive log locations. now i want archive logs to be deleted through RMAN from only one location the other location shouldn't be affected. what are the specific parameters to be set. Is there any specific command for this please advise.
Thanks in advance.If you see Hemant's reply in the below link, he had shown how to delete archives from 1 location.
RMAN backup with 2 archive log locations -
hi
My database is in arhvie log. Its daily backup in date format folder (2011_06_13) in flash recovery area.
My flash recovery area is 2 g.b. It fill within 10 days. I have to remove older folder manually. I want to keep folder of last seven days. and others want to remove through shell script.
send me script which scan flash recovery area and delete folder at operating system level automatically.(Linux).
e.g delete all folder which is tag less than '2011-06-06'.
and last seven folder remain since current date.
Regards
Rizwan AliRizwan Ali Wahla wrote:
hi
My database is in arhvie log. Its daily backup in date format folder (2011_06_13) in flash recovery area.
My flash recovery area is 2 g.b. It fill within 10 days. I have to remove older folder manually. I want to keep folder of last seven days. and others want to remove through shell script.No, you do NOT want to remove them via a shell script. If you do that, the rman repository will not know you did it and will continue to think those files are available. That's why there are rman commands to do this kind of housekeeping ("back archivelog delete ... ", "delete obsolete ...")
send me script which scan flash recovery area and delete folder at operating system level automatically.(Linux).Sounds like a demand that volunteers do your work for you. If you need help with a task, the professionally courteous thing to do is show the work done so for, explain what you are having trouble with, and politely ask for assistance. No one here is obligated to do anything for you.
e.g delete all folder which is tag less than '2011-06-06'.
and last seven folder remain since current date.
Regards
Rizwan Ali -
Best way of deleting archive logs on standby when backup taken on primary
Hello,
I have a 11gr2 dataguard configuration without the broker.
main problem in my particular situation arises from my FRA size on primary much more than on standby (90Gb vs 30Gb) and in some situations I'm constrained with FRA space on standby.... I'm going to align the FRAs but in the mean time....
can anyone confirm that if I have configuration as in subject with maximum performance mode and I'm not using the broker I should consider a sort of "external" way for archive log deletion on the physical standby?
In fact I'm setting on primary
- retention policy = redundancy 1
- archivelog deletion = applied on standby (without using any "backed up...." option)
Considering the standby it seems from docs that:
- retention policy always wins over deletion policy (so no archive eligible for deletion is deleted if retention is not satisfied)
- I can set on standby archivelog deletion = applied on standby (without using any "backed up...." option)
But it is not clear to me the effect of this config in case this is a standby itself and without any other cascade standby databases
The manual says this has to be met:
1) The archived redo log files have been applied to the required standby databases.
---> what does this mean in case the db is a standby.. met or not met as I have no other cascade standby dependant on this one?
2) The logs are not needed by the BACKED UP ... TIMES TO DEVICE TYPE deletion policy. If the BACKED UP policy is not set, then this condition is always met.
---> I should be ok
So the last question for standby is
- what to set retention policy to?
I have not understood if I set it to "NONE", this means no retention at all or retention for ever....
sometimes I read that there is no policy; in other examples that files will be retained forever (because no file considered as obsolete).... or at least so I understood...
I would like to have a sort of policy on standby where the archive logs can be deleted as soon as they are applied during the continuous media recovery phase...
It seems I can't find a self contained set of configurations across the dataguard....
Thanks in advance.
GianlucaI agree with you.... It is a temporary contingency....
I already stressed the fact that sizes between sites must be quite identical...
we are going towards a production dataguard, migrating from a windows config (without it) to a Linux based config....
but this contingency made me think about these considerations regarding policies and automatic dataguard operations
I also stressed on equal size grow capability for both sites file systems, also for data tablespaces, so that for example in case of high fragmentation we have to avoid a limit situation where
1) a file system full for DR datafiles causes abend of automatic media recovery
2) this generates FRA growth in DR because archive logs are shipped but not applied any more
3) FRA goes 100% in DR and primary cannot ship any more
4) archive logs cannot be automatically deleted on primary because not already shipped
5) FRA full on primary and DB hangs....
Thanks anyway for input -
Specifying separate location for Archived logs in Persistent settings
DB version:11gR1
I am new to RMAN
Currently my RMAN bkp script looks like
run {
recover copy of database with tag "INCR_BKP";
backup check logical incremental level 1 format '/data_DISK1/bkp_dir/nhprod31/data/INCR_%d_%u'
for recover of copy with tag "INCR_BKP" database;
backup (archivelog all format='/data_DISK2/bkp_dir/nhprod31/arch_logs/ARCH_%d_%T_%u_s%s_p%p' DELETE ALL INPUT TAG "arch_logs");
backup format '/data_DISK1/bkp_dir/nhprod31/ctrl_file/RMAN_CTL_%s:%t:%p.bkp' current controlfile;
}I want Datafiles and Archived logs to be stored in different locations like above.
But i want to remove those lengthy path locations in the script and just use
backup database plus archivelog;For this, i need to set
configure channel device type disk format ='/u01/backup/ora_%U.bak';Question1.
Is it possible to specify a separate archive log location using CONFIGURE command?
Question2.
If it is not possible, all the backup files will have the same naming convention
ora_%U.bakhow will you identify the type of backup file. Say, i need the archive log files to be named with Log sequence number in it (like ARCH_%d_%T_%u_s%s_p%p). Shouldn't Oracle be including a provision for this?
I am not even sure that each archive log file will backed up as a single backup file. Oracle may consolidate all the archive logs in to one backup piece. Please forgive my ignorance.783999 wrote:
Try this for datafile backup:
RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '<PATH>/rbkp/databkp/DATA_L0_QA_%d_%s_%p';
RMAN> show all;
This worked for me.
Regards,
BikramThis won't work. Re-read the question carefully. -
Hello all,
i have db from 10.2.0.4 to 11.2.0.3, my question is with regards to FRA. We do not use the full blow FRA, but only use it to store our Archive logs ONLY. This is still in testing phase for us...
Our Current method it to backup the archive logs and blow them away (script ran from cron and RMAN)...
and now from what i understand about FRA, if my archive logs are sitting in FRA then once its get 80% or whatever that value is, it will delete it for me as long as i have backed up my archive logs.... So my question is, is there a acutal threahold or no ?? Reading from below doc looks like this is unpredictable.... but is there a hidden parameter or some setting i can set to say....once the FRA is lets say 50% full, delete the files(as long as they are backed up first)
http://docs.oracle.com/cd/B19306_01/backup.102/b14192/setup005.htm
section -- 3.5.6.1 When Files are Eligible for Deletion from the Flash Recovery Area
if there is no such setting, how can we setup managing archive logs (besides using rman to backup and delete)...Hello;
It is not unpredictable. Oracle decides. The document is a bit vague to say the least.
Just another reason to check your alert logs often.
As a general rule I set db_recovery_file_dest_size on the high side.
We kicked this around the Data Guard forum a few weeks back :
FRA - Flashback logs usage varies on Primary against Standby Database
Best Regards
mseberg
Edited by: mseberg on Jun 28, 2012 10:22 AM -
After updating to iOS4 when I swipe to delete email in my GMAIL account I get Archive instead of Delete. I still get Delete as the option if swiping email in Exchange. Curious as to what the difference might be.
Lisa,
Sure If this not production Env U can delete
You can run Dev boxes in no archive log mode.
Archive logs are useful for complete recovery incase of any system failure.
For delete use DB13 or BRtools.Or u can delete at os LEVEL.
Take complete backup because once u delete archives u cant recover up to time.
http://help.sap.com/saphelp_nw2004s/helpdata/en/df/455e24747111d6b25100508b6b8a93/content.htm
Check for backup schedule and without DBA Approval Dont delete.
Let me know if u have any doubts.
Regards
Vinod
Message was edited by: Vinod U
Message was edited by: Vinod U
Maybe you are looking for
-
2 iphones with the same itunes account...
Hi All Just wondering if anyone has the answer i need! A friend of mine and his wife are using the same itunes account for both their iphones, this is causing issues now as the info on the phones are starting to merge with each other so is it possibl
-
Is PE10 compatible with Windows 8? Having trouble with the organizer.
Is PE10 compatible with Windows 8? Having trouble with the organizer
-
Safari causes my computer to run at 100% CPU Usage!
For the past few days Safari has been causing my CPU to run at high rates. This basically causes me not to be able to much while Safari drags and loads pages. I need a solution to this. I tried resetting Safari but that didn't work. Please help. Than
-
Virtual PC 7.0.2 not working
I have a Mac OS X 10.4.11, and Virtual PC had been fine since I got it in July 2007. I hadn't used it for a while, and now when I need it to install an update for a flash drive, the application opens but suddenly "quits unexpectedly". When I try to r
-
Exception occurred during event dispatching: java.lang.NullPointerException at DataD$MyComboListener.actionPerformed(DataDictionary.java:143) at javax.swing.JComboBox.fireActionEvent(JComboBox.java:865) at javax.swing.JComboBox.selectedItemChanged(JC