Delete archivelogs on a manual standby with RMAN

Hi,
Using Oracle 10.2.0.3 Standard Edition, I created a manual physical standby database with a standby controlfile. FRA is configured on both servers.
I want to use RMAN (recovery catalog in the controlfile) to delete archivelogs on the standby server using the following command:
rman target /
delete archivelog until time 'sysdate-5';
The synchronisation is monitored on a daily basis so there's no risk to delete an archivelog that is not applied.
My question: Is there a risk of corruption of the RMAN catalog (in the controlfile) in the event of a failover? I mean, will I be able to perform my RMAN backup as it becomes the primary?
Thanks
Christophe

I don't see a problem with this statement. In 10g - even when a controlfile is missing backup information for whatever reason - backups can be recataloged.
Werner

Similar Messages

  • Recovery Logical Standby with RMAN

    Hi All,
    I have a test environment with Primary DB Server, Physical Standby and Logical Standby.
    The Logical Standby DB (cur_log_stdb) is backed up every evening by RMAN and I have a question:
    If I recover my Logical Standby DB from backup and switch replication to new Logical Standby DB (new_log_stdb) it will work or not?
    My steps e.g.:
    1. Make a new server for my new_log_stdb and repair structure of catalogs;
    2. Repair listener.ora and tnsnames.ora files from cur_log_stdb to new_log_stdb;
    3. Restore DB with RMAN from backup to new_log_stdb;
    4. On cur_log_stdb execute "alter database stop logical standby apply";
    5. Change a DNS name from cur_log_stdb to new_log_stdb;
    6. On new_log_stdb execute "alter database start logical standby apply immediate";
    I'm not sure that archivelogs will apply to the new_log_stdb for period since rman backup was created.
    Configuration:
    Oracle Linux 6.4
    Oracle Database 11.2.0.3
    Primary and Physical with Data Guard

    You might get better responses in the DataGuard forum ("space").
    I am sceptical if this plan would work.
    Hemant K Chitale

  • Rebuild RAC phsical standby with RMAN

    Hi all,
    Can anyone give any advice as to rebuilding an ACTIVATED RAC physical standby using RMAN? We have been able to revert the db with flashback but I need to know the rebuild method.
    Is there any extra steps with the OCR?
    I am guessing the steps might be:
    1. Use DBCA to delete the newly activated standby.
    (The DBCA will clean up the OCR components)
    2. Use RMAN to duplicate a physical standby database.
    3. Register the instances and services with the OCR.
    Can any comment on this and suggest a decent task list from oracle as to the method.
    Thanks in advance,
    jd
    Edited by: jonnyd on 30-May-2010 13:42

    ...anyone...?

  • Oracle 3113 creating a standby with rman

    Hello,
    environment is 11gR2 on Linux.
    Tested on CentOS 5.5 as OS and local LAN as interconnect and the duplicate command terminates successfully in some minutes.
    Same script but using oel 5.5 and a wan (3Mbit/s) and I keep getting 3113 errors after about 2h or 3h.
    I suspect some timeout on wan (that is over vpn) but I would also like to trace something at my side.
    I run a shell script with nohup and send it to background and this is the log, from which you can see the rman script:
    Recovery Manager: Release 11.2.0.1.0 - Production on Tue Sep 7 14:50:11 2010
    Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
    RMAN>
    connected to target database: TESDB1 (DBID=11492743)
    RMAN>
    connected to auxiliary database: DUMMY (not mounted)
    RMAN>
    RMAN> run{
    2> allocate channel prmy1 type disk;
    3> allocate auxiliary channel stby1 type disk;
    4> duplicate target database for standby from active database
    5> spfile
    6> parameter_value_convert 'TESDB1','TESDB1DR'
    7> set db_file_name_convert='/TESDB1/','/TESDB1DR/'
    8> set log_file_name_convert='/TESDB1/','/TESDB1DR/'
    9> set 'db_unique_name'='TESDB1DR'
    10> set control_files='/app/oradata/TESDB1DR/control01.ctl','/app/oradata/flash_recovery_area/TESDB1DR/control02.ctl'
    11> set db_recovery_file_dest='/app/oradata/flash_recovery_area'
    12> set DB_RECOVERY_FILE_DEST_SIZE='4977M'
    13> nofilenamecheck;
    14> }
    using target database control file instead of recovery catalog
    allocated channel: prmy1
    channel prmy1: SID=12 device type=DISK
    allocated channel: stby1
    channel stby1: SID=135 device type=DISK
    Starting Duplicate Db at 07-SEP-10
    executing Memory Script
    executing command: SET NEWNAME
    renamed tempfile 1 to /app/oradata/TESDB1DR/temp01.dbf in control file
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    Starting backup at 07-SEP-10
    channel prmy1: starting datafile copy
    input datafile file number=00003 name=/app/oradata/TESDB1/undotbs01.dbf
    .. after about three hours (and 3.2Gb transferred) it continues with:
    RMAN-03009: failure of backup command on prmy1 channel at 09/07/2010 17:53:49
    RMAN-06136: ORACLE error from auxiliary database: ORA-03113: end-of-file on communication channel
    Process ID: 3187
    Session ID: 192 Serial number: 3
    continuing other job steps, job failed will not be re-run
    .. after 15 minutes:
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 09/07/2010 18:09:35
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-03009: failure of backup command on clone_default channel at 09/07/2010 18:09:34
    RMAN-10038: database session for channel clone_default terminated unexpectedly
    RMAN> **end-of-file**
    RMAN>
    Recovery Manager complete.
    the undo tbs is 3.2 Gb so I'm not sure if the 3113 happens at the end of copy... but the tablespace doesn't succeed
    and the other jobs don't start even if it says "continuing other job steps"..
    rman started at 14:50 and in listener at dr site I have:
    Tue Sep 07 14:50:55 2010
    07-SEP-2010 14:50:55 * service_update * TESDB1DR * 0
    07-SEP-2010 14:50:55 * (CONNECT_DATA=(SERVICE_NAME=TESDB1DR)(CID=(PROGRAM=oracle)(HOST=lb-orajde.boiron.ntm)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.49.1.93)(PORT=35240)) * establish * TESDB1DR * 0
    Tue Sep 07 15:00:58 2010
    07-SEP-2010 15:00:58 * service_update * TESDB1DR * 0
    Tue Sep 07 16:35:04 2010
    07-SEP-2010 16:35:04 * service_update * TESDB1DR * 0
    Tue Sep 07 17:02:04 2010
    07-SEP-2010 17:02:04 * service_update * TESDB1DR * 0
    07-SEP-2010 17:02:10 * service_update * TESDB1DR * 0
    Tue Sep 07 17:53:17 2010
    07-SEP-2010 17:53:17 * service_update * TESDB1DR * 0
    Tue Sep 07 18:09:00 2010
    07-SEP-2010 18:09:00 * (CONNECT_DATA=(SERVICE_NAME=TESDB1DR)(CID=(PROGRAM=rman)(HOST=lb-orajde.boiron.ntm)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.49.1.93)(PORT=32610)) * establish * TESDB1DR * 0
    In alert.log at dr site I have at 17:02 (about 50 minutes before error):
    Tue Sep 07 15:05:01 2010
    db_recovery_file_dest_size of 4977 MB is 0.00% used. This is a
    user-specified limit on the amount of space that will be used by this
    database for recovery-related files, and does not reflect the amount of
    space available in the underlying filesystem or ASM diskgroup.
    Tue Sep 07 17:02:03 2010
    Fatal NI connect error 12170.
    VERSION INFORMATION:
    TNS for Linux: Version 11.2.0.1.0 - Production
    Oracle Bequeath NT Protocol Adapter for Linux: Version 11.2.0.1.0 - Production
    TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.1.0 - Production
    Time: 07-SEP-2010 17:02:03
    Tracing not turned on.
    Tns error struct:
    ns main err code: 12535
    TNS-12535: TNS:operation timed out
    ns secondary err code: 12560
    nt main err code: 505
    TNS-00505: Operation timed out
    nt secondary err code: 110
    nt OS err code: 0
    Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=10.49.1.93)(PORT=35226))
    some times (always at 17:02) and nothing more
    In alert.log at primary site:
    Tue Sep 07 14:50:36 2010
    Clearing standby activation ID 11529351 (0xafec87)
    The primary database controlfile was created using the
    'MAXLOGFILES 16' clause.
    There is space for up to 13 standby redo logfiles
    Use the following SQL commands on the standby database to create
    standby redo logfiles that match the primary database:
    ALTER DATABASE ADD STANDBY LOGFILE 'srl1.f' SIZE 52428800;
    ALTER DATABASE ADD STANDBY LOGFILE 'srl2.f' SIZE 52428800;
    ALTER DATABASE ADD STANDBY LOGFILE 'srl3.f' SIZE 52428800;
    ALTER DATABASE ADD STANDBY LOGFILE 'srl4.f' SIZE 52428800;
    Tue Sep 07 16:00:40 2010
    Thread 1 advanced to log sequence 759 (LGWR switch)
    Current log# 3 seq# 759 mem# 0: /app/oradata/TESDB1/redo03.log
    Tue Sep 07 16:00:41 2010
    Archived Log entry 528 added for thread 1 sequence 758 ID 0xafec87 dest 1:
    In sqlnet.log of primary site:
    Tue Sep 07 17:53:49 2010
    Fatal NI connect error 12170.
    VERSION INFORMATION:
    TNS for Linux: Version 11.2.0.1.0 - Production
    TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.1.0 - Production
    Time: 07-SEP-2010 17:53:49
    Tracing not turned on.
    Tns error struct:
    ns main err code: 12535
    TNS-12535: TNS:operation timed out
    ns secondary err code: 12560
    nt main err code: 505
    TNS-00505: Operation timed out
    nt secondary err code: 110
    nt OS err code: 0
    Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.12.41)(PORT=1521))
    and the same at 18:09
    No other errors.
    Any hints?
    BTW: what is the minimum size of undo tbs? Can I have compression enabled also during duplication if transport service is configured with COMPRESSION=ENABLED, or does it count only when copying redo files?
    Thanks in advance,
    Gianluca

    Thanks for your reply.
    I will try your suggestion as it could come useful some time.
    So with this alternate method at the end I would have standby aligned as of backup time, correct?
    And after running something like this on standby:
    SQL> alter database recover managed standby database disconnect from session;
    It will begin to receive, archive and apply redo logs, correct?
    Some answers regarding the original question. It was confirmed that there was a 2hours cut-off time at firewall level.
    The first datafile that the rman session began to copy was 3.2Gb in size, taking more than 2 hours completing.
    Monitoring with netstat on source and target I saw this at source during the duplicate process:
    tcp 0 0 10.49.1.93:46626 192.168.12.41:1521 ESTABLISHED
    tcp 0 0 10.49.1.93:46627 192.168.12.41:1521 ESTABLISHED
    tcp 0 0 10.49.1.93:46629 192.168.12.41:1521 ESTABLISHED
    tcp 0 369240 10.49.1.93:50371 192.168.12.41:1521 ESTABLISHED
    and the session bound to port 50371 was the only one pushing data (send queue not empty).
    The other 3 ones I presume are for control of rman session. I get 3 sessions even if I open only one channel on primary side.
    After the first datafile completes copy, a new session (with port 14871) is established substituting the other one.
    The three initial ones instead remain for all the duplicate process.
    tcp 0 487872 10.49.1.93:14871 192.168.12.41:1521 ESTABLISHED
    tcp 0 0 10.49.1.93:46626 192.168.12.41:1521 ESTABLISHED
    tcp 0 0 10.49.1.93:46627 192.168.12.41:1521 ESTABLISHED
    tcp 0 0 10.49.1.93:46629 192.168.12.41:1521 ESTABLISHED
    So after the copy of the first file, the session come back to one or more of the initial 3 ones, and they probably make a push-ack, got a 3113 as the firewall has silently cut them after 2 hours.... and the datafile, even if completed, is not marked as completed. A new run would copy again it...
    Now the time has been put to 8hours, with 24hours being the maximum value set (no disable possible as far as the network guy said...).
    And the duplicate completed correctly.
    Would I have to fear any problems with this cut-off due to "normal" dataguard operations or not, in your opinion?
    Thanks
    Gianluca

  • Physical standby with rman: location of redo logs

    guys,
    i use simple rman commands to create a physical standby database (i've attached the commands below). the problem is that on the physical standby, the location of the redo logs and standby redo logs differ from the primary.
    (we use redo logs and standby redo logs as we are running in max. availability mode and want to be prepared for switchover/failover).
    how do i backup/restore the database in a way that the redo logs are at the same place than on the primary database?
    thanks for your help,
    heri
    backup on primary:
    backup incremental level = 0 format '/tmp/transfer/td_%s_%p.bck' database;
    restore on standby:
    duplicate target database for standby NOFILENAMECHECK;

    Ogan,
    thanks alot for your reply. I was not using the log_file_name_convert parameter as i am not aware how to use it in this scenario. the log files on the standby are generated randomly.
    on the primary the log files are as follows:
    /home/oracle/app/oracle/oradata/td/redo01.log
    /home/oracle/app/oracle/oradata/td/redo02.log
    /home/oracle/app/oracle/oradata/td/redo03.log
    /home/oracle/app/oracle/oradata/td/standby_redo01.log
    /home/oracle/app/oracle/oradata/td/standby_redo02.log
    /home/oracle/app/oracle/oradata/td/standby_redo03.log
    on the standby the logs look like:
    /home/oracle/app/oracle/product/11.2.0/dbhome/dbs/TDSTBY/onlinelog/o1_mf_1_6b1f9mvc_.log
    /home/oracle/app/oracle/product/11.2.0/dbhome/dbs/TDSTBY/onlinelog/o1_mf_2_6b1f9p36_.log
    /home/oracle/app/oracle/product/11.2.0/dbhome/dbs/TDSTBY/onlinelog/o1_mf_3_6b1f9rdj_.log
    /home/oracle/app/oracle/product/11.2.0/dbhome/dbs/TDSTBY/onlinelog/o1_mf_4_6b1f9v8r_.log
    /home/oracle/app/oracle/product/11.2.0/dbhome/dbs/TDSTBY/onlinelog/o1_mf_5_6b1f9xms_.log
    /home/oracle/app/oracle/product/11.2.0/dbhome/dbs/TDSTBY/onlinelog/o1_mf_6_6b1f9zxv_.log
    the filenames on the standby are not predictable for me in any way, so how would i use log_file_name_convert?
    thanks alot for your help!

  • How to delete archivelog with RMAN in the Primary and Standby database?

    Hello,
    I am working on Oracle 10gR2.
    My question is :
    How could I implement a automatized and secure way of:
    1) Delete archivelogs on my PRIMARY server only when these logs are successfully TRANSFERED to all my standby databases?
    2) Delete archivelogs on my STANDBY server only when these logs are sucessfully APPLIED to the database?
    Thanks a lot for your help!

    on 10G
    CONFIGURE ARCHIVELOG DELETION POLICY TO [CLEAR | NONE | APPLIED ON STANDBY];
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/rman.htm#CHDBEICE
    Coskan Gundogar
    http://coskan.wordpress.com

  • RMAN in 10g database deletes archivelog files before standby receives them

    Hi all,
    We currently have problem with our Oracle 10gR1 database on Windows 2000 server in that the RMAN backups on the primary database delete archivelogs before the standby database can receive current and new archivelogs from primary database. What happens is that RMAN backs up the archivelogs and deletes them from disk before the archivelogs are sent to the standby. The standby then looks for these archivelogs on the primary but is unable to locate them. Whenever this happens, the production database (primary) hangs and we have to restart the instance on the primary. We have our Data Guard setup in maximum performance mode so this should not happen.
    As a short term fix, we have changed the backups to have RMAN backup and delete the archive logs 15 minutes older than current time so that the standby can receive the logs and not have problems. Besides this fix is there a long term solution to the problem or is it a bug in Oracle 10g? The issue came up after we upgraded from 9i to 10g and never saw it before in 9i with RMAN and Data Guard physical standby databases.
    Thanks
    Ben Prusinski, Oracle DBA

    thanks for answer...
    did you managed to make it 'work'?
    according to doc. if set on standby it should:
    <>
    Then, these files are eligible for deletion:
    Archived redo log files in the flash recovery area that
    were applied on the standby database.
    <>
    and this is to my understanding irespective to retention policy...unfortunately report obsolete does not report applied archived logs as eligable for deletion.
    How this works in your case?
    regards.
    goran

  • Manual Standby Database not in sync with missing archivelogs

    Hello,
    OS: Solaris
    DB: Oracle 11.2.0.1 EE
    Not Using ASM or RAC
    I have a Production database that is in archivelog mode and a Standby DR server.
    Both servers (Prod, Standby) have exact same structure and db name/version.
    We manually scp archive logs and recover them to a manual standby database via SQL Scripts "cron". (I.E. set autorecovery on; recover standby database;)
    We recently got out of sync with our log files and have not been applying them to the standby. As part of Prod Maintenance, these log files were deleted and are not available anymore.
    I've tried several ways to "rebuild" our standby database. I have tried to Shutdown prod, backup all the db files and scp them to standby, re-create standby controlfile and startup mount and recover standby.
    Every time I try to apply a new archive log via recover standby, these are the errors:
    ORA-00279: change 211077622 generated at 1/27/2012 12:18:42 needed for thread 1
    ORA-00289: suggestion : /oradump/arch/PROD/PROD_arch_1_69486_736618850.arc
    ORA-00280: change 211077622 for thread 1 is in sequence #69486
    ORA-00308: cannot open archived log '/oradump/arch/PROD/PROD_arch_1_69486_736618850.arc'
    ORA-27037: unable to obtain file status
    SVR4 Error: 2: No such file or directory
    Additional information: 3
    ORA-10879: error signaled in parallel recovery slave
    ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
    ORA-01152: file 1 was not restored from a sufficiently old backup
    ORA-01110: data file 1: '/oradevices/PROD/oraPRODsystem1.dbf'
    When I check v$log_history, the new logs have not been applied.
    I've also tried the "Restore from incremental backup via SCN" method with same results.
    Is there a way to re-create the standby clean and ensure that the log chain that is currently broken gets fixed or reset?
    I would eventually like to get DataGuard in here, but that's not the case at the moment.
    Thanks for your suggestions.
    -Dav

    if you are using the cold backup to create the standby database, Check that have you followed the following steps or not.
    1. remove
    all the datafiles and controlfiles from the standby database.
    2. Create a new standby controlfile of the production for standby using the following cmd
    'alter database create standby controlfile as 'Location';'
    3. move the new controlfile to standby database server location as specified in initialization parameter file.
    4. Restore all the datafiles to its appropriate loaction which was taken through cold backup.
    5. startup nomount
    6. alter database mount standby database;
    7. recover standby database.
    scp the archive log sequence that is asked by the database, from production.
    You can try this steps.

  • Deleting standby old redologs when make a backup with rman

    Hello friends,
    I like to know how to use the commando delete noprompt obsolete with the standby database using rman, if I use rman says cant use that command with a standby db using dataguard, I switchover to a primary and then lauch the command but always is the same message on RMAN.
    How I can use rman to make a backup and then delete old´s log?, I have no problem with the primary DB, the hard disk is filling with old logs on the standby side and i dont know how to delete in the better place like rman does with the primary with the command delete noprompt obsolete.
    Thanks.

    Hi!
    In the primary database You must continue with Your backup routine, using rman ( backuping archives and then deleting it)
    On the standby database You may use this script to delete applied archived redo logs.
    #!/bin/ksh
    export ORACLE_SID=<SID OF STBY DATABASE>
    role=`
    echo "set echo off";
    echo "set feedback off ";
    echo "set pages 0";
    echo "set head off";
    echo 'select DATABASE_ROLE from v$database;'
    echo "exit";
    } | sqlplus -s '/ as sysdba'
    `
    if [ "$role" = 'PHYSICAL STANDBY' ]; then
    echo "set echo off";
    echo "set feedback off ";
    echo "set pages 0";
    echo "set head off";
    echo "select thread#,sequence# ";
    echo 'from v$archived_log';
    echo "where standby_dest = 'NO' and deleted = 'NO' and APPLIED = 'YES';";
    echo "exit";
    } | sqlplus -s '/ as sysdba' | while read line
    do
    thread=`echo "$line"|awk '{print $1}'`
    sequence=`echo "$line"|awk '{print $2}'`
    echo "crosscheck archivelog sequence $sequence thread $thread;"
    echo "delete noprompt archivelog sequence $sequence thread $thread;"
    done | rman target /
    else
    echo "database not a physcial standby"
    fi
    Regards,
    Cerreia
    Edited by: ecerreia on Sep 22, 2009 2:18 PM

  • Delete archivelogs with rman

    I have this setting on one database: 10.2.0.3 on linux x86
    CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
    When a backup occurs, i issue the following at the end:
    delete noprompt obsolete device type disk;
    Which delete an old backup and old archivelogs on the server.
    Situation: It happen rarely, but still, sometimes, I have to manualy delete archivelogs to make space.
    Here is what i do: Ensure that the archivelogs which I am about to delete are backed up.
    Then I issue the following Rman command:
    crosscheck archivelog all;
    delete noprompt expired archivelog all;
    which tells Rman that the archivelogs are not on the os anymore.
    Is there a way to delete archivelogs with rman or oracle, not manually on the os?
    note: i do not want to delete a backupset will doing so.
    This is temporary solution. More disk space is comming and new backup scenario will be in place for this database.

    Exists many ways to make this, as:
    DELETE NOPROMPT FORCE COPY OF ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE-1';
    or
    BACKUP ARCHIVELOG all DELETE ALL INPUT;
    or
    BACKUP ARCHIVELOG all NOT BACKED UP 2 TIMES DELETE ALL INPUT;
    ...

  • How to automatically delete archivelogs on standby using RMAN?

    Hello team. I just setup a physical standby on windows environment. The primary database is been backed up via RMAN and everything works fine except that the archivelogs moved to standby site are not been deleted.
    I couldn't find some rman option to add to the scripts to take care of this issue.
    Environment:
    Windows 2003 server 32bits
    Oracle Database 9.2.0.8
    Thanks in advance!

    If you were using 10g or later you could use a deletion policy as per Oracle support note ID 728053.1.
    In 9i you need to schedule an RMAN job or shell script to delete these archives, e.g.:
    RMAN> delete archvielog all completed before 'sysdate-1';
    I have not tried it, but you can schedule also a PL/SQL script to take care of this, e.g.:
    http://www.dbasupport.com/forums/archive/index.php/t-18680.html
    http://gnjatovic.blogspot.com/2011/03/delete-applied-arhivelogs-on-standby.html

  • How to Create Manual Standby for a Oracle 11g RAC with ASM to Single Instan

    Hi All,
    I have a task to configure a Single Instance Standby Database with ASM for 2-node Primary RAC+ASM database.
    Version using : 11.1.0.6 Oracle 11g --- *" STANDARD EDITION "* Please note datagaurd will not be supported in standard edition.
    Primary database - 2 -Node RAC using ASM storage (All datafiles, redologs, controfile and archive logs)
    Need to setup a single instance standby database manually and than using scripts to transfer the archive logs from primary server to standby server to do recovery time to time.
    Please let me know if there are any configuration document(s) which can help me to set the manual standby? or need your kind help to give your valuable ideas how to go in above situation.
    Thanks in advance

    Niall Litchfield wrote:
    El DBA wrote:
    Well if the archive logs are stored in ASM on the primary nodes, you almost definitely want to be using RMAN to access them. Then to transfer between primary and standby there are many options, this is essentially the step that Data Guard takes care of - so if you (and I) are running Standard Edition, this is the part to "worry" about.
    I'm not really sure what you mean by this:
    As in standard edition the archive destination will be on ASMI don't think the Edition of Oracle (Standard or Enterprise) dictates where and how you store your archive logs, but it's possible I've misunderstood what you mean...SE dictates that database storage for RAC will be ASM, including archive log files. Anything else is not officially supported. I haven't tested but it may be that you can use LOG_ARCHIVE_DUPLEX_DEST to specify a local filesystem for archive log files as well.
    If that doesn't work you'll have to script rman "backup as copy" jobs regularly and then transport the results of that.
    Niall Litchfield
    http://www.orawin.info/
    By the way, it seems Robert has been pretty helpful, it's polite to give him some points dude. And since this is your thread, not mine, give him a "helpful" from me too :p
    El DBA
    Incidentally if you are forced down the RMAN backup as copy route then this will likely throw your current backup retention strategy somewhat, you'll need to think carefully about when an archivelog can be deleted following backup, how many times it might be backed up and so on. I do understand, and have argued for, the use of SE RAC. I also understand and have argued for and implemented manually managed standby a number of times. However by the time your primary database is a RAC instance and you need a standby for DR etc then you really have to look very seriously at whether Standard Edition is still the right investment or not. You will be spending a lot of DBA time managing and troubleshooting this, and you will find that it is less reliable than the off the shelf solution. I suspect that you are very close to the point where an EE installation becomes a worthwhile investment here.
    Niall Litchfield
    http://www.orawin.info/

  • Problem creating physical Standby database with RMAN

    Hi All
    I am trying to learn oracle dataguard and as part of the process learning creating standby database.
    Platform : Sun-Fire-V250 Sparc, Solaris 10
    Database Version - Oracle 11R2
    I am creating standby database on same server, so directory structure is different.
    Following the instructions on Oracle site I managed to create a functional physical standby database. But I am not able to create standby database using RMAN. These are the steps that I followed-
    1.Set up all necessary parameters on primary database as done while creating physical standby database manually, eg setting force logging, creating standby logs etc.
    2.Edited parameter file on primary database as done while creating manual pysical standby database creation. Some of the changes done are-
    On Primary Database:
    *.FAL_CLIENT='orcl11020' #Primary database unique name
    *.FAL_SERVER='stdby_11' #Standby database unique name
    db_file_name_convert='/<dir>/oradata/stdby_11','/<dir>/oradata/orcl11020'
    log_file_name_convert='/<dir>/oradata/stdby_11','/<dir>/oradata/orcl11020','/<dir>/oradata/stdby_11/redo_mem','/<dir>/oradata/orcl11020/redo_mem'
    standby_file_management=auto
    *.log_archive_config='DG_CONFIG=(orcl11020,stdby_11)'
    *.log_archive_dest_1='LOCATION=/<dir>/flash_recovery_area/ORCL11020/archivelog
    VALID_FOR=(ALL_LOGFILES,ALL_ROLES) db_unique_name=orcl11020'
    *.log_archive_dest_2='SERVICE=stdby_11 LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) db_unique_name=stdby_11'
    *.LOG_ARCHIVE_DEST_STATE_1='ENABLE'
    *.LOG_ARCHIVE_DEST_STATE_2='ENABLE'
    *.LOG_ARCHIVE_FORMAT='%t_%s_%r.arc'
    *.LOG_ARCHIVE_MAX_PROCESSES=30
    Copied same pfile for standby database and modified following-
    *.control_files='/<dir>/oradata/stdby_11/stdby_11.ctl','/<dir>/fra_stdby/stdby_11/stdby_11.ctl'
    *.db_name='orcl1102'
    *.db_unique_name='stdby_11'
    *.FAL_CLIENT='stdby_11'
    *.FAL_SERVER='orcl11020'
    db_file_name_convert='/<dir>/oradata/orcl11020','/<dir>/oradata/stdby_11'
    log_file_name_convert='/<dir>/oradata/orcl11020','/<dir>/oradata/stdby_11','/<dir>/oradata/orcl11020/redo_mem','/<dir>/oradata/stdby_11/redo_mem'
    standby_file_management=auto
    *.log_archive_dest_1='LOCATION=/<dir>/fra_stdby/STDBY_11/archivelog
    VALID_FOR=(ALL_LOGFILES,ALL_ROLES) db_unique_name=stdby_11'
    *.log_archive_dest_2='SERVICE=orcl11020 LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)
    db_unique_name=orcl11020'
    3. Add relevant information in tnsnames.ora and listener.ora files and then restart listener.
    3. Created password file with same credential as primary database.
    4.Up-to-date RMAN backup of primary database available.
    5.Create standby controlfile with rman
    While primary database s open (I tried with primary database in mount mode as well)-
    $>rman catalog rman/paswd@rman target /
    RMAN> BACKUP CURRENT CONTROLFILE FOR STANDBY;
    6. Open a new terminal and startup standby database in nomount mode using parameter file created -
    $>ORACLE_SID=stdby_11
    $>export ORACLE_SID
    $>sqlplus / as sysdba
    SQL>STARTUP NOMOUNT pfile='<location/initfilename.ora'
    SQL>quit
    $> rman AUXILIARY / target sys/passwd@orcl11020 catalog rman/passwd@rman
    RMAN>DUPLICATE TARGET DATABASE FOR STANDBY DORECOVER;
    RMAN finishes without error but archive logs are not being tranported. Looking at the log, following caught my eye-
    Error 1017 received logging on to the standby
    Check that the primary and standby are using a password file
    and remote_login_passwordfile is set to SHARED or EXCLUSIVE,
    and that the SYS password is same in the password files.
    returning error ORA-16191
    FAL[client, ARC2]: Error 16191 connecting to orcl11020 for fetching gap sequence
    Errors in file /<>dir>/diag/rdbms/stdby_11/stdby_11/trace/stdby_11_arc2_24321.trc:
    ORA-16191: Primary log shipping client not logged on standby
    Errors in file /<dir>/diag/rdbms/stdby_11/stdby_11/trace/stdby_11_arc2_24321.trc:
    ORA-16191: Primary log shipping client not logged on standby
    So on both primary and standby I confirmed
    SQL> show parameter remote_login_passwordfile
    NAME TYPE VALUE
    remote_login_passwordfile string EXCLUSIVE
    To make double sure that password files are same, I shutdown both databases, delete password files and recreated with same credentials.
    Password files are called - orapworcl11020 and orapwstdby_11
    Can someone guide me where thisngs are going wrong here please.

    Not sure if I understood it clearly.
    SELECT * FROM V$ARCHIVE_GAP;
    returns no rows so there is no gap.
    But could you please explain me the result of the previous query. To catch up again, on standby when I check
    SELECT SEQUENCE#,APPLIED FROM V$ARCHIVED_LOG
    SEQUENCE# APPLIED
    75 NO
    74 NO
    76 NO
    77 NO
    I understand that though archive files have been copied across but they are not applied yet.
    On primary when I give your query -
    SELECT name as STANDBY,SEQUENCE#,applied, completion_time
    2 FROM v$archived_log
    3 where dest_id=2
    4 and sequence# BETWEEN 74 and 80;
    I get -
    STANDBY SEQUENCE# APPLIED COMPLETIO
    stdby_11 74 YES 28-JUN-11
    stdby_11 75 YES 28-JUN-11
    stdby_11 76 YES 29-JUN-11
    stdby_11 77 YES 29-JUN-11
    stdby_11 78 YES 29-JUN-11
    stdby_11 79 YES 29-JUN-11
    stdby_11 80 YES 29-JUN-11
    stdby_11 75 NO 07-JUL-11
    stdby_11 74 NO 07-JUL-11
    stdby_11 76 NO 07-JUL-11
    stdby_11 77 NO 07-JUL-11
    stdby_11 78 NO 07-JUL-11
    I have intentionally given
    sequence# BETWEEN 74 and 80
    because I know in the current incarnaion of the database, max sequence is 78.
    So my understanding is, the rows between 28-29 June are from previous incarnation, correct me if I am wrong
    Archive files of the current incarnation, since I successfully created standby database are shipped but yet to be applied - am I right?
    Then my final question is, when will these archives be applied to standby database?
    I am sorry to ask too many questions but I am just trying to understand how it all works.
    Thanks for your help again

  • 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

  • How to delete the foreign archivelogs in a Logical Standby database

    How do I remove the foreign archive logs that are being sent to my logical standby database. I have files in the FRA of ASM going back weeks ago. I thought RMAN would delete them.
    I am doing hot backups of the databases to FRA for both databases. Using ASM, FRA, in a Data Guard environment.
    I am not backing up anything to tape yet.
    The ASM FRA foreign_archivelog directory on the logical standby FRA keeps growing and nothing is get deleted when
    I run the following command every day.
    delete expired backup;
    delete noprompt force obsolete;
    Primary database RMAN settings (Not all of them)
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 9 DAYS;
    CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE DB_UNIQUE_NAME 'WMRTPRD' CONNECT IDENTIFIER 'WMRTPRD_CWY';
    CONFIGURE DB_UNIQUE_NAME 'WMRTPRD2' CONNECT IDENTIFIER 'WMRTPRD2_CWY';
    CONFIGURE DB_UNIQUE_NAME 'WMRTPRD3' CONNECT IDENTIFIER 'WMRTPRD3_DG';
    CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY;
    Logical standby database RMAN setting (not all of them)
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 9 DAYS;
    CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
    How do I cleanup/delete the old ASM foreign_archivelog files?

    OK, the default is TRUE which is what it is now
    from DBA_LOGSTDBY_PARAMETERS
    LOG_AUTO_DELETE     TRUE          SYSTEM     YES
    I am not talking about deleting the Archive logs files for the Logical database that it is creating, but the Standby archive log files being sent to the Logical Database after they have been applied.
    They are in the alert log as follows under RFS LogMiner: Registered logfile
    RFS[1]: Selected log 4 for thread 1 sequence 159 dbid -86802306 branch 763744382
    Thu Jan 12 15:44:57 2012
    *RFS LogMiner: Registered logfile [+FRA/wmrtprd2/foreign_archivelog/wmrtprd/2012_01_12/thread_1_seq_158.322.772386297] to LogM*
    iner session id [1]
    Thu Jan 12 15:44:58 2012
    LOGMINER: Alternate logfile found. Transition to mining archived logfile for session 1 thread 1 sequence 158, +FRA/wmrtprd2/
    foreign_archivelog/wmrtprd/2012_01_12/thread_1_seq_158.322.772386297
    LOGMINER: End mining logfile for session 1 thread 1 sequence 158, +FRA/wmrtprd2/foreign_archivelog/wmrtprd/2012_01_12/threa
    d_1_seq_158.322.772386297
    LOGMINER: Begin mining logfile for session 1 thread 1 sequence 159, +DG1/wmrtprd2/onlinelog/group_4.284.771760923                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Maybe you are looking for