RMAN show archivelog deletion policy;

RMAN> show archivelog deletion policy;
RMAN configuration parameters are:
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
What choices i have for its deletion policy? I want to carry only 30 days archivelogs , How i can chnage that?

Hello,
These are the options.
When backups of archived redo log files are taken on the standby database:
1)Issue the following command on the primary database:
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
2) Issue the following command on the standby database:
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;
When backups of archived redo log files are taken on the primary database:
1) Issue the following command on the standby database:
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
2) Issue the following command on the primary database:
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;
Check this url for more info
https://dpt-info.u-strasbg.fr/doc/oracle/server.102/b14239/rman.htm
-Sri

Similar Messages

  • ARCHIVELOG DELETION POLICY 10g?

    I know in 11g, we have this command.
    RMAN>CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 3 TIMES TO DEVICE TYPE sbt;
    is there a similar command in 10g as well for this feature?

    Hi Karl,
    You can enforce a similar strategy inside the backup script for 10g.
    # Delete archived log entries before the run
    delete noprompt copy of archivelog all backed up 3 times to SBT_TAPE;
    backup
    filesperset 20
    format='al_%d_%s_%p_%t'
    archivelog all ;
    # Delete archived log entries after the run
    delete noprompt copy of archivelog all backed up 3 times to SBT_TAPE;If for some reason the backup fails halfway through the run, the before delete will purge all archivelogs already 3 times on tape.
    Regards,
    Tycho

  • Retention policy vs. Archivelog deletion policy

    Environment:
    Oracle EE 11.2.0.3 on Solaris 10.5
    Which policy takes precedence?
    My Retention Policy is set to 'Recovery window of 8 days' and my Archivelog deletion policy is set to 'backed up 2 times to disk'.
    My DAILY full backup happens at 03:00am and uses the following commands:
    backup incremental level 0 cumulative database tag 'full_daily' plus archivelog tag 'full_daily';
    DELETE NOPROMPT OBSOLETE;I also have an archivelog backup that runs every 4 hours at 02:00, 06:00, 10:00, 14:00, 18:00 and 22:00 and looks like this:
    backup archivelog all tag '&1';
    delete noprompt ARCHIVELOG UNTIL TIME 'SYSDATE-8';With the archivelog backup running every 4 hours the logs are getting backed up to disk the required 2 times very quickly. Much sooner than 8 days! :-)
    I have a problem where the archivelog backup that runs immediately AFTER the full database backup fails due to not being able to find some older archivelog files.
    In looking at V$ARCHIVED_LOG the files were dated (COMPLETION_DATE) just outside the 8 day retention window but they had a status of 'A' (Archived) instead of the 'D' (Deleted) I was expecting. When I ran a 'Crosscheck archivelog all' it changed the statuses to 'D' and the next archivelog backup ran successfully.
    What am I missing?
    Should I change the archivelog deletion policy to something else? If so, what and why (just trying to understand!) ?
    I am not using an FRA and have controlfile autobackup turned on.
    Please let me know if you need more information. I have been scouring the docs and the 11g RMAN Oracle Press book but haven't found the trick yet!
    Thanks for any assistance!
    -gary

    Hemant K Chitale wrote:
    The Retention Policy applies to Backups. It does not apply to ArchiveLogs.
    The ArchiveLog Deletion Policy applies to ArchiveLogs. It does not apply to Backups.
    Since you have 2 copies of ArchiveLogs in the backups and these are retained for 8 days, a "delete noprompt ARCHIVELOG UNTIL TIME 'SYSDATE-8';" is overkill. Why retain 8 days of archivelogs on disk if there are 2 copies already backed up ?
    Does your full backup that begins at 3am complete before 6am ? If it goes beyond 6am, it will be deleting some files after 6am but the "backup archivelog all" at 6am will expect some archivelogs (8 days old) to be present.
    Hemant K Chitale
    RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/oracle/oracle/.Autobackup_CTRL/%F.ctl_bkp';    
    Starting backup at 22-MAY-12
    using channel ORA_DISK_1
    channel ORA_DISK_1: starting datafile copy
    input datafile file number=00001 name=/oracle/oracle/oradata/orcl/system01.dbf
    output file name=/oracle/oracle/flash_recovery_area/ORCL/datafile/o1_mf_system_7vpg432v_.dbf tag=TAG20120522T122602 RECID=1 STAMP=783951999
    channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:46
    channel ORA_DISK_1: starting datafile copy
    input datafile file number=00002 name=/oracle/oracle/oradata/orcl/sysaux01.dbf
    output file name=/oracle/oracle/flash_recovery_area/ORCL/datafile/o1_mf_sysaux_7vpg5l1n_.dbf tag=TAG20120522T122602 RECID=2 STAMP=783952038
    channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:35
    channel ORA_DISK_1: starting datafile copy
    input datafile file number=00003 name=/oracle/oracle/oradata/orcl/undotbs01.dbf
    output file name=/oracle/oracle/flash_recovery_area/ORCL/datafile/o1_mf_undotbs1_7vpg6ms0_.dbf tag=TAG20120522T122602 RECID=3 STAMP=783952046
    channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
    channel ORA_DISK_1: starting datafile copy
    input datafile file number=00004 name=/oracle/oracle/oradata/orcl/users01.dbf
    output file name=/oracle/oracle/flash_recovery_area/ORCL/datafile/o1_mf_users_7vpg6ptn_.dbf tag=TAG20120522T122602 RECID=4 STAMP=783952047
    channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
    Finished backup at 22-MAY-12
    Starting Control File and SPFILE Autobackup at 22-MAY-12
    piece handle=/oracle/oracle/product/11.2.0/dbhome_1/dbs/controlfile_c-1309370544-20120522-02 comment=NONE
    Finished Control File and SPFILE Autobackup at 22-MAY-12
    ORA-00604: error occurred at recursive SQL level 1
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    RMAN-08132: WARNING: cannot update recovery area reclaimable file list
    old RMAN configuration parameters:
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F';
    new RMAN configuration parameters:
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/oracle/oracle/.Autobackup_CTRL/%F.ctl_bkp';
    new RMAN configuration parameters are successfully stored
    RMAN> delete noprompt ARCHIVELOG UNTIL TIME 'SYSDATE-8';
    released channel: ORA_DISK_1
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=196 device type=DISK
    RMAN-08138: WARNING: archived log not deleted - must create more backups
    archived log file name=/oracle/oracle/flash_recovery_area/ORCL/archivelog/2012_04_28/o1_mf_1_2_7sq8tf5p_.arc thread=1 sequence=2
    RMAN-08138: WARNING: archived log not deleted - must create more backups
    archived log file name=/oracle/oracle/flash_recovery_area/ORCL/archivelog/2012_05_22/o1_mf_1_3_7vpdcjjm_.arc thread=1 sequence=3
    ORA-00604: error occurred at recursive SQL level 1
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    RMAN-08132: WARNING: cannot update recovery area reclaimable file list
    RMAN> having problem with Archivelog backup.

  • Archivelog deletion policy  for GG

    Hi All,
    We have GG on one of the database.
    The archivelog is getting deleted before it is applied to GG. The archivelog needs to be restored manually to proceed GG to work properly.
    This is very frequent. Now every time the archivelog needs to be restored manually.
    As far is i know there is archivelog deletion policy is there for standby. which will not delete the archivelog until it is applied to standby.
    Is there any policy for GG so that archivelog which is required by GG should not delete by RMAN until it is applied to GG.
    Kindly suggest.
    Thanks,

    Hi,
    To ensure that RMAN retains all archive logs required by Oracle Golden Gate, when you add or register an Extract group in GGSCI with ADD EXTRACT (TRANLOG option) or REGISTER EXTRACT.
    You can configure Extract to retain enough logs through RMAN for a normal recovery by using the TRANLOGOPTIONS parameter with the LOGRETENTION option set to SR.
    You can read more about this feature in detail in the OGG Installation Guide on Oracle database, pages 58 & 59.
    Regards,
    RB

  • Data guard and RMAN deletion policy.

    Dear experts,
    I have Data guard setup with physical standby. I scheduled backup archivelog to tape from both primary and standby servers. I need that archivelogs will be deleted only after shiped on standby and after backup 1 time to tape device. So I set following RMAN configure command.
    I am using separate RMAN catalogs for primary and secondary.
    CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 1 TIMES TO 'SBT_TAPE' SHIPPED TO ALL STANDBY;
    After I did a test.
    1. Stop standby
    2. Generate archivelogs in Primary (so to fill 100% the FRA )
    3. Backup archivelogs
    4. Start standby
    The logs dosen't shiped to standby because Oracle deleted them to free up space in FRA. So the second part of my deletion policy don't want to work. My goal is that when FRA is full the primary will hang instead of deleting not yet shiped archivelogs.
    Please share with me your experience.
    Thanks in advance.

    Hello;
    Test on 11.2.0.3
    RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 1 TIMES TO 'SBT_TAPE' SHIPPED TO ALL STANDBY;
    new RMAN configuration parameters:
    CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 1 TIMES TO 'SBT_TAPE' SHIPPED TO ALL STANDBY;
    new RMAN configuration parameters are successfully stored
    starting full resync of recovery catalog
    full resync complete
    RMAN-08591: WARNING: invalid archived log deletion policy
    But this is OK
    RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;
    old RMAN configuration parameters:
    CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 1 TIMES TO 'SBT_TAPE' SHIPPED TO ALL STANDBY;
    new RMAN configuration parameters:
    CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;
    new RMAN configuration parameters are successfully stored
    starting full resync of recovery catalog
    full resync complete
    These should work:
    RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO SHIPPED TO ALL STANDBY;
    RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY;
    Best Regards
    mseberg

  • 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.

  • RMAN SHOW ALL?

    Hi all,
    11.2.0.1
    Aix 6.1
    We have 2 similar DB servers.
    But when I do SHOW ALL ins RMAN the have different setup?
    DB Server1:
    RMAN> show all ;
    using target database control file instead of recovery catalog
    RMAN configuration parameters for database with db_unique_name PROD are:
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 8 DAYS;
    CONFIGURE BACKUP OPTIMIZATION OFF; # default
    CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
    CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
    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 LOAD TRUE ; # default
    CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
    CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/orauat/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_BNCTUAT.f'; # default
    DB Server2:
    RMAN> show all ;
    RMAN configuration parameters for database with db_unique_name PROD are:
    CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
    CONFIGURE BACKUP OPTIMIZATION OFF; # default
    CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
    CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
    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 LOAD TRUE ; # default
    CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
    CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/oracle/app/oracle/product/11.2.0.3/dbhome_1/dbs/snapcf_batchsit.f'; # default
    How do I replace >CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 8 DAYS;
    with the default CONFIGURE RETENTION POLICY TO REDUNDANCY 1   and save the config?
    Thanks a lot,
    zxy

    Hi,
    Just type on RMAN
    RMAN> CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
    rest rman will do.. its not lazy

  • 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 Backups with retention policy to redundancy 1 doesn't work fine.

    Hi experts,
    I have a Oracle database with the following system backups:
    Monday:       ArchiveLog Backup
    Tuesday:      Full Backup
    Wednesday:  ArchiveLog Backup
    Thursday:     ArchiveLog Backup
    Friday :         Full Backup
    Saturday:      ArchiveLog Backup
    Sunday:       ArchiveLog Backup
    ArchiveLog Backup = backup tag  'ARCHIVELOG_BACKUP' device type disk archivelog all not backed up delete all input;
    Full Backup = backup tag 'FULL_BACKUP'  device type disk database skip readonly  plus archivelog tag 'FULL_BACKUP_ARCHIVELOGS';
                         crosscheck backup;
                         crosscheck copy;
                         delete noprompt obsolete;    
    RMAN configuration parameters are:
    CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
    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 BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 8;
    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 ARCHIVELOG DELETION POLICY TO NONE; # default
    What this system has done until last two weeks? For example:
    Tuesday :     Full Backup
    Wednesday:  ArchiveLog Backup
    Thursday:     ArchiveLog Backup
    Friday :         Full Backup - > After that, Full backup from Tuesday and ArchiveLog backups from Wed, and Thurs, are deleted. (Thanks to Retention policy) .
    What this system do now?
    Tuesday :     Full Backup
    Wednesday:  ArchiveLog Backup
    Thursday:     ArchiveLog Backup
    Friday :         Full Backup - > After that, Full backup from Tuesday are deleted but not ArchiveLog backups from Wed, and Thurs.
    When I execute a crosscheck on RMAN return that all are AVAILABLE.
    My question is: What is right? The system backups before or after?
    Thanks for your help!

    You are confused about the purpose of crosscheck.
    There are two concepts for which you must grasp the distinction.
    - Expired
    - Obsolete
    Expired
    When an archive log is written, or rman makes a backup, a record of that archivelog or backupset is written to the repository in the control file.
    Crosscheck simply checks the existence of the archivelogs or backupsets that are recorded in the repository.  If something went missing (say, if you used an OS command to delete archivelogs), the record of the missing file is marked as 'expired'.  If you follow the crosscheck command with a 'delete expired' command, the repository records that have been marked 'expired' are deleted from the repository, so rman has no more memory of those files.  Note that 'expired' has nothing to do with retention policy.  Also note that if you do not actually issue the 'delete expired' command, the expired records will remain in the repository. 
    Obsolete
    The retention policy deals with when a backupset is obsolete, meaning it is no longer needed to protect the retention period.  Backupset are not marked as obsolete.  They are evaluated for obsolescence at the time of a command that needs it -- "report obsolete" or "delete obsolete", or when FRA maintenance requires an implied 'delete obsolete'.

  • Rman syntext for deleting archivelogs

    I am looking for rman syntax to delete all archivelogs but leave last 30 minutes on the disk. I tried following but it did not work
    delete archivelog until time ‘sysdate – 30/(24* 60)’
    any help would be appreciated.
    Thanks,
    mkjoco

    There was no error but RMAN was keep deleting extra logs that were created after the requested time. But good news is that it is working now with following command:
    "delete copy of archivelog all completed before 'sysdate - 30/(24*60)';"
    I found this on the net. It seems to me that RMAN was looking for first SCN time, in the log with "UNTIL TIME " but with "COPY OF" its look for file creation time.
    Don't take my words this is my guess .... If someone can verify this would be nice
    Thanks

  • RMAN backup archivelog all delete input

    Hello DBAs,
    what does this command will do?
    RMAN> backup archivelog all delete input;
    DN

    I have set cron job for RMAN> backup archivelog all delete input; and its work.
    But I got following message in my log file.
    Please give ur feed back.
    Recovery Manager: Release 10.1.0.4.0 - 64bit Production
    Copyright (c) 1995, 2004, Oracle. All rights reserved.
    RMAN>
    connected to target database: SIDNAME (DBID=XXXXXXXX)
    using target database controlfile instead of recovery catalog
    RMAN>
    Starting backup at 10-FEB-06
    current log archived
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=269 devtype=DISK
    allocated channel: ORA_DISK_2
    channel ORA_DISK_2: sid=268 devtype=DISK
    channel ORA_DISK_1: starting compressed archive log backupset
    channel ORA_DISK_1: specifying archive log(s) in backup set
    input archive log thread=1 sequence=5701 recid=2412 stamp=581958928
    input archive log thread=1 sequence=5702 recid=2413 stamp=581961105
    input archive log thread=1 sequence=5703 recid=2414 stamp=581964532
    input archive log thread=1 sequence=5704 recid=2415 stamp=582025325
    input archive log thread=1 sequence=5705 recid=2416 stamp=582029976
    input archive log thread=1 sequence=5706 recid=2417 stamp=582031922
    channel ORA_DISK_1: starting piece 1 at 10-FEB-06
    channel ORA_DISK_2: starting compressed archive log backupset
    channel ORA_DISK_2: specifying archive log(s) in backup set
    input archive log thread=1 sequence=5707 recid=2418 stamp=582037207
    input archive log thread=1 sequence=5708 recid=2419 stamp=582038471
    input archive log thread=1 sequence=5709 recid=2420 stamp=582043538
    input archive log thread=1 sequence=5710 recid=2421 stamp=582048518
    input archive log thread=1 sequence=5711 recid=2422 stamp=582055205
    channel ORA_DISK_2: starting piece 1 at 10-FEB-06
    RMAN-03009: failure of backup command on ORA_DISK_1 channel at 02/10/2006 18:00:
    12
    ORA-19502: write error on file "/u02/backup/backup_6ehb2t97_1_1", blockno 6145 (
    blocksize=512)
    ORA-27063: number of bytes read/written is incorrect
    IBM AIX RISC System/6000 Error: 28: No space left on device
    Additional information: -1
    Additional information: 1048576
    channel ORA_DISK_1 disabled, job failed on it will be run on another channel
    RMAN-03009: failure of backup command on ORA_DISK_2 channel at 02/10/2006 18:00:
    12
    ORA-19502: write error on file "/u02/backup/6fhb2t97_1_1", blockno 6145
    (blocksize=512)
    ORA-27063: number of bytes read/written is incorrect
    IBM AIX RISC System/6000 Error: 28: No space left on device
    Additional information: -1
    Additional information: 1048576
    channel ORA_DISK_2 disabled, job failed on it will be run on another channel
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03009: failure of backup command on ORA_DISK_1 channel at 02/10/2006 18:00:
    12
    ORA-19502: write error on file "/u02/backup/backup_6ehb2t97_1_1", blockno 6145 (
    blocksize=512)
    ORA-27063: number of bytes read/written is incorrect
    IBM AIX RISC System/6000 Error: 28: No space left on device
    Additional information: -1
    Additional information: 1048576
    RMAN>
    Recovery Manager complete.
    DN

  • ARCHIVELOG deletion on primary and physical standby

    Hi,
    We have a primary and a physical standby database running Oracle 11.1.0.7.0 software on Red Hat Enterprise Linux x-64 bit OS. I will be using backup software
    to only backup the primary database and do not have the backup software for the standby server and database.
    We need to backup archived redo log files from primary site and delete the ones which are more than one month old. These archived redo log files will be applied from primary to standby database as and when the log switch occurs.
    Can anybody please let me know if the following steps can be used:
    Details are:
    primary database name - sun (machine name is node1)
    standby database name - drsun (machine name is node2)
    On node1 as oracle user:
    $ cat /export/home/oracle/rman/scripts/cleanup_rman_arch_sun.sh
    #!/bin/sh
    ORACLE_SID=sun; export ORACLE_SID
    ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1; export ORACLE_HOME
    PATH=$ORACLE_HOME/bin; export PATH
    $ORACLE_HOME/bin/rman target sys/oracle@sun nocatalog log=/export/home/oracle/rman/log/cleanup_rman_arch_sun.log
    @/export/home/oracle/rman/scripts/cleanup_rman_arch_sun.rcv
    exit
    $ cat /export/home/oracle/rman/scripts/cleanup_rman_arch_sun.rcv
    allocate channel for delete type disk;
    crosscheck archivelog all;
    sql "alter system switch logfile";
    delete noprompt expired archivelog all;
    change archivelog until time 'SYSDATE-1' delete;
    release channel;
    $ crontab -l
    # Delete the archived redo log files at 11:00 PM on the first day of every month
    00 23 1 * * /export/home/oracle/rman/scripts/cleanup_rman_arch_sun.sh
    On node2 as oracle user:
    $ cat /export/home/oracle/rman/scripts/cleanup_rman_arch_drsun.sh
    #!/bin/sh
    ORACLE_SID=drsun; export ORACLE_SID
    ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1; export ORACLE_HOME
    PATH=$ORACLE_HOME/bin; export PATH
    $ORACLE_HOME/bin/rman target sys/oracle@drsun nocatalog log=/export/home/oracle/rman/log/cleanup_rman_arch_drsun.log
    @/export/home/oracle/rman/scripts/cleanup_rman_arch_drsun.rcv
    exit
    $ cat /export/home/oracle/rman/scripts/cleanup_rman_arch_drsun.rcv
    allocate channel for delete type disk;
    crosscheck archivelog all;
    sql "alter system switch logfile";
    delete noprompt expired archivelog all;
    change archivelog until time 'SYSDATE-1' delete;
    release channel;
    $ crontab -l
    # Delete the archived redo log files at 11:00 PM on the first day of every month
    00 23 1 * * /export/home/oracle/rman/scripts/cleanup_rman_arch_drsun.sh
    Regards

    Hello;
    Welcome to the forums. ( By physical Standby I assume Data Guard )
    The short answer is it should work. I noticed this :
    /cleanup_rman_arch_drsun.rcv
    crosscheck archivelog all;
    sql "alter system switch logfile";
    delete noprompt expired archivelog all;
    change archivelog until time 'SYSDATE-1' delete;I see no reason for the "alter system switch logfile". In fact you can do something very simple on the Standby :
    $ORACLE_HOME/bin/rman target / catalog <user>/<password>@<catalog> << EOF
    delete noprompt ARCHIVELOG UNTIL TIME 'SYSDATE-1';
    exit
    EOFThis assumes you have doing a backup with RMAN on the Primary ( tested on 11.2.0.2 ) and have this set on the Primary :
    CONFIGURE ARCHIVELOG DELETEION POLICY TO APPLIED ON ALL STANDBY;
    If you are deleting Archive without using RMAN first then yes something like this ( But I would try to use RMAN and not delete using another method )
    echo `date`
    echo "Runnung RMAN archive crosscheck"
    $ORACLE_HOME/bin/rman <<EOF   
    connect target /
    crosscheck archivelog all; 
    delete noprompt expired archivelog all;
    exit
    EOF
    echo `date`
    Best Regards
    mseberg
    h2. Another Standby Option
    /u01/app/oracle/dba_tool/bin/removestandbyarch.sql
    SET echo off
    SET feedback off
    SET term off
    SET pagesize 0
    SET linesize 200
    SET newpage 0
    SET space 0
    col name format a120
    spool /u01/app/oracle/dba_tool/bin/rm_arch_standby.sh
    select 'rm '||NAME from v$archived_log 
    where REGISTRAR='RFS'
    and APPLIED='YES'
    and DELETED='NO' 
    and COMPLETION_TIME < (SYSDATE-10);  
    SPOOL OFFMain shell script
    /u01/app/oracle/dba_tool/bin/removestandbyarch.sh
    #!/bin/bash
    if [ "$1" ]
    then DBNAME=$1
    else
    echo "basename $0 : Syntax error : use . removestandbyarch <DBNAME> "
    exit 1
    fi
    # Set the Environmental variable for input instance ( ORACLE_SID, ORACLE_HOME path etc )
    . /u01/app/oracle/dba_tool/env/${DBNAME}.env
    $ORACLE_HOME/bin/sqlplus /nolog <<EOF
       connect / as sysdba
      -- spool /u01/app/oracle/dba_tool/bin/rm_arch_${ORACLE_SID}.sh
       @/u01/app/oracle/dba_tool/bin/removestandbyarch.sql
       SPOOL OFF
    EOF
    echo `date`
    # Now run the generated  script 
    echo "Setting permissions and running script"
    chmod 740 /u01/app/oracle/dba_tool/bin/rm_arch_standby.sh
    . /u01/app/oracle/dba_tool/bin/rm_arch_standby.sh
    # Use RMAN to update V$ARCHIVED_LOG.DELETED 
    echo `date`
    echo "Runnung RMAN archive crosscheck"
    $ORACLE_HOME/bin/rman <<EOF   
    connect target /
    crosscheck archivelog all; 
    delete noprompt expired archivelog all;
    exit
    EOF
    echo `date`Edited by: mseberg on Apr 30, 2012 8:40 AM

  • GPP Delete policy not working on Windows Server 2008 R2 RDS when deleting shared printers with status access denied.

    Hi!
    I Have one AD Security group for each shared printer, I have one GPP that map the printer if the user is in the security group that belong to the printer. And one GPP to delete the printer if the user is NOT member of the security group. The security group
    is also applied in “Security” tab on the printsrv with PRINT rights  and “everyone” is removed. This works 100 % on Windows 7 clients and Windows 2003 Terminal Servers. But on Windows 2008 R2 RDS this dont work.The Delete Policy will not delete the shared
    printer. No warning in any logs, and the gpresult shows that the gpo setting applyed sucessfully. The only way I can make the Delete policy work is if i give the user print rights on the printer on the printsrv. Looks like for the policy to work on 2008
    R2 the user must have print rights on the printer object on the printserver. The GPP Delete Policy will not delete printers that have status : access denied. Anyone else had this problem?

    Hi,
    Based on your description, it seems that we need to give users appropriate permissions, for the error
    Access is denied is more or less related to permissions.
    However, we can avoid deploying the GPP printer delete policy. As far as I know, we can use Item-Lvel Targeting of GPP to push the shared printers
    to the targeted users or groups.
    Regarding ILT, the following articles can be referred to for more information.
    Preference Item-Level Targeting
    http://technet.microsoft.com/en-us/library/cc733022.aspx
    Security Group Targeting
    http://technet.microsoft.com/en-us/library/cc772471.aspx
    Best regards,
    Frank Shen

  • How do I setup RMAN not to delete archive log files on the source database so GoldenGate can process DDL/DML changes?

    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

  • RMAN-05021 configuring retention policy on standby

    Hello all.
    Running Oracle 11.2.0.2 on Linux (x64); single-node instance.
    We've the following setup:
    bvlive (PRIMARY)
    bvstby2 (STANDBY)
    We currently have a retention policy of 21 days, and backup space on the standby is starting to be an issue.
    Initially, I thought I could reconfigure this on the standby - but RMAN won't allow this:
    STANDBY:
    RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 14 days;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of configure command at 10/15/2012 10:09:50
    RMAN-05021: this configuration cannot be changed for a BACKUP or STANDBY control fileWhich makes sense when I think about it. I saw this thread retention policy is not configure but get different results:
    PRIMARY:
    RMAN> configure retention policy to recovery window of 14 days;
    old RMAN configuration parameters:
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 21 DAYS;
    new RMAN configuration parameters:
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 14 DAYS;
    new RMAN configuration parameters are successfully stored
    RMAN> show all;
    RMAN configuration parameters for database with db_unique_name BVLIVE are:
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 14 DAYS;STANDBY:
    RMAN> SHOW ALL;
    RMAN configuration parameters for database with db_unique_name BVSTBY2 are:
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 21 DAYS;Which also makes sense; so I'm not convinced the original poster solved his problem. I've seen a few threads about this which involve:
    1. shutting down standby
    2. configuring retention policy on primary
    3. taking a backup controlfile from primary
    4. copying it across to the standby
    5. restarting standby using the backed-up controlfile
    But then this seems to be for RAC, which we're not using.
    It occurred to me that I could use the KEEP UNTIL option when taking backups, but ran into; ORA-19811: cannot have files in DB_RECOVERY_FILE_DEST with keep attributes (i.e. I can't use KEEP and store backups in the FRA).
    Can anyone please advise on the best way to get the retention period down on the standby, ideally without having to rebuild the standby from scratch?
    Thanks,
    Ray
    Edited by: ray_h on 15-Oct-2012 03:33

    Hello all.
    @ P. Forstmann: thanks for confirming.
    @ S Rao: Yep - this is the link I had in mind. Tried it out and it worked. One thing to note is that I didn't have to rename datafiles - presumably creating the standby controlfile negates the need for this in 11g (indeed, the alert log shows these two lines when you mount):
    Set as converted control file due to db_unique_name mismatch
    Changing di2dbun from bvlive to bvstby2which put my mind at ease when the rename commands failed, saying the files didn't exist
    @ mseberg: Typically, our MOS license ran out just as a useful link shows up.
    Thanks everyone.
    Ray

Maybe you are looking for