Duplicate from standby database to create a test database?

Hello!
Would it be possible to use backup-based duplication FROM a physical standby database to create another database to be used for testing? If I performed RMAN backup of the standby database, moved the backup to another test server, and then ran duplicate?
Anyone know if this would be possible? If possible, would the new test database's controlfile be "standby" or "primary".
(version 11.2.0.2)
thanks..

Yes it works ! I've tried that recently on 10g so I think on 11g will not be a problem.
You can do it with or without duplicate. If you want to use duplicate, you don't need to copy the backup. Actually, on 11g you don't need no backup at all, since now you have 'from active database' option for duplicate command !
Also, duplicate will rebuild the controlfile so it will not be "standby" or "primary" ...
Gabriel

Similar Messages

  • Restore production from standby database

    Hi,
    I would like to make a standby database for my production database.
    But, I have a basic question to restore my production database from standby database. There is a method to make it ?
    If I lost all files from production database, how to restore from my standby datase (which become in this case my new production database) ?
    thanks in advance for your help.
    gnom92.

    * I make a copy datafiles from my new production database (old standby database) on old production (where crash)
    * With my old production database, I make a standby database on new production database (old standby)
    * I can close the new production database and open the new standby database in read / write mode, and this is my production database.
    * After what I recreate my standby database (old standby,newproduction), or can I return in recover standby mode ?
    thank you very much for your patience.
    gnom92.

  • ORA-01017 when RMAN duplicate from active database

    Hello, ORACLE guru's!
    I've got some trouble trying to duplicate DB via RMAN duplicate from active database.
    The script is simple:
    run
    allocate channel ch1 device type disk;
    allocate auxiliary channel aux1 device type disk;
    duplicate target database to mydb from active database;
    The problem is in this statement:
    Starting backup at 15-JAN-14
    channel ch1: starting datafile copy
    copying current control file
    Oracle instance started
    Total System Global Area   10689474560 bytes
    Fixed Size                     2237776 bytes
    Variable Size               4227861168 bytes
    Database Buffers            6442450944 bytes
    Redo Buffers                  16924672 bytes
    contents of Memory Script:
       sql clone "alter system set  db_name =
    ''mydb'' comment=
    ''Reset to original value by RMAN'' scope=spfile";
       sql clone "alter system reset  db_unique_name scope=spfile";
       shutdown clone immediate;
    executing Memory Script
    sql statement: alter system set  db_name =  ''mydb'' comment= ''Reset to original value by RMAN'' scope=spfile
    sql statement: alter system reset  db_unique_name scope=spfile
    Oracle instance shut down
    released channel: ch1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 01/15/2014 12:16:07
    RMAN-05501: aborting duplication of target database
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-03009: failure of backup command on ch1 channel at 01/15/2014 12:15:57
    ORA-17629: Cannot connect to the remote database server
    ORA-17627: ORA-01017: invalid username/password; logon denied
    ORA-17629: Cannot connect to the remote database server
    RMAN>
    RMAN>

    change:
    export  ORACLE_SID="mydb"
    export ORACLE_HOME="/u/app/oracle/product/11.2/db_1"
    FILE1 = "/u/app/oracle/product/11.2/db_1/bin/"
    cat > $FILE1/sqlplus sys/karen as sysdba << EOF
    startup nomount; 
    exit;
    EOF
    cat > $FILE1/rman target sys/karen@mytargetdb auxiliary sys/karen@mydb << EOF
    run
    allocate channel ch1 device type disk;
    allocate auxiliary channel aux1 device type disk;
    duplicate target database to mydb from active database;
    EOF
    tell us if it works and again, from what host are you running the script?

  • Create dev database from standby database

    Hi folks,
    I need to create a dev database by using RMAN's method of cloning. But, since it is business hours and the production database is being used at a very high rate, I cannot carryout the cloning by connecting the primary database as it may cause performance slowness.
    The time allotted for the activity is also very short. We have a standby database created for the primary database. So, my question is it possible for me to create the dev database using the standby database ?
    Database version is 11.1.0.6 and I can go ahead with the active database feature.

    Yes, you can clone from the standby database. Follow the below steps.
    1. Check if your standby database is in sync with the primary database.
    2. Cancel the MRP on the standby database.
    alter database recover managed standby database cancel;3. connect to standby as target database and dev database as auxiliary
    rman target sys/<pwd>@<standby-alias> auxiliary sys/pwd@<dev-alias>4. Your standby database would be in mount stage and dev in nomount stage.
    5. Run the duplicate command
    rman>duplicate target database to 'dev' nofilenamecheck;6. Once done, start the MRP on the standby database
    alter database recover managed standby database disconnect from session;

  • Duplicate from Active database

    Hi,
    I have RAC primary database running in 11.2.0.3 with linux 5(dc). We also have configured RAC cluster on DR site recently.Now we need to create stanby database on DR site.
    For this is have following doubts
    My database size is 6TB(from dba_segmnets) and total is 14TB(from dba_data_files)
    1) How duplicate of active database works internally? Does it copy the exact file to standby site for example copy datafile(which is of 5GB in size) and send it over to standby over network?
    2) Both primary and standby sites are in different states, so i was thinking to backup the primary database first to tapes and then courier tapes to dr site and then finally restore and recover standby.
    I have doubts in above approaches which should i implement. I think active database duplication will skip a)backup time b) courier time. Is that correct?
    However if my database size is 14TB and using 1st method, does it send files to dr worth of 14TB size?

    I am working on active database duplication and has below issue. Can any one help me on this?
    RMAN> connect target sys@Pa305
    connected to target database: PA305 (DBID=2787277616)
    RMAN> connect auxiliary sys@Pb305
    connected to auxiliary database: PB305 (not mounted)
    RMAN> DUPLICATE TARGET DATABASE
    TO 'PB305'
    FROM ACTIVE DATABASE
    2> 3> 4> ;
    Starting Duplicate Db at 31-JUL-2012 17:20:07
    using target database control file instead of recovery catalog
    allocated channel: ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: SID=2838 instance=PB3051 device type=DISK
    contents of Memory Script:
    sql clone "alter system set control_files =
    ''+DG_075_DATA01/PB305/controlfile/current.270.790104009'', ''+DG_075_FRA01/PB305/controlfile/current.286.790104009'' comment=
    ''Set by RMAN'' scope=spfile";
    sql clone "alter system set db_name =
    ''PA305'' comment=
    ''Modified by RMAN duplicate'' scope=spfile";
    sql clone "alter system set db_unique_name =
    ''PB305'' comment=
    ''Modified by RMAN duplicate'' scope=spfile";
    shutdown clone immediate;
    startup clone force nomount
    backup as copy current controlfile auxiliary format '+DG_075_DATA01/PB305/controlfile/current.269.790104009';
    restore clone controlfile to '+DG_075_FRA01/PB305/controlfile/current.288.790104009' from
    '+DG_075_DATA01/PB305/controlfile/current.269.790104009';
    sql clone "alter system set control_files =
    ''+DG_075_DATA01/PB305/controlfile/current.269.790104009'', ''+DG_075_FRA01/PB305/controlfile/current.288.790104009'' comment=
    ''Set by RMAN'' scope=spfile";
    shutdown clone immediate;
    startup clone nomount;
    alter clone database mount;
    executing Memory Script
    sql statement: alter system set control_files = ''+DG_075_DATA01/PB305/controlfile/current.270.790104009'', ''+DG_075_FRA01/PB305/controlfile/current.286.790104009'' comment= ''Set by RMAN'' scope=spfile
    sql statement: alter system set db_name = ''PA305'' comment= ''Modified by RMAN duplicate'' scope=spfile
    sql statement: alter system set db_unique_name = ''PB305'' comment= ''Modified by RMAN duplicate'' scope=spfile
    Oracle instance shut down
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 07/31/2012 17:20:18
    RMAN-06174: not connected to auxiliary database
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-04006: error from auxiliary database: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
    RMAN>

  • Issue with RMAN DUPLICATE FROM ACTIVE DATABASE....

    Hi All,
    Not sure if I should continue from a closed thread, so apologies, opening a new one..
    I ran the following command:
    DUPLICATE TARGET DATABASE TO ' AUX1"
    from ACTIVE DATABASE
    NOFILENAMECHECK:
    So the copy went in fine...so I am confiused now....why when doing a recover, i get the below errors from output:
    archived log for thread 1 with sequence 68346 is already on disk as file H:\ORAC
    LE_ARCHIVE_LOGS\RBS1\ARCHIVELOG\2013_12_08\O1_MF_1_68346_ARCH_D-RBS_ID-295728924
    5_S-68346_T-1_A-780292253_C1OQVOSU_.ARC
    archived log for thread 1 with sequence 68347 is already on disk as file H:\ORAC
    LE_ARCHIVE_LOGS\RBS1\ARCHIVELOG\2013_12_08\O1_MF_1_68347_ARCH_D-RBS_ID-295728924
    5_S-68347_T-1_A-780292253_C3OQVOU1_.ARC
    archived log for thread 1 with sequence 68348 is already on disk as file H:\ORAC
    LE_ARCHIVE_LOGS\RBS1\ARCHIVELOG\2013_12_08\O1_MF_1_68348_ARCH_D-RBS_ID-295728924
    5_S-68348_T-1_A-780292253_C4OQVOU6_.ARC
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 12/08/2013 07:36:04
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-06053: unable to perform media recovery because of missing log
    RMAN-06025: no backup of archived log for thread 1 with sequence 64713 and start
    ing SCN of 12728145997 found to restore
    RMAN-06025: no backup of archived log for thread 1 with sequence 64712 and start
    ing SCN of 12728133322 found to restore
    RMAN-06025: no backup of archived log for thread 1 with sequence 64711 and start
    ing SCN of 12728121403 found to restore
    RMAN-06025: no backup of archived log for thread 1 with sequence 64709 and start
    ing SCN of 12727730726 found to restore
    RMAN-06025: no backup of archived log for thread 1 with sequence 64708 and start
    ing SCN of 12727717143 found to restore
    RMAN-06025: no backup of archived log for thread 1 with sequence 64707 and start
    ing SCN of 12727701799 found to restore
    RMAN-06025: no backup of archived log for thread 1 with sequence 64704 and start
    ing SCN of 12726617917 found to restore
    RMAN-06025: no backup of archived log for thread 1 with sequence 64703 and start
    ing SCN of 12726605080 found to restore
    RMAN-06025: no backup of archived log for thread 1 with sequence 64702 and start
    No archivelogs were purged or backed up and the current logs were retained....so im somewhat confused....i am not restoring from backup but running active duplicate...
    should I re-run the command with:
    SET UNTIL SEQUENCE 64713 THREAD 1

    This fails saying that "ORA-12528: TNS:listener: all appropriate instances are blocking new connections" which is quite normal given that the listener is havig a handle in BLOCKED state for this AUXDB as it is in NOMOUNT state.
    Could you please help me on how to proceed?
    One option can be to create the controlfile manually and mount the instance before doing the duplicate. I hope Rman can continue from there.
    Another option is to go for backup based duplicate.
    Is there any other way to go?
    Provide static registration on AUXILIARY side for your auxiliary instance and try again.For example change listener.ora file as
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (GLOBAL_DBNAME = AUXDB)
          (ORACLE_HOME = <your oracle home>)
          (SID_NAME = AUXDB)
    LISTENER =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = <auxiliary host/ip>)(PORT = 1521))
      )And restart listener on auxiliary host then try again

  • Is duplicate from active database supported in Standard Edition?

    Hi,
    I'm trying to clone a database whithout a staging area.
    After having the clone instance and the sql*net configuration set up, I'm running this
    command in the rman-commandline:
    Recovery Manager: Release 11.1.0.7.0 - Production on Tue Nov 2 15:52:31 201
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    connected to target database: LOCALDB (DBID=370732657)
    connected to auxiliary database: LOCALFB (not mounted)
    RMAN> run {
    duplicate target database to localfb from active database
    pfile=C:\Oracle\admin\ProdFB\pfile\init.ora
    db_file_name_convert=('PROD', 'ProdFB')
    logfile group 1 ('C:\OraData\ProdFB\Redo/log01A.dbf','C:\OraData\ProdFB\log01B.dbf') size 100m,
    group 2 ('C:\OraData\ProdFB\Redo/log02A.dbf','C:\OraData\ProdFB/log02B.dbf') size 100m,
    group 3 ('C:\OraData\ProdFB\Redo/log03A.dbf','C:\OraData\ProdFB/log03B.dbf') size 100m;
    Starting Duplicate Db at 02.11.10
    using target database control file instead of recovery catalog
    allocated channel: ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: SID=594 device type=DISK
    contents of Memory Script:
    set newname for datafile 1 to
    "C:\ORADATA\PRODFB\TS\SYSTEM01.DBF";
    set newname for datafile 2 to
    "C:\ORADATA\PRODFB\TS\SYSAUX01.DBF";
    set newname for datafile 3 to
    "C:\ORADATA\PRODFB\TS\UNDO01.DBF";
    set newname for datafile 4 to
    "C:\ORADATA\PRODFB\TS\PRODFB01.DBF";
    set newname for datafile 5 to
    "C:\ORADATA\PRODFB\TS\PIMAINT01.DBF";
    set newname for datafile 6 to
    "C:\ORADATA\PRODFB\TS\INDX01.DBF";
    backup as copy reuse
    datafile 1 auxiliary format
    "C:\ORADATA\PRODFB\TS\SYSTEM01.DBF" datafile
    2 auxiliary format
    "C:\ORADATA\PRODFB\TS\SYSAUX01.DBF" datafile
    3 auxiliary format
    "C:\ORADATA\PRODFB\TS\UNDO01.DBF" datafile
    4 auxiliary format
    "C:\ORADATA\PRODFB\TS\PRODFB01.DBF" datafile
    5 auxiliary format
    "C:\ORADATA\PRODFB\TS\PIMAINT01.DBF" datafile
    6 auxiliary format
    "C:\ORADATA\PRODFB\TS\INDX01.DBF" ;
    sql 'alter system archive log current';
    executing Memory Script
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    Starting backup at 02.11.10
    released channel: ORA_AUX_DISK_1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 11/02/2010 15:52:46
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-06181: multiple channels require Enterprise Edition
    RMAN>
    As you can see, I get the error RMAN-06181.
    So my question is: is duplication from active database supported in the standard edition?
    If it is, then what do I need th do to make this work?
    Thanks for your help.

    Yes, this is it.
    I tested only three cases before:
    - not allocating any channel
    - allocating local channel only
    - allocating auxiliary channel only
    I need to allocate both channels in the run block, then it works.
    Thanks a lot for your help.
    run {
    allocate channel c1 device type disk;
    allocate auxiliary channel c2 device type disk;
    duplicate target database to localfb from active database
    pfile=C:\Oracle\admin\ProdFB\pfile\init.ora
    db_file_name_convert=('PROD', 'ProdFB')
    logfile group 1 ('C:\OraData\ProdFB\Redo/log01A.dbf','C:\OraData\ProdFB\Redo/log01B.dbf') size 100m,
    group 2 ('C:\OraData\ProdFB\Redo/log02A.dbf','C:\OraData\ProdFB\Redo/log02B.dbf') size 100m,
    group 3 ('C:\OraData\ProdFB\Redo/log03A.dbf','C:\OraData\ProdFB\Redo/log03B.dbf') size 100m;
    using target database control file instead of recovery catalog
    allocated channel: c1
    channel c1: SID=580 device type=DISK
    RMAN-06908: WARNING: operation will not run in parallel on the allocated channels
    RMAN-06909: WARNING: parallelism require Enterprise Edition
    allocated channel: c2
    channel c2: SID=591 device type=DISK
    Starting Duplicate Db at 04.11.10
    :

  • UAT Database from Standby database

    Hi,
    I'm using oracle 11.2.0.2.0 on Windows 2008,
    I have prod & standby databases, I want to create new UAT DB which wiil be same as prod,
    How Can create a UAT using standby database cold backup,
    can i use cold backup of standby database.
    Thanks
    Edited by: user10745179 on Oct 22, 2012 12:42 PM

    This would be a database duplication from backup with RMAN. A Catalog will help, particularly as you are working in a Data Guard environment, but it is a straightforward and well documented operation:
    http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmdupdb.htm#i1008564

  • RMAN duplicate from ACTIVE DATABASE

    Hi,
    I am trying to create a new 11.2.0.1 database by duplicating an existing 11.2.0.1 database using Rman with 'from active database' option.
    I have created a password file and listener is configured as well.
    The aux database is started in nomount state.
    rman
    connect target sys/pwd123@SRCDB
    connect auxiliary sys/pwd123@AUXDB
    duplicate target database to AUXDB
    FROM ACTIVE DATABASE;
    This fails saying that "ORA-12528: TNS:listener: all appropriate instances are blocking new connections" which is quite normal given that the listener is havig a handle in BLOCKED state for this AUXDB as it is in NOMOUNT state.
    Could you please help me on how to proceed?
    One option can be to create the controlfile manually and mount the instance before doing the duplicate. I hope Rman can continue from there.
    Another option is to go for backup based duplicate.
    Is there any other way to go?
    Regards,
    Aravind

    This fails saying that "ORA-12528: TNS:listener: all appropriate instances are blocking new connections" which is quite normal given that the listener is havig a handle in BLOCKED state for this AUXDB as it is in NOMOUNT state.
    Could you please help me on how to proceed?
    One option can be to create the controlfile manually and mount the instance before doing the duplicate. I hope Rman can continue from there.
    Another option is to go for backup based duplicate.
    Is there any other way to go?
    Provide static registration on AUXILIARY side for your auxiliary instance and try again.For example change listener.ora file as
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (GLOBAL_DBNAME = AUXDB)
          (ORACLE_HOME = <your oracle home>)
          (SID_NAME = AUXDB)
    LISTENER =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = <auxiliary host/ip>)(PORT = 1521))
      )And restart listener on auxiliary host then try again

  • Database refresh from standby database

    All,
    OS : Sun version : 11.1.0.7
    I'm doing database refresh using stand by database datafiles in different server.
    1)Disabled Data guard broker in standby database .
    2)Copied all datafiles in mount stage to target server (different server)
    3)created controlfile and started the database in mount stage in different server
    4)Applied all archive log files .
    5)But still the database not recovered .
    SQL> recover database using backup controlfile until cancel;
    ORA-00279: change 10401147296308 generated at 01/13/2012 09:03:43 needed for
    thread 1
    ORA-00289: suggestion :
    /u01/app/oracle/admin/qecgdeva/arch/qecgdeva_727091849_1_57879.arc
    ORA-00280: change 10401147296308 for thread 1 is in sequence #57879
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    /u01/app/oracle/admin/qecgdeva/arch/qecgdeva_727091849_1_57879.arc
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    /u01/app/oracle/admin/qecgdeva/arch/qecgdeva_727091849_1_57885.arc
    ORA-00279: change 10401156453328 generated at 01/13/2012 10:48:01 needed for
    thread 1
    ORA-00289: suggestion :
    /u01/app/oracle/admin/qecgdeva/arch/qecgdeva_727091849_1_57886.arc
    ORA-00280: change 10401156453328 for thread 1 is in sequence #57886
    ORA-00278: log file
    '/u01/app/oracle/admin/qecgdeva/arch/qecgdeva_727091849_1_57885.arc' no longer
    needed for this recovery
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    CANCEL
    ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
    ORA-01196: file 1 is inconsistent due to a failed media recovery session
    ORA-01110: data file 1:
    '/mounts/qecgdeva_data/oradata/qecgdeva/dbfiles/qecgprod_system.dbf'
    ORA-01112: media recovery not started
    SQL> alter database open resetlogs;
    alter database open resetlogs
    ERROR at line 1:
    ORA-01196: file 1 is inconsistent due to a failed media recovery session
    ORA-01110: data file 1:
    '/mounts/qecgdeva_data/oradata/qecgdeva/dbfiles/qecgprod_system.dbf'Am I missing any steps here ? Please advice me on this .
    Thanks.

    Hi,
    When you copy files of standby server to another target server ? - Yesterday.
    Is standby is SYNC with primary? or MRP is still running? - ---------yes, standby db is running fine .
    Even you can open database with resetlogs after recreating controlfile, no need of recovery too -- >I was unable to open . So went to apply arch files.
    Do you have archive of thread 1 is in sequence #57887, -- No , Because sequence 57887 yet generate. I have applied all recent available archive log files.
    ORA-00289: suggestion :
    /u01/app/oracle/admin/qecgdeva/arch/qecgdeva_727091849_1_57886.arc
    ORA-00280: change 10401156453328 for thread 1 is in sequence #57886
    ORA-00278: log file
    '/u01/app/oracle/admin/qecgdeva/arch/qecgdeva_727091849_1_57885.arc' no longer
    needed for this recovery
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    CANCEL
    ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
    ORA-01196: file 1 is inconsistent due to a failed media recovery session
    ORA-01110: data file 1:
    '/mounts/qecgdeva_data/oradata/qecgdeva/dbfiles/qecgprod_system.dbf'
    ORA-01112: media recovery not started
    SQL> alter database open resetlogs;
    alter database open resetlogs
    ERROR at line 1:
    ORA-01196: file 1 is inconsistent due to a failed media recovery session
    ORA-01110: data file 1:
    '/mounts/qecgdeva_data/oradata/qecgdeva/dbfiles/qecgprod_system.dbf'Edited by: 805877 on Jan 12, 2012 10:43 PM

  • Recover Primary Database from Standby Database

    Hi all,
    I'm trying to understand how to use physical standby database in order to have a backup from a primary database.
    The first part is very clear. I supose I have a physical standby database ready and archiving from a primary database but the second part is the problem.
    1. Now I supose that my primary database is gone... not just a logical corruption but a physical disaster such a fire o something worst.
    How to recover the primary site from the physical standby database??????????
    2. Just a logical corruption in primary database. How to syncronize with the standby database that it's the one who has the right data???
    Thanks in advance.
    Edited by: jsfelix on 18-nov-2009 4:48
    Edited by: jsfelix on 18-nov-2009 4:51

    How to recover the primary site from the physical standby database?1. Ensure that you DO have a Primary Site up and running. It might be the same building. It might be another building. Management might decide to switch to another city. (BTW, all of this should be defined in the D.R. / B.C.P. documentation).
    The (possibly new) Primary Site has to have the required hardware , O.S etc.
    2. Take a backup of the Standby and restore it to the (possibly new) Primary.
    Actually, the Standby becomes the new Primary and the new site that is setup becomes the Standby. This continues until management decides to switch over.
    Just a logical corruption in primary database.Take a backup of the Standby and restore it to the Primary. You have to suffer an outage. Note : If only one or few files on the Primary are physically corrupt (and offline), you could backup the selected files from the Standby and RESTORE and RECOVER on the Primary !
    Hemant K Chitale
    http://hemantoracledba.blogspot.com

  • Failover from standby database to primary database

    Hi,
    Can anyone suggest me, How to do " Standby DataGuard database to primary database (dataguard)".
    Kindly Give me steps.
    Thanks,
    Shweta

    Hi
    Follow these steps
    Oracle switchover operation:
    1.     Check and verify the role parameter on the v$parameters both primary and standby
    On Primary
    Log_archive_dest_1=”this is the local archive destination”
    +Log_archive_dest_2=”This is the Service [TNS ENTRY]”+
    Log_archive_dest_state_1=Enable
    Log_archive_dest_state_2=Enable
    Fal_server=”this should have the tns entry for the standby
    Fal_Client=”this should have the tns entry for the primary
    Standby_archive_dest=”This should have the Location where the archive located”
    Standby_File_Management=AUTO
    On Standby
    Log_archive_dest_1=”this is the local archive destination”
    +Log_archive_dest_2=”This is the Service [TNS ENTRY]”+
    Log_archive_dest_state_1=Enable
    Log_archive_dest_state_2=DEfer
    Fal_server=”this should have the tns entry for the primary
    Fal_Client=”this should have the tns entry for the standby
    Standby_archive_dest=”This should have the Location where the archive located”
    Standby_File_Management=AUTO
    2.     Down all the applications connects to the database
    3.     Shutdown both primary and standby databases
    4.     For RAC Keep Only one primary and One standby up and all other nodes should be down
    5.     Check the Primary database on Open mode and the Standby database on mount stage
    6.     On Primary
    SQL>select switchover_status from v$database;Sessions Active or To standby will be appearing on the result
    SQL> alter database commit to switchover to standby with session shutdown;
    SQL> shutdown Immediate;
    SQL>startup nomount;
    SQL>alter database mount standby database;
    SQL>Alter system set log_Archive_dest_state_2=defer;7.     On Standby
    SQL>select switchover_status from  v$database;it is acceptable to have Sessions Active or To Primary
    SQL>alter database commit to switchover to primary with session shutdown;
    SQL>shutdown immediate;
    SQL>Startup;
    SQL.>Alter system set log_archive_dest_state_2=enable;8.     On Primary
    start the managed recovery
    SQL>Alter database recover managed standby database disconnect from session;9.     Check the log shipment is working from New Primary to New Standby Using
    SQL>Alter system switch logfile; ---- On New Primary.check the alert log on both Primary and Standby for the log shipment and Media recovery.
    10.     If the switch over fail issue the following statement on standby (ORACLE 9i)
    SQL> alter database recover managed standby database finish skip standby logfile ┘
    SQL> alter database commit to switchover to primary┘
    SQL> shutdown immediate;
    SQL> Startup;11.     If this don’t work please issue the below statement
    SQL> alter database activate standby database skip standby logfile;12.     If the switch over fail issue the following statement on standby (ORACLE 10g and above)
    SQL> alter database recover managed standby database finish force;
    SQL> alter database commit to switchover to primary;
    SQL> alter database open;
    SQL> shutdown Immediate;
    SQL> startup;13. Added the temp file to your temp tablespace
    If you follow the steps (10,11 & 12 ) you have to recreate the standby again. those steps are actually fail over steps. Hope this will be helpful
    Cheers
    Kanchana

  • HOW? switch from standby database

    I on standby database and want to usse it for update,insert .
    tell me, how do i switch stand by database.
    please tell me for command and process
    thx

    1/ open Firefox (or you favorite browser)
    2/ enter URL: http://tahiti.oracle.com
    3/ pick you release
    4/ in the "Search box" enter: "Data Guard" and hit enter
    5/ In the list, pick the link that will lead you to "Data Guard Concepts and Administration - Contents" (name for 10g)
    6/ Good reading.
    Regards,
    Yoann.
    PS: From your post, it's not clear what you want to achieve.

  • Error when trying to recover datafile from standby database to primary

    hi friends,
    getting problem with restoring datafile from backupset taken on standby database to primary database.
    os: windows server 2003
    db: oracle 11gR1(11.1.0.6)
    i've configured standby database on two different hosts.
    host1 - primary (db_uinque_name= prod)
    host2 - standby (db_uniue_name= prodsby)
    I've configure both database with recovery catalog. I take backup on standby database. users' datafile of primary database has been lost.i'm trying to restore from the backupsets taken on standby database.
    with the help of - http://download.oracle.com/docs/cd/B28359_01/server.111/b28294/rman.htm#BAJCEFEG
    on primary
    c:\>rman target sys/password catalog rcat/password
    rman>list backup for db_unique_name prodsby;
    display the backupsets
    rman>restore datafile 4;
    Starting restore at 06-NOV-08
    starting full resync of recovery catalog
    full resync complete
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=1051 device type=DISK
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 11/06/2008 12:12:18
    RMAN-06026: some targets not found - aborting restore
    RMAN-06023: no backup or copy of datafile 4 found to restore
    also use to tag to restore the datafile
    rman>restore datafile 4 from tag='base0_prodsby';
    Starting restore at 06-NOV-08
    using channel ORA_DISK_1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 11/06/2008 11:27:21
    RMAN-06026: some targets not found - aborting restore
    RMAN-06023: no backup or copy of datafile 4 found to restore
    i'm getting above errors when try to restore the datafile.
    when i issue the following command.
    BACKUP AS COPY DATAFILE 4 AUXILIARY FORMAT 'C:\app\Administrator\oradata\prod\USERS01.DBF';
    Starting backup at 06-NOV-08
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=1068 device type=DISK
    channel ORA_DISK_1: starting datafile copy
    input datafile file number=00004 name=C:\APP\ADMINISTRATOR\ORADATA\prod\USERS01.
    DBF
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03009: failure of backup command on ORA_DISK_1 channel at 11/06/2008 12:49:
    15
    ORA-17628: Oracle error 19505 returned by remote Oracle server
    please friends, try to help me to solve the problem.
    Thanks,
    Vihang

    hi.
    Its not necessary its a otherway around to recover datafile from this backupset and apply archivelogs to make datafile consistent.
    yes, it ain't the right way to restore backup to primary location.
    so how would i connect to standby database with primary and recovery catalog.
    i need to connect to recovery catalog and primary site because i need to restore to primary location and recovery catalog contain all metadata and backupsets related information.
    i also tried the following steps from oracle documentation.
    Connect to the standby database as the target database:
    CONNECT TARGET sys@standby
    You are prompted for a password:
    target database Password: password
    Connect to the primary database as the auxiliary database:
    CONNECT AUXILIARY sys@primary
    You are prompted for a password:
    target database Password: password
    Back up the datafile on the standby host across the network to a location on the primary host. For example, suppose that /disk1/df2.dbf is the name of datafile 2 on the standby host. Suppose that /disk8/datafile2.dbf is the name of datafile 2 on the primary host. The following command would copy datafile 2 over the network to /disk9/df2copy.dbf:
    BACKUP AS COPY DATAFILE 2 AUXILIARY FORMAT '/disk9/df2copy.dbf';
    Starting backup at 06-NOV-08
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=1068 device type=DISK
    channel ORA_DISK_1: starting datafile copy
    input datafile file number=00004 name=C:\APP\ADMINISTRATOR\ORADATA\prod\USERS01.
    DBF
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03009: failure of backup command on ORA_DISK_1 channel at 11/06/2008 12:49:
    15
    ORA-17628: Oracle error 19505 returned by remote Oracle server
    getting this error.

  • Rman duplicate from active database slow

    Hi,
    I am doing a duplicate database from active database, it seems to either slow or hanging. Can someone suggest any tips or pointers to debug this issue?
    Source: 11gR2 3-node RAC (only one instance running) on Solaris 10, about 25TB
    Target: 1-node, 11gR2 on Solaris 10
    Thanks!

    source:
           SID    SERIAL#    CONTEXT      SOFAR  TOTALWORK %_complete
          1555       7013          1   43730494  142245833      30.74
          2332       8079          1   44307262  102713507      43.14
          2235      10987          1   47052222  105912610      44.43
          2622       5033          1   48406910   86329752      56.07
          2040      49651          1   49519038  111411200      44.45
          1846      20307          1   43488574  138674977      31.36
          1459      26683          1   44936702  272716852      16.48
    7 rows selected.
    Target: no rows

Maybe you are looking for

  • Lightroom 1.4 & Nikon D5100

    Hi, I'm running Lightroom 1.4, but when I try to upload RAW files taken on my Nikon D5100 I get an error message saying the files are either unsupported or damaged.  Is it possible to edit Nikon Raw files on Lightroom? I'd be grateful for any advice,

  • I purchased batman Arkham city and it will not open.

    I deleted it and downloaded it again and it still does not work. Please answer as soon as possible.

  • How can i set permanent neat output format

    Hello Experts ; Good  Evening ! Always i a, having problem with  table output format. please provide  permanent  solution for  neat output. i am not asking for  following output. i need permanent  solution because every i have to adjust  axx to a 99;

  • JComboBox + ImputVerifier problem

    I have a JComboBox with a ImputVerifier When I select a item with the keyboard the imputverifier is called after setting the value. When I select a item with the mouse the imputverifier is called before setting the value, so the imputverifier return

  • About DBWn & Checkpoint

    Hi All, I have a confusion over this two statements . DBWn defers writing to the data files until one of the following events occurs: • Incremental or normal checkpoint Checkpoint An event called a checkpoint occurs when the Oracle background process