Loading....

Some times we need to have an exact replica of the production database data to urgently test an issue encountered in production. If the production database is very large having a clone process running on the production server or taking a fresh full database backup just for the clone is also not desirable as well as they have potential performance implications.

So if we have a physical standby database in place (which is a block for block replica of production) why can we not use that database as a source for the clone – we don’t touch the production server.

We can briefly convert the physical standby database to a snapshot standby database and use the RMAN DUPLICATE FROM ACTIVE database to create the clone database without having to take a fresh full database backup.

This note describes the process of performing a database refresh or clone using the Data Guard Standby database as the source for the clone and not the production primary database.

Read the note ….

Please follow and like us:

Last Update: June 23, 2020  

January 28, 2015 233 Gavin Soorma
Total 0 Votes:
0

Tell us how can we improve this post?

+ = Verify Human or Spambot ?

Add A Knowledge Base Question !

You will receive an email when your question will be answered.

+ = Verify Human or Spambot ?

, , , ,

One thought on “Performing a database clone using a Data Guard Snapshot Database

  1. Kuntal

    Hi Gavin,

    Thanks for the document, I was working on the same kind of cloning process (test db from snapshot standby) but somehow at the end of process, its failing with below error and I have tired many options but no luck.

    Can you please let me know if you ever face the same issue? I checked with Oracle and they said “cloning via duplicate database from snapshot standby is not possible” 🙂

    Error
    ======
    input datafile copy RECID=21269 STAMP=945898254 file name=+DATAC1/EBSCTST/DATAFILE/apps_ts_tx_idx.6630.945897919
    datafile 2156 switched to datafile copy
    input datafile copy RECID=21270 STAMP=945898254 file name=+DATAC1/EBSCTST/DATAFILE/apps_ts_tx_idx.6631.945897919

    contents of Memory Script:
    {
    set until scn 14078783398512;
    recover
    clone database
    delete archivelog
    ;
    }
    executing Memory Script

    executing command: SET until clause

    Starting recover at 05-JUN-17
    using channel ORA_AUX_DISK_1
    using channel ORA_AUX_DISK_2
    using channel ORA_AUX_DISK_3
    using channel ORA_AUX_DISK_4
    using channel ORA_AUX_DISK_5
    using channel ORA_AUX_DISK_6
    using channel ORA_AUX_DISK_7
    using channel ORA_AUX_DISK_8

    starting media recovery

    archived log for thread 1 with sequence 2 is already on disk as file +RECOC1/EBSCTST/ARCHIVELOG/2017_06_05/thread_1_seq_2.404.945898073
    archived log for thread 1 with sequence 3 is already on disk as file +RECOC1/EBSCTST/ARCHIVELOG/2017_06_05/thread_1_seq_3.1203.945898073
    archived log file name=+RECOC1/EBSCTST/ARCHIVELOG/2017_06_05/thread_1_seq_2.404.945898073 thread=1 sequence=2
    archived log file name=+RECOC1/EBSCTST/ARCHIVELOG/2017_06_05/thread_1_seq_3.1203.945898073 thread=1 sequence=3
    media recovery complete, elapsed time: 00:00:40
    Finished recover at 05-JUN-17
    Oracle instance started

    Total System Global Area 42949672960 bytes

    Fixed Size 7643936 bytes
    Variable Size 6174022880 bytes
    Database Buffers 36507222016 bytes
    Redo Buffers 260784128 bytes

    contents of Memory Script:
    {
    sql clone “alter system set db_name =
    ”EBSCTST” comment=
    ”Reset to original value by RMAN” scope=spfile”;
    sql clone “alter system reset db_unique_name scope=spfile”;
    }
    executing Memory Script

    sql statement: alter system set db_name = ”EBSCTST” comment= ”Reset to original value by RMAN” scope=spfile

    sql statement: alter system reset db_unique_name scope=spfile
    Oracle instance started

    Total System Global Area 42949672960 bytes

    Fixed Size 7643936 bytes
    Variable Size 6174022880 bytes
    Database Buffers 36507222016 bytes
    Redo Buffers 260784128 bytes
    sql statement: CREATE CONTROLFILE REUSE SET DATABASE “EBSCTST” RESETLOGS ARCHIVELOG
    MAXLOGFILES 32
    MAXLOGMEMBERS 5
    MAXDATAFILES 2800
    MAXINSTANCES 5
    MAXLOGHISTORY 15188
    LOGFILE
    GROUP 6 SIZE 4 G ,
    GROUP 7 SIZE 4 G ,
    GROUP 8 SIZE 4 G ,
    GROUP 9 SIZE 4 G ,
    GROUP 10 SIZE 4 G
    DATAFILE

    CHARACTER SET WE8ISO8859P1

    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 06/05/2017 21:54:09
    RMAN-05501: aborting duplication of target database
    RMAN-06136: ORACLE error from auxiliary database: ORA-01503: CREATE CONTROLFILE failed
    ORA-01565: error in identifying file ”
    ORA-17503: ksfdopn:2 Failed to open file
    ORA-07202: sltln: invalid parameter to sltln.

    RMAN> exit

    Thanks in advance

Leave a Comment

Your email address will not be published. Required fields are marked *

*
*

Social media & sharing icons powered by UltimatelySocial
Back To Top

Add A Knowledge Base Question !

You will receive an email when your question will be answered.

+ = Verify Human or Spambot ?