I would like to duplicate to the same server Oracle Database with RMAN. I've configured flash recovery area for Oracle Database. My database is using SPFILE as shown below.

SQL> SELECT DECODE(value, NULL, 'PFILE', 'SPFILE') "Init File Type"
FROM sys.v_$parameter WHERE name = 'spfile


My questions are:

  1. if my source database uses SPFILE then do I have create a PFILE from the SPFILE? If so, how can I do that?

  2. What do they mean by this?

    You only need to create directories that are referenced in the PFILE or SPFILE.

    Which directories need to be created?

    Production Database : /u01/app/oracle/oradata/DB11G/. My SPFILE (spfileDB11g.ora):

    DB11G.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
    *.control_files='/u01/app/oracle/oradata/DB11G/control01.ctl','/u01/app/oracle/oradata/DB11G/control02.ctl'#Restore Controlfile
    *.dispatchers='(PROTOCOL=TCP) (SERVICE=DB11GXDB)'
  3. if backup files (autobackup and backup set) are in a different path on the source host (not default FRA Path) then how can I use the duplicate command? BTW, only the flashback logs are in the default location (/u01/app/oracle/fra/flashback). Path: /u01/app/oracle/oradata/DB11G/autobackup and /u01/app/oracle/oradata/DB11G/backupset.

  • Any suggestions?
    – Cell-o
    Commented May 4, 2013 at 12:56

2 Answers 2


If my source database uses SPFILE then do I have create a PFILE from the SPFILE?

Yes, you need to create a temporary PFILE to use while duplicating the database. You will later switch the new instance to use the SPFILE.


CREATE PFILE = 'path/to/pfile' FROM SPFILE;

You only need to create directories that are referenced in the PFILE or SPFILE. Which directories need to be created?

You will start the database as NOMOUNT to begin the duplication. This means the controlfiles will not be read, and so you don't need to have the directories in which the datafiles reside present in your new host. However, the directories references in the parameter files must be present. From your transcript,

DB11G.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
*.control_files='/u01/app/oracle/oradata/DB11G/control01.ctl','/u01/app/oracle/oradata/DB11G/control02.ctl'#Restore Controlfile

You may find this chapter of the documentation useful: http://docs.oracle.com/cd/B28359_01/backup.111/b28270/rcmdupdb.htm#i1006474

  • thanks for your answer. is it very important pfile name? so is that correct? CREATE PFILE = '$ORACLE_HOME\bin\dbs\init.ora' FROM SPFILE; My spfile : spfileDB11g.ora 2 - $ mkdir -p /u01/app/oracle/oradata/DB11G $ mkdir -p /u01/app/oracle/fra/DB11G $ mkdir -p /u01/app/oracle/admin/DB11G/adump $ mkdir -p /u01/app/oracle/archive_logs --> I will create all directories on the remote server. is that correct?
    – Cell-o
    Commented May 4, 2013 at 19:25
  • 1
    nice answer, thanks for contributing and joining the site! Commented May 4, 2013 at 19:31
  • Am I missing something here? Are you creating the new instance as you should be able to set up the instance to use an spfile before running the rman duplicate command. Otherwise you'll need to take a note of the control file names as you will need to edit the pfile to update the control file statement if I am not mistaken Commented May 4, 2013 at 20:51
  • is there any comment related 3rd question?
    – Cell-o
    Commented May 5, 2013 at 20:01


In case of the oldskool manual duplicate on the target server ( where you want the duplication ) you can do rman target / catalog start with '<path to backup>';

Then it'll print out all the backups, don't worry if you have other files in here. He'll give a couldn't read header something.

After this you should do crosscheck backup; So it will be updated with what is present. It'll show the backups it can't reach anymore with expired. You don't have to do delete expired.

You can can also do a duplicate from an active database which is easier. cfr http://docs.oracle.com/cd/B28359_01/backup.111/b28270/rcmdupdb.htm#i1006629

  • thanks. Let's say paths are : /u01/app/oracle/backups/autobackup , /u01/app/oracle/backups/backupset. can you give me exactly DUPLICATE command with PARAMETERs?
    – Cell-o
    Commented May 6, 2013 at 13:08
  • I cannot at this time. The link I provided should suffice to give you enough information. When using the duplicate from active database you won't need the backup files. It will start from the datafiles present on the source and recover using the archives. There might be something else you'll need to pay attention for, that is if the file structure is not the same. You'll have to make the proper adjustments in the duplicate block or in the spfile/pfile. I assume you have a test setup? Play a bit with it. Report the failures.
    – Munchi
    Commented May 7, 2013 at 11:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.