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

Similar Messages

  • 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

  • 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

  • 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

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

  • Logical Standby recover 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.
    But if this plan won't work how can I restore Logical Standby DB from RMAN backup and resume replication from Primary?
    Configuration:
    Oracle Linux 6.4
    Oracle Database 11.2.0.3
    Primary and Physical with Data Guard

    Hello;
    The only way to know for sure is to test it. You are asking somebody you don't know to confirm a recovery test for you. You have to perform the test yourself to be certain.
    If your plan does not work you can always rebuild the Standby.
    Best Regards
    mseberg

  • 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

  • Physical Standby Database Creation with RMAN

    Hi,
    I'm in 10g on Linux. I want to create a standby database on another Linux server. I did not find a clear procedure to create it in Oracle® Database Backup and Recovery Advanced User's Guide 10g Release 2 (10.2) Part Number B14191-02
    and niether in Oracle® Data Guard Concepts and Administration 10g Release 2 (10.2) B14239-04
    In the last one chapter 3 sends you to F appendix and F appendix says do nothing before having than all in chapter 3 :
    In F.1.1 page F-2 it is said :
    See Chapter 3 for a complete discussion of physical standby database preparation,including initialization parameter settings. You must perform all necessary preparation tasks described in these chapters before RMAN can successfully create the standby database files and mount the standby database.
    Any way I'm looking for a procedure or clear article to create it.
    Many thanks before.

    Physical Standby Database Creation with RMAN
    Use the DUPLICATE command.
    Check out this metalink doc: Note:374069.1 and Note:118409.1
    Message was edited by:
    STW
    Message was edited by:
    STW

  • Standby db in R/W mode with RMAN

    Hello,
    I have a test environment that I have a physical non-managed standby database created in a virtual machine. I would like to use a physical standby database for read/write testing and reporting. I've been implementing the Data Guard Scenarios and tried to see if I can revert the activated database back to a physical standby database. However, I keep receiving the following error when I try to open the standby in read only mode:
    ORA-16004: backup database requires recovery
    ORA-01194: file 1 needs more recovery to be consistent
    ORA-01110: data file 1: 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF'
    Note: The standby db starts up as follows:
    startup nomount pfile=C:\oracle\product\10.2.0\db_2\database\initORCLstdby.ora;
    alter database mount standby database;
    Once every x minutes, a batch job ships the logs from the primary to the secondary and runs the following:
    connect / as sysdba
    spool c:\scripts\logapply.log
    alter database recover automatic standby database until cancel;
    alter database recover cancel;
    Here's the steps I've done:
    1. On the standby database, query the V$DATABASE view and record the current SCN of the standby database:
    SQL> SELECT CURRENT_SCN FROM V$DATABASE;
    CURRENT_SCN
    1804721
    2. This step didn't work/isn't necessary:
    SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
    ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL
    ERROR at line 1:
    ORA-16136: Managed Standby Recovery not active
    3. Connect to the standby database as the RMAN target and create an incremental backup from the current SCN of the standby database that was recorded in step 1:
    RMAN> connect target "system/password"
    connected to target database: ORCL (DBID=xxxxx, not open)
    RMAN> BACKUP INCREMENTAL FROM SCN 1804721 DATABASE FORMAT 'C:\tmp\ForStandby_%U' tag 'FOR STANDBY';
    4. Connect to the standby database as the RMAN target, and catalog all incremental backup pieces:
    RMAN> CATALOG START WITH 'c:\tmp\ForStandby_';
    5. On the primary database, switch logs so the SCN of the restore point (created in step 1) will be archived on the physical standby database and ship it to the standby database:
    SQL> ALTER SYSTEM ARCHIVE LOG CURRENT;
    6. Activate the physical standby database:
    SQL> ALTER DATABASE ACTIVATE STANDBY DATABASE;
    SQL> STARTUP MOUNT FORCE;
    SQL> ALTER DATABASE OPEN;
    Make any write changes on the activated standby database.
    7. Revert the activated database back to a physical standby database.
    SQL> STARTUP MOUNT FORCE;
    Connect to the standby database as the RMAN target and apply incremental backups
    Open another session for RMAN:
    RMAN> RECOVER DATABASE NOREDO;
    Back to SQL session
    SQL> ALTER DATABASE CONVERT TO PHYSICAL STANDBY;
    SQL> SHUTDOWN IMMEDIATE;
    I then run a batch file that automatically start the standby database and recover from the shipped archive logs:
    startup nomount pfile=C:\oracle\product\10.2.0\db_2\database\initORCLstdby.ora;
    alter database mount standby database;
    SQL> alter database recover automatic standby database until cancel;
    alter database recover automatic standby database until cancel
    ERROR at line 1:
    ORA-00279: change 1804724 generated at 04/25/2008 18:14:16 needed for thread 1
    ORA-00289: suggestion : C:\ARCHIVELOGS\NODE2\ARCH_1_1_652990391.ARC
    ORA-00280: change 1804724 for thread 1 is in sequence #1
    ORA-00278: log file 'C:\ARCHIVELOGS\NODE2\ARCH_1_1_652990391.ARC' no longer
    needed for this recovery
    ORA-00308: cannot open archived log
    'C:\ARCHIVELOGS\NODE2\ARCH_1_1_652990391.ARC'
    ORA-27041: unable to open file
    OSD-04002: unable to open file
    O/S-Error: (OS 2) The system cannot find the file specified.
    SQL> alter database recover cancel;
    alter database recover cancel
    ERROR at line 1:
    ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
    ORA-01194: file 1 needs more recovery to be consistent
    ORA-01110: data file 1: 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF'
    I've tried another approach to step 7:
    SQL> STARTUP MOUNT FORCE;
    SQL> ALTER DATABASE CONVERT TO PHYSICAL STANDBY;
    SQL> STARTUP MOUNT FORCE;
    SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;
    I get an error if I try this:
    SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCO
    NNECT;
    ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT
    ERROR at line 1:
    ORA-38500: USING CURRENT LOGFILE option not available without stand
    When I try to open the standby database in read only mode, I get this error:
    SQL> alter database open read only;
    alter database open read only
    ERROR at line 1:
    ORA-16004: backup database requires recovery
    ORA-01194: file 1 needs more recovery to be consistent
    ORA-01110: data file 1: 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF'
    I ran SELECT SEQUENCE#, FIRST_TIME FROM V$LOG_HISTORY; and found that the standby sequence# is only one sequence behind the test primary database.
    I'm stuck and would appreciate any help. Thank you.

    And how do you think you will conserve disk space with RMAN ?
    Stop and think about it : How can you revert a database AFTER you have Opened
    it Read/Write ? You need to flashback it OR restore it from a backup taken before
    the OPEN.
    So, you could have taken a backup to Tape or to alternate disk before OPENing the
    database. The backup to alternate disk can be via Flashback Recovery area or
    a regular RMAN (compressed, you want ?) backup. In the second case, you wouldn't
    be using a Flashback mechanism but a simple backup and restore method.

  • Help me with RMAN and RAC!

    I have a production database running on a RAC system.
    My boss want backup that database and restore to a new RAC system with RMAN. Please tell me the way to do, i'm a new babies with RMAN! I have tried, but not successful. Please help me!

    explain the procedure that you follow for restoring the rac backup.

  • Standby Database with RMAN on ASM

    Hi,
    I am using redhat Linux AS 4 and my database is 10.2.0.1. This database used ASM for storage of data files, control files, online redo logs. Flash recovery area is also configured in the ASM.
    I want to create a physical standby database on a different machine by using RMAN. Can someone kindly point me to some easy to follow document? I have scoured the oracle docs, but am more confused than ever.
    regards

    Step By Step Guide To Create Physical Standby Database Using RMAN [ID 469493.1]
    Note: the examples in this document use regular filesystems but the process is the same regardless, ie, in db_file_name_convert use your diskgroup rather than a filesystem (db_file_name_convert=+DG_SOURCE,+DG_TARGET)
    another note to complement the first one:
    Step By Step Guide On Creating Physical Standby Using RMAN Duplicate In ASM Filesystem For ASM Primary [ID 837102.1]
    Edited by: rui_catcuddler on Sep 2, 2010 6:51 AM

  • After patching primary database, can I do not patch phsical standby db?

    If I patch the primary from 10.2.4.0 to 10.2.0.5 in RAC db,
    Do I must patch phsical standby to the same version or can afford to leave it alone (still 10.2.0.4)?
    Thank you.

    You must apply the same patchs to the standby site.
    Because in case of a failover, when the standby become primary, you do not want to find a bug resolved in the patch already applied to the failed database.
    That is why the docs for patching this scenario always describe the steps to patch both sites, production and standby.
    For example, Note ID 187242. "Applying Patch Sets / Interim Patches with Physical Standby Database in Place".
    Regards.

  • Steps to create the standby with Hot Backup........?????

    Hi All
    I am planning to create the Physical standby with Hot backup ....
    Can anyboby give me the link/steps which explains how to do this?
    Thanks
    Gagan

    To copy the file from the primary, you can use RMAN, or manual hot backup copy with begin backup and end backup mode.
    You can read the doc about creation of standby database :
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14239/create_ps.htm#i70835
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14239/scenarios.htm#i1032302
    Nicolas.

  • Creating Standby From RMAN Compressed backup taken on Primary ....

    I am creating a Standby from RMAN Compressed backup taken on Primary.
    On Primary, I have taken Compressed backup as follows:
    RMAN> run
    allocate channel c1 type disk;
    allocate channel c2 type disk;
    allocate channel c3 type disk;
    BACKUP AS COMPRESSED BACKUPSET DATABASE PLUS ARCHIVELOG format '/dboracle/orbit_pr_bkp/primary_%U';
    backup current controlfile for standby format '/dboracle/orbit_pr_bkp/primary_cntl.bkp';
    oracle@apl06635orbvu1:/dboracle/orbit_pr_bkp>ls -ltr
    total 51652
    -rw-r----- 1 oracle dba 11972608 Jan 7 13:45 primary_0tm1h32n_1_1
    -rw-r----- 1 oracle dba 15762432 Jan 7 13:45 primary_0sm1h32n_1_1
    -rw-r----- 1 oracle dba 16785920 Jan 7 13:45 primary_0rm1h32n_1_1
    -rw-r----- 1 oracle dba 1088000 Jan 7 13:45 primary_0um1h32v_1_1
    -rw-r----- 1 oracle dba 32768 Jan 7 13:45 primary_12m1h33r_1_1
    -rw-r----- 1 oracle dba 7143424 Jan 7 13:47 primary_cntl.bkp
    On Standby, I restored the control file as below:
    RMAN> restore standby controlfile from '/dboracle/orbit_pr_bkp/primary_cntl.bkp';
    Starting restore at 10-JAN-11
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=156 devtype=DISK
    channel ORA_DISK_1: restoring control file
    channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
    output filename=/dboracle/orbit_dr/oradata/ORBIT_DR/controlfile/o1_mf_6lo6nwfr_.ctl
    output filename=/dboracle/orbit_dr/flash_recovery_area/ORBIT_DR/controlfile/o1_mf_6lo6nwky_.ctl
    Finished restore at 10-JAN-11
    But, When I am trying to restore the datafiles, RMAN is throwing error:
    RMAN> run {
    allocate channel d1 type disk format '/dboracle/orbit_pr_bkp/primary_%U';
    allocate channel d2 type disk format '/dboracle/orbit_pr_bkp/primary_%U';
    restore database;
    2> 3> 4> 5>
    released channel: ORA_DISK_1
    allocated channel: d1
    channel d1: sid=155 devtype=DISK
    allocated channel: d2
    channel d2: sid=151 devtype=DISK
    Starting restore at 10-JAN-11
    released channel: d1
    released channel: d2
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 01/10/2011 05:38:56
    RMAN-06026: some targets not found - aborting restore
    RMAN-06023: no backup or copy of datafile 4 found to restore
    RMAN-06023: no backup or copy of datafile 3 found to restore
    RMAN-06023: no backup or copy of datafile 2 found to restore
    RMAN-06023: no backup or copy of datafile 1 found to restore
    What would be the correct RMAN command?
    Regards, Anirban

    After your RESTORE the (standby) controlfile, you must MOUNT the database instance with "ALTER DATABASE MOUNT".
    You can also then query the controlfile with a "LIST BACKUP" or "LIST BACKUP SUMMARY" in RMAN to see if the deseired backups have been cataloged in the controlfile.
    Don't specify the format for the ALLOCATE CHANNEL when you RESTORE DATABASE. In fact, you don't need to ALLOCATE CHANNEL at all when the device type is the default value of DISK if your are on 10gR2 or above.
    Hemant K Chitale

  • Standby by rman

    HI All,
    I am creating standby database by rman.
    I have taken backup of production database plus archived logs using following command
    rman>backup database plus archivelog;
    the backup got completed successfully
    After that i have taken backup of currnet controlfile for standby using below command:
    rman>backup current controlfile for standby format '/export/home/oracle/rman/%U';
    the backup got completed successfully;
    after that i have backup all archived logs using :
    rman> backup archivelog all;
    the backup got completed successfully
    After that i have copied all backup sets on standby site with same directory structure:
    i.e /export/home/oracle/rman
    Now after it i connect to prod database from standby site
    rman connect target rman/rman@PROD
    connect target RMAN/RMAN@PROD
    connected to target database: PROD (DBID=145288094)
    RMAN> connect auxiliary RMAN/RMAN@STAND
    connected to auxiliary database: PROD (not mounted)
    NOW AFTER THAT I ISSUED THE FOLLWING COMMAND:
    RMAN> run
    2> {
    3> set until sequence=25;
    4> allocate auxiliary channel ch1 device type disk;
    5> duplicate target database for standby dorecover nofilenamecheck;
    6> }
    but its aborting with the below error:
    executing Memory Script
    executing command: SET until clause
    Starting restore at 31-OCT-10
    channel ch1: starting datafile backupset restore
    channel ch1: restoring control file
    channel ch1: reading from backup piece /export/home/oracle/rman/stand.U%
    ORA-19870: error reading backup piece /export/home/oracle/rman/stand.U%
    ORA-19505: failed to identify file "/export/home/oracle/rman/stand.U%"
    ORA-27037: unable to obtain file status
    Intel SVR4 UNIX Error: 2: No such file or directory
    Additional information: 3
    failover to previous backup
    channel ch1: starting datafile backupset restore
    channel ch1: restoring control file
    channel ch1: reading from backup piece /export/home/oracle/rman/stand.ct.0dlrqvvs_1_1
    ORA-19870: error reading backup piece /export/home/oracle/rman/stand.ct.0dlrqvvs_1_1
    ORA-19505: failed to identify file "/export/home/oracle/rman/stand.ct.0dlrqvvs_1_1"
    ORA-27037: unable to obtain file status
    Intel SVR4 UNIX Error: 2: No such file or directory
    Additional information: 3
    failover to previous backup
    channel ch1: starting datafile backupset restore
    channel ch1: restoring control file
    channel ch1: reading from backup piece /export/home/oracle/rman/stand.ctl.05lrqt8c_1_1
    ORA-19870: error reading backup piece /export/home/oracle/rman/stand.ctl.05lrqt8c_1_1
    ORA-19505: failed to identify file "/export/home/oracle/rman/stand.ctl.05lrqt8c_1_1"
    ORA-27037: unable to obtain file status
    Intel SVR4 UNIX Error: 2: No such file or directory
    Additional information: 3
    failover to previous backup
    released channel: ch1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 10/31/2010 18:21:43
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-06026: some targets not found - aborting restore
    RMAN-06024: no backup or copy of the control file found to restore
    RMAN>
    Please suggest me where i am lacking.
    Ur immediate response wil;l be appreciated.
    Thanks in advance;

    can you use like this
    BACKUP DATABASE INCLUDE CURRENT CONTROLFILE FOR STANDBY PLUS ARCHIVELOG;startup nomount;
    duplicate target database for standby nofilenamecheck;
    in detail check
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96566/rcmstand.htm#1000921

Maybe you are looking for