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

Similar Messages

  • 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

  • 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

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

  • 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

  • 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

  • ArchiveLog deletion using RMAN

    Hi,
    My backup failed for some time due to disk space issue which I was able to fix using setting db_recovery_file_dest_size but after the completion of backup script it didn't delete all the archivelog files. I still have log files from 05 Jan 2011 - 20 Feb 2011, but log files from 21 Feb 2011 - 18 Apr 2011 were deleted, When I run "crosscheck archivelog all;" it didn't show me archivelogs between 05 Jan 2011 - 20 Feb 2011 in the results but physically they are present in the archive folder.
    1 How to delete these archive files to free up disk space?
    2 Can I restore my database from last backup which was successful?
    3 Why the RMAN was unable to delete my archivelog files?
    My retention policy is set to Redundancy 1.
    Thanks,
    Prashanth

    The older archivelogs are no longer in the control file if they are not being reported by CROSSCHECK.
    Normally, when the FRA is close to 100% usage, Oracle can automatically purge known obsolete files. However, if you resized the FRA before the files were auto-purged and, subsequently, they became older than the keep time, Oracle became "unaware" of them.
    You could re-CATALOG them with a CATALOG command and then DELETE them, with a DELETE command.
    Hemant K Chitale

  • Archivelogs deleted in RAC ASM Production for standby

    Hi,
    DB: 10.2.0.4
    OS: AIX 5.3 L
    This is 2 node RAC ASM database with single standby on ASM.
    I set the retention policy to 2 days for my Live database.While running the TAPE backup script, the archivelogs were deleted .The deleted archivelogs are generated just before /while the TAPE backup.Backup script has not considered the retention policy for Primary.All archivelogs , except generated after backup ,were deleted .
    Now my standby is waiting for deleted archivelogs.
    How do i can make sync of my standby with Primary ?.
    Please understand my position and request you to help me on this.
    Regards,
    Sunand
    Edited by: sunand on Jan 22, 2011 3:15 AM

    Hi Jean & Abhi,
    Thanks you very much for your reply.
    I came out the problem with following taking the backup of incremental from standby SCN value.
    Actually i did not have backup of deleted archivelog .Now my standby database is in sync with primary and working fine.
    About recovering of deleted archivelog from backup piece, If i run below script , whether it will recover the specified archivelogs to our archivelog destination or will recover to database ?.I never done this before.Could you explain me ,please.
    run
    allocate channel t1 type sbt.....;
    restore archivelog from sequence X until sequence Y thread 1;
    Also, my database is on ASM. Once we recover the archivelogs,how do i can move to standby?.I mean , moving them from ASM to file system and registering to standby database .
    Thank you very much,
    Regards,
    Sunand

  • Problem in Converting Database into Archivelog mode (Oracle 10G)

    Hi Team,
    I come across a strange problem in the ORACLE 10G Server.
    I am converting database mode from NoArchivelog to Archivelog mode through RMAN in 10G.
    Now When I execute these following commands through RMAN prompt it works properly as shown below?
    C:\>rman
    Recovery Manager: Release 10.2.0.1.0 - Production on Thu Nov 30 18:01:08 2006
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    RMAN> connect target /
    connected to target database: RAVI (DBID=4025722893, not open)
    RMAN> shutdown immediate;
    using target database control file instead of recovery catalog
    database dismounted
    Oracle instance shut down
    RMAN> STARTUP MOUNT;
    connected to target database (not started)
    Oracle instance started
    database mounted
    Total System Global Area 167772160 bytes
    Fixed Size 1247876 bytes
    Variable Size 79693180 bytes
    Database Buffers 79691776 bytes
    Redo Buffers 7139328 bytes
    RMAN> SQL 'ALTER DATABASE ARCHIVELOG';
    sql statement: ALTER DATABASE ARCHIVELOG
    RMAN> ALTER DATABASE OPEN;
    database opened
    RMAN>
    But this same script when i writes in the backup.ora file & pass to Rman prompt it fails,
    File backup.ora contains...
    run
    SHUTDOWN IMMEDIATE;
    STARTUP MOUNT;
    SQL 'ALTER DATABASE ARCHIVELOG';
    ALTER DATABASE OPEN;
    passed to RMAN as follows...
    C:\OracleCode\BACKUP>"C:\oracle\product\10.2.0\db_1\bin\RMAN.EXE" target /"connect target SYSTEM/sreedhar@RAVI" log="C:\ORACLE~2\LOGS\backup_log.log" append cmdfile="C:\ORACLE~2\BACKUP\backup.ora"
    RMAN> 2> 3> 4> 5> 6> 7> 8>
    then it fails giving the following errors...
    using target database control file instead of recovery catalog
    database closed
    database dismounted
    Oracle instance shut down
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of startup command at 11/30/2006 18:05:59
    ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
    Recovery Manager complete.
    The same thing is working in the Oracle 9i but not in the Oracle 10G.
    Can Anybody plz help me in this?
    Regards,
    S.Tiwari
    .

    export ORACLE_SID=<SID>
    rman target /cmdfile="C:\ORACLE~2\BACKUP\backup.ora"
    it will connect to the default SID, there's no such thing as a default SID, what do you mean?
    But what if there are more that one SID available & I
    want to connect to SID other than the default SID.just specify the desired SID prior starting rman.
    more over the same string is working with 9i but not
    with 10G.maybe due to a bug?
    to summarize, you have two options it you would like to start up the instance:
    either you specify the SID prior starting rman and use os authentication
    or
    you register the instance statically and use oracle authentication.
    regards,
    -ap

  • Deleted Policy from sysvol location by mistake - Group Policy Infrasturure Failure - 2008 R2

    Hello, I accidentally deleted a GPO Policy from the Policies Folder in the sysvol location. I was sure that it was not being used but was somehow causing an errors when i ran an rsop on my test machine.
    Group Policy Infrastructure failed due to the error listed below.
    The system cannot find the path specified.
    Note:  Due to the GP Core failure, none of the other Group Policy components processed their policy.  Consequently, status information for the other components is not available
    Getting it from Backup would take too long.
    There are no auditing on the DC and cant work out how to recover it now. Is there anyway to get this back? I have checked the other DCs but couldnt find the exact policy ID before replication.
    Thanks
    GP 2008 R2

    > *Group Policy Infrastructure failed due to the error listed below.*
    > *The system cannot find the path specified.*
    gpotool.exe is a handy tool for this :) Download at MS.
    Martin
    Mal ein
    GUTES Buch über GPOs lesen?
    NO THEY ARE NOT EVIL, if you know what you are doing:
    Good or bad GPOs?
    And if IT bothers me - coke bottle design refreshment :))

  • Rman error when i am doing backup archivelog delete input

    archive log filename=+FRA01/osondemand/archivelog/2012_02_27/thread_2_seq_15028.7182.776323223 recid=122876 stamp=77
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03009: failure of backup command on ORA_DISK_2 channel at 02/27/2012 05:23:14
    RMAN-10015: error compiling PL/SQL program
    RMAN-10033: error during compilation of job step 3: ORA-00603: ORACLE server session terminated by fatal error
    ORA-04030: out of process memory when trying to allocate 272 bytes (PL/SQL DIANA,PTG: No
    10.2.04
    windows
    two node rac
    please help me with above error
    thanks for help

    Hi;
    Duplicate post:
    rman error when taking backup archivelog all delete input
    Please close your othere thread as answered and keep updating your other thread here
    Regard
    Helios

  • Accidentally deleted oracle 10g  file with rm command

    Hi all,
    please help me, i have accidentally deleted file with rm command yesterday now below error is given
    ORA-01110: data file 64: '/u01/app/oracle/product/10g/dbs/test
    ORA-27041: unable to open file /u01/app/oracle/product/10g/dbs/test
    SVR4 Error: 2: No such file or directory
    /u01/app/oracle/product/10g/dbs
    database is still open and below is the information of deleted datafile:
    select * from dba_data_files where file_id=64
    FILE_NAME     FILE_ID     TABLESPACE_NAME     BYTES     BLOCKS     STATUS     RELATIVE_FNO     AUTOEXTENSIBLE     MAXBYTES     MAXBLOCKS     INCREMENT_BY     USER_BYTES     USER_BLOCKS     ONLINE_STATUS
    /u01/app/oracle/product/10g/dbs/test     64     test     67,645,734,912     4,128,768     AVAILABLE     64     YES     68,719,443,968     4,194,302     1     67,645,538,304     4,128,756     ONLINE

    user3240461 wrote:
    Hi all,
    please help me, i have accidentally deleted file with rm command yesterday now below error is given
    ORA-01110: data file 64: '/u01/app/oracle/product/10g/dbs/test
    ORA-27041: unable to open file /u01/app/oracle/product/10g/dbs/test
    SVR4 Error: 2: No such file or directory
    /u01/app/oracle/product/10g/dbs
    database is still open and below is the information of deleted datafile:
    select * from dba_data_files where file_id=64
    FILE_NAME     FILE_ID     TABLESPACE_NAME     BYTES     BLOCKS     STATUS     RELATIVE_FNO     AUTOEXTENSIBLE     MAXBYTES     MAXBLOCKS     INCREMENT_BY     USER_BYTES     USER_BLOCKS     ONLINE_STATUS
    /u01/app/oracle/product/10g/dbs/test     64     test     67,645,734,912     4,128,768     AVAILABLE     64     YES     68,719,443,968     4,194,302     1     67,645,538,304     4,128,756     ONLINEhttp://www.lmgtfy.com/?q=oracle+open+DB+missing+file

Maybe you are looking for

  • Error "Failed To Connect To An Exchange Server In The Current Site" While Running Exchange 2013 Shell

    hi I've installed Exchange 2013 on Windows Server 2012 and it reported as successfully installed. I see no issues with Exchange Setup Logs. On trying to connect to Exchange Management Shell I receive errors and I am unable to connect. New-PSSession :

  • LOV problem : here is my code

    Hello all, I've been trawling through the forums trying to find a solution to this problem but with no success. I am trying to create an LOV for my application, the Activity_Plan_ObjectView1_Update page accesses the LOV (via LocationLOV.uix) which is

  • Changed home folder name, how do I get my desktop back?

    I changed the home folder name and when I logged off and then back on to the computer, my desktop was completely different. I was told by apple care that it had to be corrected through the command lines. I would greatly appreciate someone's help with

  • Report to Export in Excel

    Hi, I am working in APPs. We have a report in PDF output. Who to export the data from PDF output to Excel output in APPs. Is there any parameter initilization like desformat to excel and get the output into excel.

  • Changing task name issues

    When we change a task name mid-project life, and then run a resource assignment query, we see tasks listed with the former task name. For example, orginal task name = "Finish part 4", updated task name - " Finish part 4 - job 655".  We update the tas