DBA Tips Archive for Oracle

  


Duplicating a Database using RMAN - (Windows NT / 2000)

by Jeff Hunter, Sr. Database Administrator


Contents

  1. Overview
  2. Pre-requisites
  3. Steps Required



Overview

This article provides a quick introduction on how to duplicate a database using the RMAN DUPLICATE DATABASE command on Microsoft Windows NT / 2000. For this demonstration, we will create a duplicate target database using RMAN's DUPLICATE DATABASE command to the same host (localhost) of the target database.

Please keep in mind that this article should not be considered a substitution for completing reading and understanding the official documentation and release notes from Oracle. The following links can be used to download the Recovery Manager User's Guide for Oracle9i (9.2.0):

  Oracle9i Database Release 2 Documentation
  Oracle9i Recovery Manager User's Guide - (A96566-01)
Here is a short introduction to some of the configuration parameters that will be used for installing the Oracle RDBMS Software:

Operating Environment Windows XP Professional
Oracle Release / Version 9.2.0.5.0 Enterprise Edition
ORACLE_BASE c:\oracle
ORACLE_HOME c:\oracle\ora92
Target Database SID JEFFDB
Duplicate Database SID JEFFDUP
RMAN Catalog Database No recovery catalog. Using control file.
Archive Log Mode Enabled
log_archive_dest_1 location=C:\oracle\oradata\JEFFDB\archive MANDATORY
log_archive_dest_state_1 enable
log_archive_format ARC%S.%T
log_archive_start true
RMAN Default Configuration Settings using target database controlfile instead of recovery catalog
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'c:\oracle\orabackup\JEFFDB\%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT 'c:\oracle\orabackup\JEFFDB\backup_DB_%d_S_%s_P_%s_T_%t';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'C:\ORACLE\ORA92\DATABASE\SNCFJEFFDB.ORA'; # default

It is a common request to create a duplicated database from a production database. This can be easily achieved using the RMAN DUPLICATE command. Using the RMAN DUPLICATED command, the DBA can create a duplicate database from a target database's backup while still retaining the original target database. While it is possible to create a duplicate database that contains only a subset of the original database (by tablespace), this article will demonstrate how to create a completely identical database. Using this method allows you to test backup and recovery procedures as well as exporting data such as a table that was inadvertently dropped from the production database, and then importing it back into the production database.



Pre-requisites

A valid full database backup of the target database
RMAN> list backup summary;

List of Backups
===============
Key     TY LV S Device Type Completion Time #Pieces #Copies Tag
------- -- -- - ----------- --------------- ------- ------- ---
1       B  F  A DISK        31-OCT-04       1       1
2       B  F  A DISK        31-OCT-04       1       1       TAG20041031T231941
3       B  F  A DISK        31-OCT-04       1       1
4       B  F  A DISK        31-OCT-04       1       1       TAG20041031T232943
5       B  F  A DISK        31-OCT-04       1       1
6       B  F  A DISK        31-OCT-04       1       1       TAG20041031T233330
7       B  F  A DISK        31-OCT-04       1       1
8       B  F  A DISK        31-OCT-04       1       1       TAG20041031T234428
9       B  F  A DISK        31-OCT-04       1       1
10      B  F  A DISK        01-NOV-04       1       1       TAG20041101T123156
11      B  F  A DISK        01-NOV-04       1       1
Target database must be mounted or open
C:\> sqlplus "/ as sysdba"

SQL*Plus: Release 9.2.0.5.0 - Production on Mon Nov 1 13:34:59 2004

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Connected to an idle instance.

SQL> startup open
ORACLE instance started.

Total System Global Area  194060016 bytes
Fixed Size                   454384 bytes
Variable Size             150994944 bytes
Database Buffers           41943040 bytes
Redo Buffers                 667648 bytes
Database mounted.
Database opened.
SQL> exit



Steps Required

  1. Create Password File for Auxiliary Database
    C:\> orapwd file=c:\oracle\ora92\database\PWDJEFFDUP.ora password=change_on_install

  2. Create an Initialization Parameter for the Auxiliary Database

    Copy the initialization parameter for the target database and make the necessary changes for the duplicated database.

    SQL> create pfile='c:\oracle\ora92\database\initJEFFDUP.ora' from spfile;
    
    File created.
    After creating the initialization parameter for the duplicate database, and change at least the following parameters:
    db_file_name_convert = ('C:\ORACLE\ORADATA\JEFFDB', 'C:\ORACLE\ORADATA\JEFFDUP')
    log_file_name_convert = ('C:\ORACLE\ORADATA\JEFFDB', 'C:\ORACLE\ORADATA\JEFFDUP')
    control_files = 'C:\oracle\oradata\JEFFDUP\control01.ctl'
                  , 'C:\oracle\oradata\JEFFDUP\control02.ctl'
                  , 'C:\oracle\oradata\JEFFDUP\control03.ctl'
    db_name = 'JEFFDUP'
    instance_name = 'JEFFDUP'
    background_dump_dest = 'C:\oracle\admin\JEFFDUP\bdump'
    core_dump_dest = 'C:\oracle\admin\JEFFDUP\cdump'
    user_dump_dest = 'C:\oracle\admin\JEFFDUP\udump'
    service_names = 'JEFFDUP_MELODY.IDEVELOPMENT.INFO'
    dispatchers = '(PROTOCOL=TCP) (SERVICE=JEFFDUPXDB)'
    log_archive_dest_1 = 'location=C:\oracle\oradata\JEFFDUP\archive MANDATORY'
    

  3. Create / Start the Auxiliary Instance

    Create a new Windows service for the duplicate database JEFFDUP using oradim:

    C:\> mkdir C:\oracle\oradata\JEFFDUP
    C:\> mkdir C:\oracle\oradata\JEFFDUP\archive
    C:\> mkdir C:\oracle\admin\JEFFDUP\bdump
    C:\> mkdir C:\oracle\admin\JEFFDUP\cdump
    C:\> mkdir C:\oracle\admin\JEFFDUP\create
    C:\> mkdir C:\oracle\admin\JEFFDUP\pfile
    C:\> mkdir C:\oracle\admin\JEFFDUP\scripts
    C:\> mkdir C:\oracle\admin\JEFFDUP\udump
    
    C:\> oradim -new -sid JEFFDUP -intpwd change_on_install -startmode auto -pfile 'c:\oracle\ora92\database\initJEFFDUP.ora'
    
    C:\> set ORACLE_SID=JEFFDUP
    
    C:\> sqlplus "/ as sysdba"
    
    SQL> startup nomount

  4. Ensure Oracle Net Connectivity to Auxiliary Database

    Modify both the listener.ora and tnsnames.ora file to be able to connect to the auxiliary database. After making changes to the networking files, test the connection keeping in mind that you must be able to connect to the auxiliary instance with SYSDBA privileges, so a valid password file must exist.

    C:\> sqlplus "sys/change_on_install@JEFFDUP as sysdba"
    
    SQL*Plus: Release 9.2.0.5.0 - Production on Mon Nov 1 15:23:11 2004
    
    Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
    
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.5.0 - Production
    
    SQL>

  5. Mount or Open the Target Database

    As mentioned in the pre-requisites section of this article, the target database should be either opened or mounted.

    C:\> set ORACLE_SID=JEFFDB
    C:\> sqlplus "/ as sysdba"
    SQL> startup open

  6. Ensure You Have the Necessary Backups and Archived Redo Log Files

    As mentioned in the pre-requisites section of this article, ensure that you have a current backup that you wish to use to create the duplicate database. Login to query the RMAN catalog:

    C:\> rman target sys/change_on_install@JEFFDB
    
    RMAN> list backup summary;
    
    List of Backups
    ===============
    Key     TY LV S Device Type Completion Time #Pieces #Copies Tag
    ------- -- -- - ----------- --------------- ------- ------- ---
    1       B  F  A DISK        31-OCT-04       1       1
    2       B  F  A DISK        31-OCT-04       1       1       TAG20041031T231941
    3       B  F  A DISK        31-OCT-04       1       1
    4       B  F  A DISK        31-OCT-04       1       1       TAG20041031T232943
    5       B  F  A DISK        31-OCT-04       1       1
    6       B  F  A DISK        31-OCT-04       1       1       TAG20041031T233330
    7       B  F  A DISK        31-OCT-04       1       1
    8       B  F  A DISK        31-OCT-04       1       1       TAG20041031T234428
    9       B  F  A DISK        31-OCT-04       1       1
    10      B  F  A DISK        01-NOV-04       1       1       TAG20041101T123156
    11      B  F  A DISK        01-NOV-04       1       1

  7. Login to Target and Auxiliary Database using RMAN
    C:\> rman target sys/change_on_install@JEFFDB auxiliary sys/change_on_install@JEFFDUP
    
    Recovery Manager: Release 9.2.0.5.0 - Production
    
    Copyright (c) 1995, 2002, Oracle Corporation.  All rights reserved.
    
    connected to target database: JEFFDB (DBID=3850478880)
    connected to auxiliary database: JEFFDUP (not mounted)
    
    RMAN>

  8. Run the RMAN DUPLICATE DATABASE Command

    The following RUN block can be used to fully duplicate the target database from the latest full backup.

      Note that you can duplicate the database to a specific date/time using the UNTIL TIME '<DATE>' clause. For example, to duplicate the new database to yesterdays date/time, use the following:

    duplicate target database to JEFFDUP until time 'SYSDATE-1';.

    run {
        # Allocate the channel for the duplicate work
        allocate auxiliary channel ch1 type disk;
    
        # Duplicate the database to JEFFDUP
        duplicate target database to JEFFDUP;
    }
    
    using target database controlfile instead of recovery catalog
    allocated channel: ch1
    channel ch1: sid=13 devtype=DISK
    
    Starting Duplicate Db at 01-NOV-04
    
    printing stored script: Memory Script
    {
       set until scn  8116931;
       set newname for datafile  1 to "C:\ORACLE\ORADATA\JEFFDUP\SYSTEM01.DBF";
       set newname for datafile  2 to "C:\ORACLE\ORADATA\JEFFDUP\UNDOTBS01.DBF";
       set newname for datafile  3 to "C:\ORACLE\ORADATA\JEFFDUP\CWMLITE01.DBF";
       set newname for datafile  4 to "C:\ORACLE\ORADATA\JEFFDUP\DRSYS01.DBF";
       set newname for datafile  5 to "C:\ORACLE\ORADATA\JEFFDUP\EXAMPLE01.DBF";
       set newname for datafile  6 to "C:\ORACLE\ORADATA\JEFFDUP\INDX01.DBF";
       set newname for datafile  7 to "C:\ORACLE\ORADATA\JEFFDUP\ODM01.DBF";
       set newname for datafile  8 to "C:\ORACLE\ORADATA\JEFFDUP\TOOLS01.DBF";
       set newname for datafile  9 to "C:\ORACLE\ORADATA\JEFFDUP\USERS01.DBF";
       set newname for datafile  10 to "C:\ORACLE\ORADATA\JEFFDUP\XDB01.DBF";
       set newname for datafile  11 to "C:\ORACLE\ORADATA\JEFFDUP\PERFSTAT01.DBF";
       set newname for datafile  12 to "C:\ORACLE\ORADATA\JEFFDUP\OEM_REPOSITORY01.DBF";
       restore
       check readonly
       clone database
       ;
    }
    executing script: Memory Script
    
    executing command: SET until clause
    
    executing command: SET NEWNAME
    
    executing command: SET NEWNAME
    
    executing command: SET NEWNAME
    
    executing command: SET NEWNAME
    
    executing command: SET NEWNAME
    
    executing command: SET NEWNAME
    
    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 restore at 01-NOV-04
    
    channel ch1: starting datafile backupset restore
    channel ch1: specifying datafile(s) to restore from backup set
    restoring datafile 00001 to C:\ORACLE\ORADATA\JEFFDUP\SYSTEM01.DBF
    restoring datafile 00002 to C:\ORACLE\ORADATA\JEFFDUP\UNDOTBS01.DBF
    restoring datafile 00003 to C:\ORACLE\ORADATA\JEFFDUP\CWMLITE01.DBF
    restoring datafile 00004 to C:\ORACLE\ORADATA\JEFFDUP\DRSYS01.DBF
    restoring datafile 00005 to C:\ORACLE\ORADATA\JEFFDUP\EXAMPLE01.DBF
    restoring datafile 00006 to C:\ORACLE\ORADATA\JEFFDUP\INDX01.DBF
    restoring datafile 00007 to C:\ORACLE\ORADATA\JEFFDUP\ODM01.DBF
    restoring datafile 00008 to C:\ORACLE\ORADATA\JEFFDUP\TOOLS01.DBF
    restoring datafile 00009 to C:\ORACLE\ORADATA\JEFFDUP\USERS01.DBF
    restoring datafile 00010 to C:\ORACLE\ORADATA\JEFFDUP\XDB01.DBF
    restoring datafile 00011 to C:\ORACLE\ORADATA\JEFFDUP\PERFSTAT01.DBF
    restoring datafile 00012 to C:\ORACLE\ORADATA\JEFFDUP\OEM_REPOSITORY01.DBF
    channel ch1: restored backup piece 1
    piece handle=C:\ORACLE\ORABACKUP\JEFFDB\BACKUP_DB_JEFFDB_S_11_P_11_T_541081918 tag=TAG20041101T123156 params=NULL
    channel ch1: restore complete
    Finished restore at 01-NOV-04
    sql statement: CREATE CONTROLFILE REUSE SET DATABASE "JEFFDUP" RESETLOGS ARCHIVELOG
      MAXLOGFILES      5
      MAXLOGMEMBERS      3
      MAXDATAFILES      100
      MAXINSTANCES     1
      MAXLOGHISTORY      226
     LOGFILE
      GROUP  1 ( 'C:\ORACLE\ORADATA\JEFFDUP\REDO01.LOG' ) SIZE  104857600  REUSE,
      GROUP  2 ( 'C:\ORACLE\ORADATA\JEFFDUP\REDO02.LOG' ) SIZE  104857600  REUSE,
      GROUP  3 ( 'C:\ORACLE\ORADATA\JEFFDUP\REDO03.LOG' ) SIZE  104857600  REUSE
     DATAFILE
      'C:\ORACLE\ORADATA\JEFFDUP\SYSTEM01.DBF'
     CHARACTER SET WE8MSWIN1252
    
    
    printing stored script: Memory Script
    {
       switch clone datafile all;
    }
    executing script: Memory Script
    
    datafile 2 switched to datafile copy
    input datafilecopy recid=1 stamp=541097299 filename=C:\ORACLE\ORADATA\JEFFDUP\UNDOTBS01.DBF
    datafile 3 switched to datafile copy
    input datafilecopy recid=2 stamp=541097299 filename=C:\ORACLE\ORADATA\JEFFDUP\CWMLITE01.DBF
    datafile 4 switched to datafile copy
    input datafilecopy recid=3 stamp=541097299 filename=C:\ORACLE\ORADATA\JEFFDUP\DRSYS01.DBF
    datafile 5 switched to datafile copy
    input datafilecopy recid=4 stamp=541097299 filename=C:\ORACLE\ORADATA\JEFFDUP\EXAMPLE01.DBF
    datafile 6 switched to datafile copy
    input datafilecopy recid=5 stamp=541097299 filename=C:\ORACLE\ORADATA\JEFFDUP\INDX01.DBF
    datafile 7 switched to datafile copy
    input datafilecopy recid=6 stamp=541097299 filename=C:\ORACLE\ORADATA\JEFFDUP\ODM01.DBF
    datafile 8 switched to datafile copy
    input datafilecopy recid=7 stamp=541097299 filename=C:\ORACLE\ORADATA\JEFFDUP\TOOLS01.DBF
    datafile 9 switched to datafile copy
    input datafilecopy recid=8 stamp=541097299 filename=C:\ORACLE\ORADATA\JEFFDUP\USERS01.DBF
    datafile 10 switched to datafile copy
    input datafilecopy recid=9 stamp=541097299 filename=C:\ORACLE\ORADATA\JEFFDUP\XDB01.DBF
    datafile 11 switched to datafile copy
    input datafilecopy recid=10 stamp=541097299 filename=C:\ORACLE\ORADATA\JEFFDUP\PERFSTAT01.DBF
    datafile 12 switched to datafile copy
    input datafilecopy recid=11 stamp=541097299 filename=C:\ORACLE\ORADATA\JEFFDUP\OEM_REPOSITORY01.DBF
    
    printing stored script: Memory Script
    {
       set until scn  8116931;
       recover
       clone database
        delete archivelog
       ;
    }
    executing script: Memory Script
    
    executing command: SET until clause
    
    Starting recover at 01-NOV-04
    
    starting media recovery
    
    archive log thread 1 sequence 103 is already on disk as file C:\ORACLE\ORADATA\JEFFDB\ARCHIVE\ARC00103.001
    archive log thread 1 sequence 104 is already on disk as file C:\ORACLE\ORADATA\JEFFDB\ARCHIVE\ARC00104.001
    archive log thread 1 sequence 105 is already on disk as file C:\ORACLE\ORADATA\JEFFDB\ARCHIVE\ARC00105.001
    archive log thread 1 sequence 106 is already on disk as file C:\ORACLE\ORADATA\JEFFDB\ARCHIVE\ARC00106.001
    archive log filename=C:\ORACLE\ORADATA\JEFFDB\ARCHIVE\ARC00103.001 thread=1 sequence=103
    archive log filename=C:\ORACLE\ORADATA\JEFFDB\ARCHIVE\ARC00104.001 thread=1 sequence=104
    archive log filename=C:\ORACLE\ORADATA\JEFFDB\ARCHIVE\ARC00105.001 thread=1 sequence=105
    archive log filename=C:\ORACLE\ORADATA\JEFFDB\ARCHIVE\ARC00106.001 thread=1 sequence=106
    media recovery complete
    Finished recover at 01-NOV-04
    
    printing stored script: Memory Script
    {
       shutdown clone;
       startup clone nomount ;
    }
    executing script: Memory Script
    
    database dismounted
    Oracle instance shut down
    
    connected to auxiliary database (not started)
    Oracle instance started
    
    Total System Global Area     194060016 bytes
    
    Fixed Size                      454384 bytes
    Variable Size                150994944 bytes
    Database Buffers              41943040 bytes
    Redo Buffers                    667648 bytes
    sql statement: CREATE CONTROLFILE REUSE SET DATABASE "JEFFDUP" RESETLOGS ARCHIVELOG
      MAXLOGFILES      5
      MAXLOGMEMBERS      3
      MAXDATAFILES      100
      MAXINSTANCES     1
      MAXLOGHISTORY      226
     LOGFILE
      GROUP  1 ( 'C:\ORACLE\ORADATA\JEFFDUP\REDO01.LOG' ) SIZE  104857600  REUSE,
      GROUP  2 ( 'C:\ORACLE\ORADATA\JEFFDUP\REDO02.LOG' ) SIZE  104857600  REUSE,
      GROUP  3 ( 'C:\ORACLE\ORADATA\JEFFDUP\REDO03.LOG' ) SIZE  104857600  REUSE
     DATAFILE
      'C:\ORACLE\ORADATA\JEFFDUP\SYSTEM01.DBF'
     CHARACTER SET WE8MSWIN1252
    
    printing stored script: Memory Script
    {
       catalog clone datafilecopy  "C:\ORACLE\ORADATA\JEFFDUP\UNDOTBS01.DBF";
       catalog clone datafilecopy  "C:\ORACLE\ORADATA\JEFFDUP\CWMLITE01.DBF";
       catalog clone datafilecopy  "C:\ORACLE\ORADATA\JEFFDUP\DRSYS01.DBF";
       catalog clone datafilecopy  "C:\ORACLE\ORADATA\JEFFDUP\EXAMPLE01.DBF";
       catalog clone datafilecopy  "C:\ORACLE\ORADATA\JEFFDUP\INDX01.DBF";
       catalog clone datafilecopy  "C:\ORACLE\ORADATA\JEFFDUP\ODM01.DBF";
       catalog clone datafilecopy  "C:\ORACLE\ORADATA\JEFFDUP\TOOLS01.DBF";
       catalog clone datafilecopy  "C:\ORACLE\ORADATA\JEFFDUP\USERS01.DBF";
       catalog clone datafilecopy  "C:\ORACLE\ORADATA\JEFFDUP\XDB01.DBF";
       catalog clone datafilecopy  "C:\ORACLE\ORADATA\JEFFDUP\PERFSTAT01.DBF";
       catalog clone datafilecopy  "C:\ORACLE\ORADATA\JEFFDUP\OEM_REPOSITORY01.DBF";
       switch clone datafile all;
    }
    executing script: Memory Script
    
    cataloged datafile copy
    datafile copy filename=C:\ORACLE\ORADATA\JEFFDUP\UNDOTBS01.DBF recid=1 stamp=541097322
    
    cataloged datafile copy
    datafile copy filename=C:\ORACLE\ORADATA\JEFFDUP\CWMLITE01.DBF recid=2 stamp=541097322
    
    cataloged datafile copy
    datafile copy filename=C:\ORACLE\ORADATA\JEFFDUP\DRSYS01.DBF recid=3 stamp=541097322
    
    cataloged datafile copy
    datafile copy filename=C:\ORACLE\ORADATA\JEFFDUP\EXAMPLE01.DBF recid=4 stamp=541097323
    
    cataloged datafile copy
    datafile copy filename=C:\ORACLE\ORADATA\JEFFDUP\INDX01.DBF recid=5 stamp=541097323
    
    cataloged datafile copy
    datafile copy filename=C:\ORACLE\ORADATA\JEFFDUP\ODM01.DBF recid=6 stamp=541097323
    
    cataloged datafile copy
    datafile copy filename=C:\ORACLE\ORADATA\JEFFDUP\TOOLS01.DBF recid=7 stamp=541097323
    
    cataloged datafile copy
    datafile copy filename=C:\ORACLE\ORADATA\JEFFDUP\USERS01.DBF recid=8 stamp=541097323
    
    cataloged datafile copy
    datafile copy filename=C:\ORACLE\ORADATA\JEFFDUP\XDB01.DBF recid=9 stamp=541097323
    
    cataloged datafile copy
    datafile copy filename=C:\ORACLE\ORADATA\JEFFDUP\PERFSTAT01.DBF recid=10 stamp=541097323
    
    cataloged datafile copy
    datafile copy filename=C:\ORACLE\ORADATA\JEFFDUP\OEM_REPOSITORY01.DBF recid=11 stamp=541097323
    
    datafile 2 switched to datafile copy
    input datafilecopy recid=1 stamp=541097322 filename=C:\ORACLE\ORADATA\JEFFDUP\UNDOTBS01.DBF
    datafile 3 switched to datafile copy
    input datafilecopy recid=2 stamp=541097322 filename=C:\ORACLE\ORADATA\JEFFDUP\CWMLITE01.DBF
    datafile 4 switched to datafile copy
    input datafilecopy recid=3 stamp=541097322 filename=C:\ORACLE\ORADATA\JEFFDUP\DRSYS01.DBF
    datafile 5 switched to datafile copy
    input datafilecopy recid=4 stamp=541097323 filename=C:\ORACLE\ORADATA\JEFFDUP\EXAMPLE01.DBF
    datafile 6 switched to datafile copy
    input datafilecopy recid=5 stamp=541097323 filename=C:\ORACLE\ORADATA\JEFFDUP\INDX01.DBF
    datafile 7 switched to datafile copy
    input datafilecopy recid=6 stamp=541097323 filename=C:\ORACLE\ORADATA\JEFFDUP\ODM01.DBF
    datafile 8 switched to datafile copy
    input datafilecopy recid=7 stamp=541097323 filename=C:\ORACLE\ORADATA\JEFFDUP\TOOLS01.DBF
    datafile 9 switched to datafile copy
    input datafilecopy recid=8 stamp=541097323 filename=C:\ORACLE\ORADATA\JEFFDUP\USERS01.DBF
    datafile 10 switched to datafile copy
    input datafilecopy recid=9 stamp=541097323 filename=C:\ORACLE\ORADATA\JEFFDUP\XDB01.DBF
    datafile 11 switched to datafile copy
    input datafilecopy recid=10 stamp=541097323 filename=C:\ORACLE\ORADATA\JEFFDUP\PERFSTAT01.DBF
    datafile 12 switched to datafile copy
    input datafilecopy recid=11 stamp=541097323 filename=C:\ORACLE\ORADATA\JEFFDUP\OEM_REPOSITORY01.DBF
    
    printing stored script: Memory Script
    {
       Alter clone database open resetlogs;
    }
    executing script: Memory Script
    
    database opened
    Finished Duplicate Db at 01-NOV-04
    
    RMAN>

  9. Create All tempfiles for Temporary Tablespace

    In almost all cases, you will need to create the tempfiles for your temporary tablespace:

    C:\> set ORACLE_SID=JEFFDUP
    
    C:\> sqlplus "/ as sysdba"
    
    SQL> alter tablespace temp add tempfile 'C:\ORACLE\ORADATA\JEFFDUP\TEMP01.DBF'
      2  size 524288000 reuse autoextend on next 524288000 maxsize 1500M;
    
    Tablespace altered.


Copyright (c) 1998-2017 Jeffrey M. Hunter. All rights reserved.

All articles, scripts and material located at the Internet address of http://www.idevelopment.info is the copyright of Jeffrey M. Hunter and is protected under copyright laws of the United States. This document may not be hosted on any other site without my express, prior, written permission. Application to host any of the material elsewhere can be made by contacting me at jhunter@idevelopment.info.

I have made every effort and taken great care in making sure that the material included on my web site is technically accurate, but I disclaim any and all responsibility for any loss, damage or destruction of data or any other property which may arise from relying on it. I will in no case be liable for any monetary damages arising from such loss, damage or destruction.

Last modified on
Saturday, 18-Sep-2010 17:49:47 EDT
Page Count: 8674