Friday, September 20, 2013

Duplicate database on same host with coldbackup (No catalog,No Target)

A brief explanation from Oracle documentation on Filename checks:
For this exercise, I took rman backup at mount state (COLD BACKUP through RMAN)

Using SET NEWNAME to Name File System Data Files and Temp Files


one way to name duplicate data files is to use the SET NEWNAME command before executing the DUPLICATE command. RMAN supports the following commands, listed in order of precedence:
  1. SET NEWNAME FOR DATAFILE and SET NEWNAME FOR TEMPFILE
  2. SET NEWNAME FOR TABLESPACE
  3. SET NEWNAME FOR DATABASE
The order of precedence means that SET NEWNAME FOR TABLESPACE specifies names for files not already named by SET NEWNAME FOR DATAFILE and SET NEWNAME FOR TEMPFILE, whereas SET NEWNAME FOR DATABASE specifies names for files not already named by SET NEWNAME FOR TABLESPACE, SET NEWNAME FOR DATAFILE, or SET NEWNAME FOR TEMPFILE.
When using SET NEWNAME FOR DATAFILE, you can specify a full path as a literal, as in /oradata1/system01.dbf. When using SET with FOR DATABASE or FOR TABLESPACE, however, you must use at least one of the first three substitution variables summarized in Table 25-1 (%I and %N are optional).
Table 25-1 Substitution Variables for SET NEWNAME
VariableSummary
%b
Specifies the file name stripped of directory paths. For example, if a data file is named /oradata/prod/financial.dbf, then %bresults in financial.dbf.
%f
Specifies the absolute file number of the data file for which the new name is generated. For example, if data file 2 is duplicated, then%f generates the value 2.
%I
Specifies the DBID
%N
Specifies the tablespace name
%U
Specifies the following format: data-D-%d_id-%I_TS-%N_FNO-%f
To use SET NEWNAME to specify new file names:
  1. Follow Steps 1 through 4 in "Basic Steps of Database Duplication".
  2. Within a RUN command, issue the SET NEWNAME command before issuing DUPLICATE.
    Example 25-1 illustrates a script that specifies new names for data files 1 through 5 and temp file 1. The script does not set a new name for data file 6because it is in the TOOLS tablespace, which is excluded from the duplicate database.
    Example 25-1 Duplicating with SET NEWNAME FOR DATAFILE
    RUN
    {
      SET NEWNAME FOR DATAFILE 1 TO '/oradata1/system01.dbf'; 
      SET NEWNAME FOR DATAFILE 2 TO '/oradata2/sysaux01.dbf';
      SET NEWNAME FOR DATAFILE 3 TO '/oradata3/undotbs01.dbf';
      SET NEWNAME FOR DATAFILE 4 TO '/oradata4/users01.dbf'; 
      SET NEWNAME FOR DATAFILE 5 TO '/oradata5/users02.dbf';
      SET NEWNAME FOR TEMPFILE 1 TO '/oradatat/temp01.dbf'; 
      DUPLICATE TARGET DATABASE TO dupdb
        SKIP TABLESPACE tools
        LOGFILE
          GROUP 1 ('/duplogs/redo01a.log', 
                   '/duplogs/redo01b.log') SIZE 4M REUSE, 
          GROUP 2 ('/duplogs/redo02a.log', 
                   '/duplogs/redo02b.log') SIZE 4M REUSE;
    }
    
    Example 25-2 is a variation of Example 25-1 and uses one SET NEWNAME command to name all data files in the tablespace users. Once the example completes, the file names for tablespace users are set to: /oradata4/users01.dbf and /oradata5/users02.dbf.
    Example 25-2 Duplicating with SET NEWNAME FOR DATAFILE and FOR TABLESPACE
    RUN
    {
      SET NEWNAME FOR TABLESPACE users TO '/oradata%f/%b';
      SET NEWNAME FOR DATAFILE 1 TO '/oradata1/system01.dbf'; 
      SET NEWNAME FOR DATAFILE 2 TO '/oradata2/sysaux01.dbf';
      SET NEWNAME FOR DATAFILE 3 TO '/oradata3/undotbs01.dbf'; 
      SET NEWNAME FOR TEMPFILE 1 TO '/oradatat/temp01.dbf'; 
      DUPLICATE TARGET DATABASE TO dupdb
        SKIP TABLESPACE tools
        LOGFILE
          GROUP 1 ('/duplogs/redo01a.log', 
                   '/duplogs/redo01b.log') SIZE 4M REUSE, 
          GROUP 2 ('/duplogs/redo02a.log', 
                   '/duplogs/redo02b.log') SIZE 4M REUSE;
    }
    
    Example 25-3 is a variation of Example 25-1 and uses a single SET command to name all data files in the database.
    Example 25-3 Duplicating with SET NEWNAME FOR DATABASE
    RUN
    {
      SET NEWNAME FOR DATABASE TO '/oradata/%U'; 
      DUPLICATE TARGET DATABASE TO dupdb
        SKIP TABLESPACE tools
        LOGFILE
          GROUP 1 ('/duplogs/redo01a.log', 
                   '/duplogs/redo01b.log') SIZE 4M REUSE, 
          GROUP 2 ('/duplogs/redo02a.log', 
                   '/duplogs/redo02b.log') SIZE 4M REUSE;
    }
    
Assume the following:
  • DBID is 87650928
  • Database name is PROD
Table 25-2 shows the results from Example 25-3.
Table 25-2 Results from Example 25-3 SET NEWNAME DATABASE Command
Before SET NEWNAME DATABASETablespace NameData File File NumberAfter SET NEWNAME DATABASE TO '/oradata/%U';
.../system01.dbf
SYSTEM
1
/oradata/data-D-PROD_id-87650928_TS-SYSTEM_FNO-1
.../sysaux01.dbf
SYSAUX
2
/oradata/data-D-PROD_id-87650928_TS-SYSAUX_FNO-2
.../undotbs01.dbf
UNDOTS
3
/oradata/data-D-PROD_id-87650928_TS-UNDOTS_FNO-3
.../users01.dbf
USERS
4
/oradata/data-D-PROD_id-87650928_TS-USERS_FNO-4
.../users02.dbf
USERS
5
/oradata/data-D-PROD_id-87650928_TS-USERS_FNO-5
.../temp01.dbf
TEMP
1
/oradata/data-D-PROD_id-87650928_TS-TEMP_FNO-1
See Also:
Oracle Database Backup and Recovery Reference for details on substitution variables usable in SET NEWNAME

Using CONFIGURE AUXNAME to Name File System Data Files and OMF/ASM Target Data Files

The CONFIGURE AUXNAME command is an alternative to the SET NEWNAME command. The difference is that after you configure the auxiliary name the first time, additional DUPLICATE commands reuse the configured settings. In contrast, you must reissue the SET NEWNAME command every time you execute theDUPLICATE command.
To use CONFIGURE AUXNAME to specify names for duplicate data files:
  1. Issue a CONFIGURE AUXNAME command for each file that you want to name in the duplicate database.
    For example, enter the following commands at the RMAN prompt to specify names for data files 1 through 5:
      CONFIGURE AUXNAME FOR DATAFILE 1 TO '/oradata1/system01.dbf'; 
      CONFIGURE AUXNAME FOR DATAFILE 2 TO '/oradata2/sysaux01.dbf';
      CONFIGURE AUXNAME FOR DATAFILE 3 TO '/oradata3/undotbs01.dbf';
      CONFIGURE AUXNAME FOR DATAFILE 4 TO '/oradata4/users01.dbf'; 
      CONFIGURE AUXNAME FOR DATAFILE 5 TO '/oradata5/users02.dbf';
    
  2. Issue a DUPLICATE command.
    For example, enter the following command at the RMAN prompt:
    SET NEWNAME FOR TEMPFILE 1 TO '/oradatat/temp01.dbf'; 
    DUPLICATE TARGET DATABASE
      TO dupdb
      SKIP TABLESPACE tools
      LOGFILE
        GROUP 1 ('/duplogs/redo01a.log',
                 '/duplogs/redo01b.log') SIZE 4M REUSE,
        GROUP 2 ('/duplogs/redo02a.log',
                 '/duplogs/redo02b.log') SIZE 4M REUSE;
    
    RMAN uses the CONFIGURE AUXNAME settings to name data files 1 through 5.

RUN
{
SET NEWNAME FOR DATABASE TO '/u02/oradata/RLTEST/RLTEST%b';
DUPLICATE DATABASE to RLTEST Backup LOCATION '/u02/clonedb_rman'
}

LOGFILE GROUP 1 '/u02/oradata/RLTEST/RLTESTredo1a.log' size 5M REUSE,
GROUP 2 '/u02/oradata/RLTEST/RLTESTredo2a.log' size 5M REUSE;

[oracle@asus001n1 ~]$ rman target /

Recovery Manager: Release 11.2.0.1.0 - Production on Fri Sep 20 03:50:12 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: RLTEST (not mounted)

RMAN> RUN
2> {
SET NEWNAME FOR DATABASE TO '/u02/oradata/RLTEST/RLTEST%b.dbf';
3> 4> DUPLICATE DATABASE to RLTEST
Backup LOCATION '/u02/clonedb_rman';
5> 6> LOGFILE GROUP 1 ('/u02/oradata/RLTEST/RLTESTredo1a.log') size 5M,
GROUP 2 ('/u02/oradata/RLTEST/RLTESTredo2a.log') size 5M;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "logfile": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, convert, copy, crosscheck, delete,

duplicate, execute, flashback, host, mount, open, recover, release, repair, report, restore, resync, send, set, show, shutdown, sql, startup, switch, transport,

validate, }"
RMAN-01007: at line 6 column 1 file: standard input

RMAN>
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "group": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, connect, convert, copy, create, crosscheck,

delete, drop, duplicate, exit, flashback, grant, host, import, list, mount, open, print, quit, recover, register, release, repair, replace, report, reset, restore,

resync, revoke, run, send, set, show, shutdown, spool, sql, startup, switch, transport, unregister, upgrade, validate, {, "
RMAN-01007: at line 1 column 1 file: standard input

RMAN> }

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "}": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, connect, convert, copy, create, crosscheck,

delete, drop, duplicate, exit, flashback, grant, host, import, list, mount, open, print, quit, recover, register, release, repair, replace, report, reset, restore,

resync, revoke, run, send, set, show, shutdown, spool, sql, startup, switch, transport, unregister, upgrade, validate, {, "
RMAN-01007: at line 1 column 1 file: standard input

RMAN> RUN
2> {
SET NEWNAME FOR DATABASE TO '/u02/oradata/RLTEST/RLTEST%b.dbf';
3> 4> DUPLICATE DATABASE to RLTEST
Backup LOCATION '/u02/clonedb_rman';
5> 6> LOG FILE GROUP 1 ('/u02/oradata/RLTEST/RLTESTredo1a.log') size 5M,
GROUP 2 ('/u02/oradata/RLTEST/RLTESTredo2a.log') size 5M;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "log": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, convert, copy, crosscheck, delete, duplicate,

execute, flashback, host, mount, open, recover, release, repair, report, restore, resync, send, set, show, shutdown, sql, startup, switch, transport, validate, }"
RMAN-01007: at line 6 column 1 file: standard input

RMAN>
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "group": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, connect, convert, copy, create, crosscheck,

delete, drop, duplicate, exit, flashback, grant, host, import, list, mount, open, print, quit, recover, register, release, repair, replace, report, reset, restore,

resync, revoke, run, send, set, show, shutdown, spool, sql, startup, switch, transport, unregister, upgrade, validate, {, "
RMAN-01007: at line 1 column 1 file: standard input

RMAN> }

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "}": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, connect, convert, copy, create, crosscheck,

delete, drop, duplicate, exit, flashback, grant, host, import, list, mount, open, print, quit, recover, register, release, repair, replace, report, reset, restore,

resync, revoke, run, send, set, show, shutdown, spool, sql, startup, switch, transport, unregister, upgrade, validate, {, "
RMAN-01007: at line 1 column 1 file: standard input

RMAN> RUN
2> {
SET NEWNAME FOR DATABASE TO '/u02/oradata/RLTEST/RLTEST%b.dbf';
3> 4> DUPLICATE DATABASE to RLTEST
5> Backup LOCATION '/u02/clonedb_rman';
LOGFILE
6> GROUP 1 ('/u02/oradata/RLTEST/RLTESTredo1a.log') size 5M,

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "logfile": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, convert, copy, crosscheck, delete,

duplicate, execute, flashback, host, mount, open, recover, release, repair, report, restore, resync, send, set, show, shutdown, sql, startup, switch, transport,

validate, }"
RMAN-01007: at line 6 column 1 file: standard input

RMAN>
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "group": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, connect, convert, copy, create, crosscheck,

delete, drop, duplicate, exit, flashback, grant, host, import, list, mount, open, print, quit, recover, register, release, repair, replace, report, reset, restore,

resync, revoke, run, send, set, show, shutdown, spool, sql, startup, switch, transport, unregister, upgrade, validate, {, "
RMAN-01007: at line 1 column 1 file: standard input

RMAN> GROUP 2 ('/u02/oradata/RLTEST/RLTESTredo2a.log') size 5M;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "group": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, connect, convert, copy, create, crosscheck,

delete, drop, duplicate, exit, flashback, grant, host, import, list, mount, open, print, quit, recover, register, release, repair, replace, report, reset, restore,

resync, revoke, run, send, set, show, shutdown, spool, sql, startup, switch, transport, unregister, upgrade, validate, {, "
RMAN-01007: at line 1 column 1 file: standard input

RMAN> }

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "}": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, connect, convert, copy, create, crosscheck,

delete, drop, duplicate, exit, flashback, grant, host, import, list, mount, open, print, quit, recover, register, release, repair, replace, report, reset, restore,

resync, revoke, run, send, set, show, shutdown, spool, sql, startup, switch, transport, unregister, upgrade, validate, {, "
RMAN-01007: at line 1 column 1 file: standard input

RMAN> exit


Recovery Manager complete.
[oracle@asus001n1 ~]$ echo $ORACLE_SID
RLTEST
[oracle@asus001n1 ~]$ rman target /

Recovery Manager: Release 11.2.0.1.0 - Production on Fri Sep 20 04:02:00 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: RLTEST (not mounted)

RMAN> RUN
2> {
SET NEWNAME FOR DATABASE TO '/u02/oradata/RLTEST/RLTEST%b.dbf';
3> 4> LOGFILE
GROUP 1 ('/u02/oradata/RLTEST/RLTESTredo1a.log') size 5M,

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "logfile": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, convert, copy, crosscheck, delete,

duplicate, execute, flashback, host, mount, open, recover, release, repair, report, restore, resync, send, set, show, shutdown, sql, startup, switch, transport,

validate, }"
RMAN-01007: at line 4 column 1 file: standard input

RMAN>
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "group": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, connect, convert, copy, create, crosscheck,

delete, drop, duplicate, exit, flashback, grant, host, import, list, mount, open, print, quit, recover, register, release, repair, replace, report, reset, restore,

resync, revoke, run, send, set, show, shutdown, spool, sql, startup, switch, transport, unregister, upgrade, validate, {, "
RMAN-01007: at line 1 column 1 file: standard input

RMAN> GROUP 2 ('/u02/oradata/RLTEST/RLTESTredo2a.log') size 5M;
DUPLICATE DATABASE to RLTEST

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "group": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, connect, convert, copy, create, crosscheck,

delete, drop, duplicate, exit, flashback, grant, host, import, list, mount, open, print, quit, recover, register, release, repair, replace, report, reset, restore,

resync, revoke, run, send, set, show, shutdown, spool, sql, startup, switch, transport, unregister, upgrade, validate, {, "
RMAN-01007: at line 1 column 1 file: standard input

RMAN> 2> Backup LOCATION '/u02/clonedb_rman';

Starting Duplicate Db at 20-SEP-13
}
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 09/20/2013 04:02:36
RMAN-06174: not connected to auxiliary database

RMAN>
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "}": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, connect, convert, copy, create, crosscheck,

delete, drop, duplicate, exit, flashback, grant, host, import, list, mount, open, print, quit, recover, register, release, repair, replace, report, reset, restore,

resync, revoke, run, send, set, show, shutdown, spool, sql, startup, switch, transport, unregister, upgrade, validate, {, "
RMAN-01007: at line 1 column 1 file: standard input

RMAN> RUN
{
SET NEWNAME FOR DATABASE TO '/u02/oradata/RLTEST/RLTEST%b.dbf';
DUPLICATE DATABASE to RLTEST
Backup LOCATION '/u02/clonedb_rman';
}
2> 3> 4> 5> 6>
executing command: SET NEWNAME

Starting Duplicate Db at 20-SEP-13
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 09/20/2013 04:03:40
RMAN-06174: not connected to auxiliary database

RMAN> exit


Recovery Manager complete.
[oracle@asus001n1 ~]$ rman auxiliary /

Recovery Manager: Release 11.2.0.1.0 - Production on Fri Sep 20 04:04:37 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to auxiliary database: RLTEST (not mounted)

RMAN> RUN
2> {
SET NEWNAME FOR DATABASE TO '/u02/oradata/RLTEST/RLTEST%b.dbf';
3> 4> DUPLICATE DATABASE to RLTEST
Backup LOCATION '/u02/clonedb_rman';
5> 6> LOGFILE GROUP 1('/u02/oradata/RLTEST/RLTESTredo1a.log') size 5M,

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "logfile": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, convert, copy, crosscheck, delete,

duplicate, execute, flashback, host, mount, open, recover, release, repair, report, restore, resync, send, set, show, shutdown, sql, startup, switch, transport,

validate, }"
RMAN-01007: at line 6 column 1 file: standard input

RMAN> GROUP 2('/u02/oradata/RLTEST/RLTESTredo2a.log') size 5M;
}

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "group": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, connect, convert, copy, create, crosscheck,

delete, drop, duplicate, exit, flashback, grant, host, import, list, mount, open, print, quit, recover, register, release, repair, replace, report, reset, restore,

resync, revoke, run, send, set, show, shutdown, spool, sql, startup, switch, transport, unregister, upgrade, validate, {, "
RMAN-01007: at line 1 column 1 file: standard input

RMAN>
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "}": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, connect, convert, copy, create, crosscheck,

delete, drop, duplicate, exit, flashback, grant, host, import, list, mount, open, print, quit, recover, register, release, repair, replace, report, reset, restore,

resync, revoke, run, send, set, show, shutdown, spool, sql, startup, switch, transport, unregister, upgrade, validate, {, "
RMAN-01007: at line 1 column 1 file: standard input

RMAN>



RMAN>
RMAN>
RMAN>

RMAN>

RMAN> RUN
2> {
SET NEWNAME FOR DATABASE TO '/u02/oradata/RLTEST/RLTEST%b.dbf';
3> 4> DUPLICATE DATABASE to RLTEST
Backup LOCATION '/u02/clonedb_rman';
5> 6> LOGFILE GROUP 1 '/u02/oradata/RLTEST/RLTESTredo1a.log' size 5M,
GROUP 2 '/u02/oradata/RLTEST/RLTESTredo2a.log' size 5M;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "logfile": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, convert, copy, crosscheck, delete,

duplicate, execute, flashback, host, mount, open, recover, release, repair, report, restore, resync, send, set, show, shutdown, sql, startup, switch, transport,

validate, }"
RMAN-01007: at line 6 column 1 file: standard input

RMAN>
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "group": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, connect, convert, copy, create, crosscheck,

delete, drop, duplicate, exit, flashback, grant, host, import, list, mount, open, print, quit, recover, register, release, repair, replace, report, reset, restore,

resync, revoke, run, send, set, show, shutdown, spool, sql, startup, switch, transport, unregister, upgrade, validate, {, "
RMAN-01007: at line 1 column 1 file: standard input

RMAN> }

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "}": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, connect, convert, copy, create, crosscheck,

delete, drop, duplicate, exit, flashback, grant, host, import, list, mount, open, print, quit, recover, register, release, repair, replace, report, reset, restore,

resync, revoke, run, send, set, show, shutdown, spool, sql, startup, switch, transport, unregister, upgrade, validate, {, "
RMAN-01007: at line 1 column 1 file: standard input

RMAN>

RMAN>

RMAN>

RMAN> RUN
2> {
3> allocate auxiliary channel c1 type disk;
SET NEWNAME FOR DATABASE TO '/u02/oradata/RLTEST/RLTEST%b.dbf';
4> 5> DUPLICATE DATABASE to RLTEST
Backup LOCATION '/u02/clonedb_rman';
LOGFILE GROUP 1 '/u02/oradata/RLTEST/RLTESTredo1a.log' size 5M,
6> 7>
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "logfile": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, convert, copy, crosscheck, delete,

duplicate, execute, flashback, host, mount, open, recover, release, repair, report, restore, resync, send, set, show, shutdown, sql, startup, switch, transport,

validate, }"
RMAN-01007: at line 7 column 1 file: standard input

RMAN> GROUP 2 '/u02/oradata/RLTEST/RLTESTredo2a.log' size 5M;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "group": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, connect, convert, copy, create, crosscheck,

delete, drop, duplicate, exit, flashback, grant, host, import, list, mount, open, print, quit, recover, register, release, repair, replace, report, reset, restore,

resync, revoke, run, send, set, show, shutdown, spool, sql, startup, switch, transport, unregister, upgrade, validate, {, "
RMAN-01007: at line 1 column 1 file: standard input

RMAN> }

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "}": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, connect, convert, copy, create, crosscheck,

delete, drop, duplicate, exit, flashback, grant, host, import, list, mount, open, print, quit, recover, register, release, repair, replace, report, reset, restore,

resync, revoke, run, send, set, show, shutdown, spool, sql, startup, switch, transport, unregister, upgrade, validate, {, "
RMAN-01007: at line 1 column 1 file: standard input

RMAN>



RMAN>
RMAN>
RMAN> RUN
2> {
allocate auxiliary channel c1 type disk;
3> 4> SET NEWNAME FOR DATABASE TO '/u02/oradata/RLTEST/RLTEST%b.dbf';
DUPLICATE DATABASE to RLTEST
Backup LOCATION '/u02/clonedb_rman'
LOGFILE GROUP 1 '/u02/oradata/RLTEST/RLTESTredo1a.log' size 5M,
GROUP 2 '/u02/oradata/RLTEST/RLTESTredo2a.log' size 5M;
5> }
6>
7>
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "single-quoted-string": expecting one of: "("
RMAN-01007: at line 7 column 17 file: standard input

RMAN>
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "group": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, connect, convert, copy, create, crosscheck,

delete, drop, duplicate, exit, flashback, grant, host, import, list, mount, open, print, quit, recover, register, release, repair, replace, report, reset, restore,

resync, revoke, run, send, set, show, shutdown, spool, sql, startup, switch, transport, unregister, upgrade, validate, {, "
RMAN-01007: at line 1 column 1 file: standard input

RMAN>
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "}": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, connect, convert, copy, create, crosscheck,

delete, drop, duplicate, exit, flashback, grant, host, import, list, mount, open, print, quit, recover, register, release, repair, replace, report, reset, restore,

resync, revoke, run, send, set, show, shutdown, spool, sql, startup, switch, transport, unregister, upgrade, validate, {, "
RMAN-01007: at line 1 column 1 file: standard input

RMAN>
RMAN>

RMAN>

RMAN>

RMAN> RUN
2> {
3> allocate auxiliary channel c1 type disk;
SET NEWNAME FOR DATABASE TO '/u02/oradata/RLTEST/RLTEST%b.dbf';
4> 5> DUPLICATE DATABASE to RLTEST
Backup LOCATION '/u02/clonedb_rman';
6> LOGFILE GROUP1 '/u02/oradata/RLTEST/RLTESTredo1a.log' size 5M,
7>
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "logfile": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, convert, copy, crosscheck, delete,

duplicate, execute, flashback, host, mount, open, recover, release, repair, report, restore, resync, send, set, show, shutdown, sql, startup, switch, transport,

validate, }"
RMAN-01007: at line 7 column 1 file: standard input

RMAN> GROUP2 '/u02/oradata/RLTEST/RLTESTredo2a.log' size 5M;
}

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "identifier": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, connect, convert, copy, create,

crosscheck, delete, drop, duplicate, exit, flashback, grant, host, import, list, mount, open, print, quit, recover, register, release, repair, replace, report, reset,

restore, resync, revoke, run, send, set, show, shutdown, spool, sql, startup, switch, transport, unregister, upgrade, validate, {, "
RMAN-01008: the bad identifier was: GROUP2
RMAN-01007: at line 1 column 1 file: standard input

RMAN>
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "}": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, connect, convert, copy, create, crosscheck,

delete, drop, duplicate, exit, flashback, grant, host, import, list, mount, open, print, quit, recover, register, release, repair, replace, report, reset, restore,

resync, revoke, run, send, set, show, shutdown, spool, sql, startup, switch, transport, unregister, upgrade, validate, {, "
RMAN-01007: at line 1 column 1 file: standard input

RMAN>

RMAN>


RMAN>
RMAN>

RMAN>


RMAN>
RMAN> restore controlfile from '/u02/clonedb_rman/CLONE_DB_02ok9shm.bak';

Starting restore at 20-SEP-13
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 09/20/2013 04:15:42
RMAN-06171: not connected to target database

RMAN> RUN
2> {
allocate auxiliary channel c1 type disk;
SET NEWNAME FOR DATABASE TO '/u02/oradata/RLTEST/RLTEST%b.dbf';
DUPLICATE DATABASE to RLTEST nofilenamecheck
3> Backup LOCATION '/u02/clonedb_rman';
4> LOGFILE GROUP1 '/u02/oradata/RLTEST/RLTESTredo1a.log' size 5M,
5> GROUP2 '/u02/oradata/RLTEST/RLTESTredo2a.log' size 5M;
6> }
7>
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "logfile": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, convert, copy, crosscheck, delete,

duplicate, execute, flashback, host, mount, open, recover, release, repair, report, restore, resync, send, set, show, shutdown, sql, startup, switch, transport,

validate, }"
RMAN-01007: at line 7 column 1 file: standard input

RMAN>
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "identifier": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, connect, convert, copy, create,

crosscheck, delete, drop, duplicate, exit, flashback, grant, host, import, list, mount, open, print, quit, recover, register, release, repair, replace, report, reset,

restore, resync, revoke, run, send, set, show, shutdown, spool, sql, startup, switch, transport, unregister, upgrade, validate, {, "
RMAN-01008: the bad identifier was: GROUP2
RMAN-01007: at line 1 column 1 file: standard input

RMAN>
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "}": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, connect, convert, copy, create, crosscheck,

delete, drop, duplicate, exit, flashback, grant, host, import, list, mount, open, print, quit, recover, register, release, repair, replace, report, reset, restore,

resync, revoke, run, send, set, show, shutdown, spool, sql, startup, switch, transport, unregister, upgrade, validate, {, "
RMAN-01007: at line 1 column 1 file: standard input

RMAN>


RMAN>
RMAN>

RMAN> RUN
2> {
allocate auxiliary channel c1 device type disk;
3> 4> SET NEWNAME FOR DATABASE TO '/u02/oradata/RLTEST/RLTEST%b.dbf';
5> DUPLICATE DATABASE to RLTEST Backup LOCATION '/u02/clonedb_rman';
LOGFILE GROUP 1 '/u02/oradata/RLTEST/RLTESTredo1a.log' size 5M,
6>
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "logfile": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, convert, copy, crosscheck, delete,

duplicate, execute, flashback, host, mount, open, recover, release, repair, report, restore, resync, send, set, show, shutdown, sql, startup, switch, transport,

validate, }"
RMAN-01007: at line 6 column 1 file: standard input

RMAN> GROUP 2 '/u02/oradata/RLTEST/RLTESTredo2a.log' size 5M;
}

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "group": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, connect, convert, copy, create, crosscheck,

delete, drop, duplicate, exit, flashback, grant, host, import, list, mount, open, print, quit, recover, register, release, repair, replace, report, reset, restore,

resync, revoke, run, send, set, show, shutdown, spool, sql, startup, switch, transport, unregister, upgrade, validate, {, "
RMAN-01007: at line 1 column 1 file: standard input

RMAN>
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "}": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, connect, convert, copy, create, crosscheck,

delete, drop, duplicate, exit, flashback, grant, host, import, list, mount, open, print, quit, recover, register, release, repair, replace, report, reset, restore,

resync, revoke, run, send, set, show, shutdown, spool, sql, startup, switch, transport, unregister, upgrade, validate, {, "
RMAN-01007: at line 1 column 1 file: standard input

RMAN>


RMAN>
RMAN>

RMAN>

RMAN> RUN
{
allocate auxiliary channel c1 device type disk;
SET NEWNAME FOR DATABASE TO '/u02/oradata/RLTEST/RLTEST%b.dbf';
DUPLICATE DATABASE to RLTEST Backup LOCATION '/u02/clonedb_rman';

}
2> 3> 4> 5> 6> 7>
allocated channel: c1
channel c1: SID=135 device type=DISK

executing command: SET NEWNAME

Starting Duplicate Db at 20-SEP-13

contents of Memory Script:
{
   sql clone "create spfile from memory";
}
executing Memory Script

sql statement: create spfile from memory

contents of Memory Script:
{
   shutdown clone immediate;
   startup clone nomount;
}
executing Memory Script

Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area    1068937216 bytes

Fixed Size                     2220200 bytes
Variable Size                620760920 bytes
Database Buffers             440401920 bytes
Redo Buffers                   5554176 bytes

contents of Memory Script:
{
   sql clone "alter system set  db_name =
 ''CLONE_DB'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   sql clone "alter system set  db_unique_name =
 ''RLTEST'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   shutdown clone immediate;
   startup clone force nomount
   restore clone primary controlfile from  '/u02/clonedb_rman/CLONE_DB_02ok9shm.bak';
   alter clone database mount;
}
executing Memory Script

sql statement: alter system set  db_name =  ''CLONE_DB'' comment= ''Modified by RMAN duplicate'' scope=spfile

sql statement: alter system set  db_unique_name =  ''RLTEST'' comment= ''Modified by RMAN duplicate'' scope=spfile

Oracle instance shut down

Oracle instance started

Total System Global Area    1068937216 bytes

Fixed Size                     2220200 bytes
Variable Size                620760920 bytes
Database Buffers             440401920 bytes
Redo Buffers                   5554176 bytes

Starting restore at 20-SEP-13
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 09/20/2013 04:29:30
RMAN-03015: error occurred in stored script Memory Script
RMAN-00600: internal error, arguments [6026] [1] [] [] []
RMAN-06489: no configuration found to allocate clone channel 0 for device type DISK

RMAN> exit


Recovery Manager complete.
[oracle@asus001n1 ~]$ echo $ORACLE_SID
RLTEST
[oracle@asus001n1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Fri Sep 20 04:36:22 2013

Copyright (c) 1982, 2009, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> shut immediate;
ORA-01507: database not mounted


ORACLE instance shut down.
SQL> startup nomount;
ORACLE instance started.

Total System Global Area 1068937216 bytes
Fixed Size                  2220200 bytes
Variable Size             616566616 bytes
Database Buffers          444596224 bytes
Redo Buffers                5554176 bytes
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@asus001n1 ~]$ rmant auxiliary /
-bash: rmant: command not found
[oracle@asus001n1 ~]$ rman auxiliary /

Recovery Manager: Release 11.2.0.1.0 - Production on Fri Sep 20 04:38:19 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to auxiliary database: RLTEST (not mounted)

RMAN> RUN
{
SET NEWNAME FOR DATABASE TO '/u02/oradata/RLTEST/RLTEST%b.dbf';
DUPLICATE DATABASE to RLTEST Backup LOCATION '/u02/clonedb_rman';
}
2> 3> 4> 5>
executing command: SET NEWNAME

Starting Duplicate Db at 20-SEP-13

contents of Memory Script:
{
   sql clone "create spfile from memory";
}
executing Memory Script

sql statement: create spfile from memory

contents of Memory Script:
{
   shutdown clone immediate;
   startup clone nomount;
}
executing Memory Script

Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area    1068937216 bytes

Fixed Size                     2220200 bytes
Variable Size                620760920 bytes
Database Buffers             440401920 bytes
Redo Buffers                   5554176 bytes

contents of Memory Script:
{
   sql clone "alter system set  db_name =
 ''CLONE_DB'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   sql clone "alter system set  db_unique_name =
 ''RLTEST'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   shutdown clone immediate;
   startup clone force nomount
   restore clone primary controlfile from  '/u02/clonedb_rman/CLONE_DB_02ok9shm.bak';
   alter clone database mount;
}
executing Memory Script

sql statement: alter system set  db_name =  ''CLONE_DB'' comment= ''Modified by RMAN duplicate'' scope=spfile

sql statement: alter system set  db_unique_name =  ''RLTEST'' comment= ''Modified by RMAN duplicate'' scope=spfile

Oracle instance shut down

Oracle instance started

Total System Global Area    1068937216 bytes

Fixed Size                     2220200 bytes
Variable Size                620760920 bytes
Database Buffers             440401920 bytes
Redo Buffers                   5554176 bytes

Starting restore at 20-SEP-13
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=135 device type=DISK

channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/u02/oradata/RLTEST/control01.ctl
Finished restore at 20-SEP-13

database mounted
released channel: ORA_AUX_DISK_1
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=135 device type=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 09/20/2013 04:38:54
RMAN-05501: aborting duplication of target database
RMAN-05001: auxiliary file name /u02/CLONE_FIRSTDB/redo3a.log conflicts with a file used by the target database
RMAN-05001: auxiliary file name /u02/CLONE_FIRSTDB/redo2b.log conflicts with a file used by the target database
RMAN-05001: auxiliary file name /u02/CLONE_FIRSTDB/redo2a.log conflicts with a file used by the target database
RMAN-05001: auxiliary file name /u02/CLONE_FIRSTDB/redo1a.log conflicts with a file used by the target database

RMAN> exit


Recovery Manager complete.
[oracle@asus001n1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Fri Sep 20 04:40:31 2013

Copyright (c) 1982, 2009, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select open_mode,name from v$database;

OPEN_MODE            NAME
-------------------- ---------
MOUNTED              CLONE_DB

SQL> shut immediate;
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> startup nomount;
ORACLE instance started.

Total System Global Area 1068937216 bytes
Fixed Size                  2220200 bytes
Variable Size             616566616 bytes
Database Buffers          444596224 bytes
Redo Buffers                5554176 bytes
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@asus001n1 ~]$ rman auxiliary /

Recovery Manager: Release 11.2.0.1.0 - Production on Fri Sep 20 04:41:58 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to auxiliary database: RLTEST (not mounted)

RMAN> RUN
{
SET NEWNAME FOR DATABASE TO '/u02/oradata/RLTEST/RLTEST%b.dbf';
DUPLICATE DATABASE to RLTEST Backup LOCATION '/u02/clonedb_rman' nofilenamecheck; --> Be cautious with NOFILENAMECHECK...This recreated the redologs in primary for me.
}
2> 3> 4> 5>
executing command: SET NEWNAME

Starting Duplicate Db at 20-SEP-13

contents of Memory Script:
{
   sql clone "create spfile from memory";
}
executing Memory Script

sql statement: create spfile from memory

contents of Memory Script:
{
   shutdown clone immediate;
   startup clone nomount;
}
executing Memory Script

Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area    1068937216 bytes

Fixed Size                     2220200 bytes
Variable Size                620760920 bytes
Database Buffers             440401920 bytes
Redo Buffers                   5554176 bytes

contents of Memory Script:
{
   sql clone "alter system set  db_name =
 ''CLONE_DB'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   sql clone "alter system set  db_unique_name =
 ''RLTEST'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   shutdown clone immediate;
   startup clone force nomount
   restore clone primary controlfile from  '/u02/clonedb_rman/CLONE_DB_02ok9shm.bak';
   alter clone database mount;
}
executing Memory Script

sql statement: alter system set  db_name =  ''CLONE_DB'' comment= ''Modified by RMAN duplicate'' scope=spfile

sql statement: alter system set  db_unique_name =  ''RLTEST'' comment= ''Modified by RMAN duplicate'' scope=spfile

Oracle instance shut down

Oracle instance started

Total System Global Area    1068937216 bytes

Fixed Size                     2220200 bytes
Variable Size                620760920 bytes
Database Buffers             440401920 bytes
Redo Buffers                   5554176 bytes

Starting restore at 20-SEP-13
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=130 device type=DISK

channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/u02/oradata/RLTEST/control01.ctl
Finished restore at 20-SEP-13

database mounted
released channel: ORA_AUX_DISK_1
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=130 device type=DISK

contents of Memory Script:
{
   set newname for datafile  1 to
 "/u02/oradata/RLTEST/RLTESTsystem01.dbf.dbf";
   set newname for datafile  2 to
 "/u02/oradata/RLTEST/RLTESTsysaux01.dbf.dbf";
   set newname for datafile  3 to
 "/u02/oradata/RLTEST/RLTESTundotbs01.dbf.dbf";
   set newname for datafile  4 to
 "/u02/oradata/RLTEST/RLTESTusers01.dbf.dbf";
   set newname for datafile  5 to
 "/u02/oradata/RLTEST/RLTESTusers02.dbf.dbf";
   set newname for datafile  6 to
 "/u02/oradata/RLTEST/RLTESTusersindx01.dbf.dbf";
   set newname for datafile  7 to
 "/u02/oradata/RLTEST/RLTESTpatrol01.dbf.dbf";
   restore
   clone database
   ;
}
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

executing command: SET NEWNAME

Starting restore at 20-SEP-13
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to /u02/oradata/RLTEST/RLTESTsystem01.dbf.dbf
channel ORA_AUX_DISK_1: restoring datafile 00002 to /u02/oradata/RLTEST/RLTESTsysaux01.dbf.dbf
channel ORA_AUX_DISK_1: restoring datafile 00003 to /u02/oradata/RLTEST/RLTESTundotbs01.dbf.dbf
channel ORA_AUX_DISK_1: restoring datafile 00004 to /u02/oradata/RLTEST/RLTESTusers01.dbf.dbf
channel ORA_AUX_DISK_1: restoring datafile 00005 to /u02/oradata/RLTEST/RLTESTusers02.dbf.dbf
channel ORA_AUX_DISK_1: restoring datafile 00006 to /u02/oradata/RLTEST/RLTESTusersindx01.dbf.dbf
channel ORA_AUX_DISK_1: restoring datafile 00007 to /u02/oradata/RLTEST/RLTESTpatrol01.dbf.dbf
channel ORA_AUX_DISK_1: reading from backup piece /u02/clonedb_rman/CLONE_DB_01ok9shf.bak
channel ORA_AUX_DISK_1: piece handle=/u02/clonedb_rman/CLONE_DB_01ok9shf.bak tag=TAG20130920T034031
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:45
Finished restore at 20-SEP-13

contents of Memory Script:
{
   switch clone datafile all;
}
executing Memory Script

datafile 1 switched to datafile copy
input datafile copy RECID=8 STAMP=826605853 file name=/u02/oradata/RLTEST/RLTESTsystem01.dbf.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=9 STAMP=826605853 file name=/u02/oradata/RLTEST/RLTESTsysaux01.dbf.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=10 STAMP=826605853 file name=/u02/oradata/RLTEST/RLTESTundotbs01.dbf.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=11 STAMP=826605853 file name=/u02/oradata/RLTEST/RLTESTusers01.dbf.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=12 STAMP=826605853 file name=/u02/oradata/RLTEST/RLTESTusers02.dbf.dbf
datafile 6 switched to datafile copy
input datafile copy RECID=13 STAMP=826605853 file name=/u02/oradata/RLTEST/RLTESTusersindx01.dbf.dbf
datafile 7 switched to datafile copy
input datafile copy RECID=14 STAMP=826605853 file name=/u02/oradata/RLTEST/RLTESTpatrol01.dbf.dbf

contents of Memory Script:
{
   recover
   clone database
   noredo
    delete archivelog
   ;
}
executing Memory Script

Starting recover at 20-SEP-13
using channel ORA_AUX_DISK_1

Finished recover at 20-SEP-13

contents of Memory Script:
{
   shutdown clone immediate;
   startup clone nomount;
   sql clone "alter system set  db_name =
 ''RLTEST'' comment=
 ''Reset to original value by RMAN'' scope=spfile";
   sql clone "alter system reset  db_unique_name scope=spfile";
   shutdown clone immediate;
   startup clone nomount;
}
executing Memory Script

database dismounted
Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area    1068937216 bytes

Fixed Size                     2220200 bytes
Variable Size                620760920 bytes
Database Buffers             440401920 bytes
Redo Buffers                   5554176 bytes

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

sql statement: alter system reset  db_unique_name scope=spfile

Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area    1068937216 bytes

Fixed Size                     2220200 bytes
Variable Size                620760920 bytes
Database Buffers             440401920 bytes
Redo Buffers                   5554176 bytes
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "RLTEST" RESETLOGS NOARCHIVELOG
  MAXLOGFILES     16
  MAXLOGMEMBERS      2
  MAXDATAFILES       30
  MAXINSTANCES     1
  MAXLOGHISTORY      292
 LOGFILE
  GROUP  1 ( '/u02/CLONE_FIRSTDB/redo1a.log' ) SIZE 50 M  REUSE,
  GROUP  2 ( '/u02/CLONE_FIRSTDB/redo2a.log', '/u02/CLONE_FIRSTDB/redo2b.log' ) SIZE 50 M  REUSE,
  GROUP  3 ( '/u02/CLONE_FIRSTDB/redo3a.log' ) SIZE 50 M  REUSE
 DATAFILE
  '/u02/oradata/RLTEST/RLTESTsystem01.dbf.dbf'
 CHARACTER SET AL32UTF8


contents of Memory Script:
{
   catalog clone datafilecopy  "/u02/oradata/RLTEST/RLTESTsysaux01.dbf.dbf",
 "/u02/oradata/RLTEST/RLTESTundotbs01.dbf.dbf",
 "/u02/oradata/RLTEST/RLTESTusers01.dbf.dbf",
 "/u02/oradata/RLTEST/RLTESTusers02.dbf.dbf",
 "/u02/oradata/RLTEST/RLTESTusersindx01.dbf.dbf",
 "/u02/oradata/RLTEST/RLTESTpatrol01.dbf.dbf";
   switch clone datafile all;
}
executing Memory Script

cataloged datafile copy
datafile copy file name=/u02/oradata/RLTEST/RLTESTsysaux01.dbf.dbf RECID=1 STAMP=826605867
cataloged datafile copy
datafile copy file name=/u02/oradata/RLTEST/RLTESTundotbs01.dbf.dbf RECID=2 STAMP=826605867
cataloged datafile copy
datafile copy file name=/u02/oradata/RLTEST/RLTESTusers01.dbf.dbf RECID=3 STAMP=826605867
cataloged datafile copy
datafile copy file name=/u02/oradata/RLTEST/RLTESTusers02.dbf.dbf RECID=4 STAMP=826605867
cataloged datafile copy
datafile copy file name=/u02/oradata/RLTEST/RLTESTusersindx01.dbf.dbf RECID=5 STAMP=826605867
cataloged datafile copy
datafile copy file name=/u02/oradata/RLTEST/RLTESTpatrol01.dbf.dbf RECID=6 STAMP=826605867

datafile 2 switched to datafile copy
input datafile copy RECID=1 STAMP=826605867 file name=/u02/oradata/RLTEST/RLTESTsysaux01.dbf.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=2 STAMP=826605867 file name=/u02/oradata/RLTEST/RLTESTundotbs01.dbf.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=3 STAMP=826605867 file name=/u02/oradata/RLTEST/RLTESTusers01.dbf.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=4 STAMP=826605867 file name=/u02/oradata/RLTEST/RLTESTusers02.dbf.dbf
datafile 6 switched to datafile copy
input datafile copy RECID=5 STAMP=826605867 file name=/u02/oradata/RLTEST/RLTESTusersindx01.dbf.dbf
datafile 7 switched to datafile copy
input datafile copy RECID=6 STAMP=826605867 file name=/u02/oradata/RLTEST/RLTESTpatrol01.dbf.dbf

contents of Memory Script:
{
   Alter clone database open resetlogs;
}
executing Memory Script

database opened
Finished Duplicate Db at 20-SEP-13

RMAN> exit


Recovery Manager complete.

SQL>
SQL> select name,open_mode from v$database;

NAME      OPEN_MODE
--------- --------------------
RLTEST    READ WRITE

SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
/u02/oradata/RLTEST/RLTESTsystem01.dbf.dbf
/u02/oradata/RLTEST/RLTESTsysaux01.dbf.dbf
/u02/oradata/RLTEST/RLTESTundotbs01.dbf.dbf
/u02/oradata/RLTEST/RLTESTusers01.dbf.dbf
/u02/oradata/RLTEST/RLTESTusers02.dbf.dbf
/u02/oradata/RLTEST/RLTESTusersindx01.dbf.dbf
/u02/oradata/RLTEST/RLTESTpatrol01.dbf.dbf

7 rows selected.

SQL> select member from v$logfile;

MEMBER
--------------------------------------------------------------------------------
/u02/CLONE_FIRSTDB/redo3a.log
/u02/CLONE_FIRSTDB/redo2a.log
/u02/CLONE_FIRSTDB/redo2b.log
/u02/CLONE_FIRSTDB/redo1a.log

SQL>

This above failed as the new redologs are not created....and overridden the existing ones.

RUN
{
SET NEWNAME FOR DATABASE TO '/u02/oradata/RLTEST/RLTEST%b';
DUPLICATE DATABASE to RLTEST Backup LOCATION '/u02/clonedb_rman'
LOGFILE GROUP 1 ('/u02/oradata/RLTEST/RLTESTredo1a.log') size 5M,
GROUP 2 ('/u02/oradata/RLTEST/RLTESTredo2a.log') size 5M;

}

RMAN> RUN
2> {
SET NEWNAME FOR DATABASE TO '/u02/oradata/RLTEST/RLTEST%b';
3> 4> DUPLICATE DATABASE to RLTEST
5> Backup LOCATION '/u02/clonedb_rman'
LOGFILE
6> 7> GROUP 1 ('/u02/oradata/RLTEST/RLTESTredo1a.log') size 5M REUSE,
8> GROUP 2 ('/u02/oradata/RLTEST/RLTESTredo2a.log') size 5M REUSE;
}
9>
executing command: SET NEWNAME

Starting Duplicate Db at 20-SEP-13

contents of Memory Script:
{
   sql clone "create spfile from memory";
}
executing Memory Script

sql statement: create spfile from memory

contents of Memory Script:
{
   shutdown clone immediate;
   startup clone nomount;
}
executing Memory Script

Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area    1068937216 bytes

Fixed Size                     2220200 bytes
Variable Size                620760920 bytes
Database Buffers             440401920 bytes
Redo Buffers                   5554176 bytes

contents of Memory Script:
{
   sql clone "alter system set  db_name =
 ''CLONE_DB'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   sql clone "alter system set  db_unique_name =
 ''RLTEST'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   shutdown clone immediate;
   startup clone force nomount
   restore clone primary controlfile from  '/u02/clonedb_rman/CLONE_DB_02ok9shm.bak';
   alter clone database mount;
}
executing Memory Script

sql statement: alter system set  db_name =  ''CLONE_DB'' comment= ''Modified by RMAN duplicate'' scope=spfile

sql statement: alter system set  db_unique_name =  ''RLTEST'' comment= ''Modified by RMAN duplicate'' scope=spfile

Oracle instance shut down

Oracle instance started

Total System Global Area    1068937216 bytes

Fixed Size                     2220200 bytes
Variable Size                620760920 bytes
Database Buffers             440401920 bytes
Redo Buffers                   5554176 bytes

Starting restore at 20-SEP-13
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=130 device type=DISK

channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/u02/oradata/RLTEST/control01.ctl
Finished restore at 20-SEP-13

database mounted
released channel: ORA_AUX_DISK_1
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=130 device type=DISK

contents of Memory Script:
{
   set newname for datafile  1 to
 "/u02/oradata/RLTEST/RLTESTsystem01.dbf";
   set newname for datafile  2 to
 "/u02/oradata/RLTEST/RLTESTsysaux01.dbf";
   set newname for datafile  3 to
 "/u02/oradata/RLTEST/RLTESTundotbs01.dbf";
   set newname for datafile  4 to
 "/u02/oradata/RLTEST/RLTESTusers01.dbf";
   set newname for datafile  5 to
 "/u02/oradata/RLTEST/RLTESTusers02.dbf";
   set newname for datafile  6 to
 "/u02/oradata/RLTEST/RLTESTusersindx01.dbf";
   set newname for datafile  7 to
 "/u02/oradata/RLTEST/RLTESTpatrol01.dbf";
   restore
   clone database
   ;
}
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

executing command: SET NEWNAME

Starting restore at 20-SEP-13
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to /u02/oradata/RLTEST/RLTESTsystem01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00002 to /u02/oradata/RLTEST/RLTESTsysaux01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00003 to /u02/oradata/RLTEST/RLTESTundotbs01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00004 to /u02/oradata/RLTEST/RLTESTusers01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00005 to /u02/oradata/RLTEST/RLTESTusers02.dbf
channel ORA_AUX_DISK_1: restoring datafile 00006 to /u02/oradata/RLTEST/RLTESTusersindx01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00007 to /u02/oradata/RLTEST/RLTESTpatrol01.dbf
channel ORA_AUX_DISK_1: reading from backup piece /u02/clonedb_rman/CLONE_DB_01ok9shf.bak
channel ORA_AUX_DISK_1: piece handle=/u02/clonedb_rman/CLONE_DB_01ok9shf.bak tag=TAG20130920T034031
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:45
Finished restore at 20-SEP-13

contents of Memory Script:
{
   switch clone datafile all;
}
executing Memory Script

datafile 1 switched to datafile copy
input datafile copy RECID=8 STAMP=826611755 file name=/u02/oradata/RLTEST/RLTESTsystem01.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=9 STAMP=826611755 file name=/u02/oradata/RLTEST/RLTESTsysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=10 STAMP=826611755 file name=/u02/oradata/RLTEST/RLTESTundotbs01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=11 STAMP=826611755 file name=/u02/oradata/RLTEST/RLTESTusers01.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=12 STAMP=826611755 file name=/u02/oradata/RLTEST/RLTESTusers02.dbf
datafile 6 switched to datafile copy
input datafile copy RECID=13 STAMP=826611755 file name=/u02/oradata/RLTEST/RLTESTusersindx01.dbf
datafile 7 switched to datafile copy
input datafile copy RECID=14 STAMP=826611755 file name=/u02/oradata/RLTEST/RLTESTpatrol01.dbf

contents of Memory Script:
{
   recover
   clone database
   noredo
    delete archivelog
   ;
}
executing Memory Script

Starting recover at 20-SEP-13
using channel ORA_AUX_DISK_1

Finished recover at 20-SEP-13

contents of Memory Script:
{
   shutdown clone immediate;
   startup clone nomount;
   sql clone "alter system set  db_name =
 ''RLTEST'' comment=
 ''Reset to original value by RMAN'' scope=spfile";
   sql clone "alter system reset  db_unique_name scope=spfile";
   shutdown clone immediate;
   startup clone nomount;
}
executing Memory Script

database dismounted
Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area    1068937216 bytes

Fixed Size                     2220200 bytes
Variable Size                620760920 bytes
Database Buffers             440401920 bytes
Redo Buffers                   5554176 bytes

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

sql statement: alter system reset  db_unique_name scope=spfile

Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area    1068937216 bytes

Fixed Size                     2220200 bytes
Variable Size                620760920 bytes
Database Buffers             440401920 bytes
Redo Buffers                   5554176 bytes
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "RLTEST" RESETLOGS NOARCHIVELOG
  MAXLOGFILES     16
  MAXLOGMEMBERS      2
  MAXDATAFILES       30
  MAXINSTANCES     1
  MAXLOGHISTORY      292
 LOGFILE
  GROUP  1 ( '/u02/oradata/RLTEST/RLTESTredo1a.log' ) SIZE 5 M  REUSE,
  GROUP  2 ( '/u02/oradata/RLTEST/RLTESTredo2a.log' ) SIZE 5 M  REUSE
 DATAFILE
  '/u02/oradata/RLTEST/RLTESTsystem01.dbf'
 CHARACTER SET AL32UTF8


contents of Memory Script:
{
   catalog clone datafilecopy  "/u02/oradata/RLTEST/RLTESTsysaux01.dbf",
 "/u02/oradata/RLTEST/RLTESTundotbs01.dbf",
 "/u02/oradata/RLTEST/RLTESTusers01.dbf",
 "/u02/oradata/RLTEST/RLTESTusers02.dbf",
 "/u02/oradata/RLTEST/RLTESTusersindx01.dbf",
 "/u02/oradata/RLTEST/RLTESTpatrol01.dbf";
   switch clone datafile all;
}
executing Memory Script

cataloged datafile copy
datafile copy file name=/u02/oradata/RLTEST/RLTESTsysaux01.dbf RECID=1 STAMP=826611769
cataloged datafile copy
datafile copy file name=/u02/oradata/RLTEST/RLTESTundotbs01.dbf RECID=2 STAMP=826611769
cataloged datafile copy
datafile copy file name=/u02/oradata/RLTEST/RLTESTusers01.dbf RECID=3 STAMP=826611769
cataloged datafile copy
datafile copy file name=/u02/oradata/RLTEST/RLTESTusers02.dbf RECID=4 STAMP=826611769
cataloged datafile copy
datafile copy file name=/u02/oradata/RLTEST/RLTESTusersindx01.dbf RECID=5 STAMP=826611769
cataloged datafile copy
datafile copy file name=/u02/oradata/RLTEST/RLTESTpatrol01.dbf RECID=6 STAMP=826611769

datafile 2 switched to datafile copy
input datafile copy RECID=1 STAMP=826611769 file name=/u02/oradata/RLTEST/RLTESTsysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=2 STAMP=826611769 file name=/u02/oradata/RLTEST/RLTESTundotbs01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=3 STAMP=826611769 file name=/u02/oradata/RLTEST/RLTESTusers01.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=4 STAMP=826611769 file name=/u02/oradata/RLTEST/RLTESTusers02.dbf
datafile 6 switched to datafile copy
input datafile copy RECID=5 STAMP=826611769 file name=/u02/oradata/RLTEST/RLTESTusersindx01.dbf
datafile 7 switched to datafile copy
input datafile copy RECID=6 STAMP=826611769 file name=/u02/oradata/RLTEST/RLTESTpatrol01.dbf

contents of Memory Script:
{
   Alter clone database open resetlogs;
}
executing Memory Script

database opened
Finished Duplicate Db at 20-SEP-13

RMAN> exit


Recovery Manager complete.
[oracle@asus001n1 RLTEST]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Fri Sep 20 06:25:30 2013

Copyright (c) 1982, 2009, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select name,open_mode frmo v$database;
select name,open_mode frmo v$database
                           *
ERROR at line 1:
ORA-00923: FROM keyword not found where expected


SQL> select name,open_mode from  v$database;

NAME      OPEN_MODE
--------- --------------------
RLTEST    READ WRITE

SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
/u02/oradata/RLTEST/RLTESTsystem01.dbf
/u02/oradata/RLTEST/RLTESTsysaux01.dbf
/u02/oradata/RLTEST/RLTESTundotbs01.dbf
/u02/oradata/RLTEST/RLTESTusers01.dbf
/u02/oradata/RLTEST/RLTESTusers02.dbf
/u02/oradata/RLTEST/RLTESTusersindx01.dbf
/u02/oradata/RLTEST/RLTESTpatrol01.dbf

7 rows selected.

SQL> select member from v$logfile;

MEMBER
--------------------------------------------------------------------------------
/u02/oradata/RLTEST/RLTESTredo2a.log
/u02/oradata/RLTEST/RLTESTredo1a.log

=============================================================================================

2. Test to duplicate database without connecting to target,without connecting to catalog...especially for skipping tablespace:

RUN
{
SET NEWNAME FOR DATABASE TO '/u02/oradata/RLQA/RLQA%b';
DUPLICATE DATABASE to RLQA Backup LOCATION '/u02/clonedb_rman/RLTEST'
SKIP TABLESPACE PATROL

LOGFILE GROUP 1 ('/u02/oradata/RLQA/RLQAredo1a.log') size 5M,
GROUP 2 ('/u02/oradata/RLQA/RLQAredo2a.log') size 5M,
GROUP 3 ('/u02/oradata/RLQA/RLQAredo3a.log') size 5M;
}

[oracle@asus001n1 dbs]$ rman auxiliary /

Recovery Manager: Release 11.2.0.1.0 - Production on Fri Sep 20 08:55:55 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to auxiliary database: RLQA (not mounted)

RMAN> RUN
2> {
SET NEWNAME FOR DATABASE TO '/u02/oradata/RLQA/RLQA%b';
3> 4> DUPLICATE DATABASE to RLQA Backup LOCATION '/u02/clonedb_rman/RLTEST'
SKIP TABLESPACE PATROL
5> 6> LOGFILE GROUP 1 ('/u02/oradata/RLQA/RLQAredo1a.log') size 5M,
GROUP 2 ('/u02/oradata/RLQA/RLQAredo2a.log') size 5M,
7> 8> GROUP 3 ('/u02/oradata/RLQA/RLQAredo3a.log') size 5M;
9> }

executing command: SET NEWNAME

Starting Duplicate Db at 20-SEP-13

contents of Memory Script:
{
   sql clone "create spfile from memory";
}
executing Memory Script

sql statement: create spfile from memory

contents of Memory Script:
{
   shutdown clone immediate;
   startup clone nomount;
}
executing Memory Script

Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area    1068937216 bytes

Fixed Size                     2220200 bytes
Variable Size                620760920 bytes
Database Buffers             440401920 bytes
Redo Buffers                   5554176 bytes

contents of Memory Script:
{
   sql clone "alter system set  db_name =
 ''RLTEST'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   sql clone "alter system set  db_unique_name =
 ''RLQA'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   shutdown clone immediate;
   startup clone force nomount
   restore clone primary controlfile from  '/u02/clonedb_rman/RLTEST/c-1580217-20130920-01';
   alter clone database mount;
}
executing Memory Script

sql statement: alter system set  db_name =  ''RLTEST'' comment= ''Modified by RMAN duplicate'' scope=spfile

sql statement: alter system set  db_unique_name =  ''RLQA'' comment= ''Modified by RMAN duplicate'' scope=spfile

Oracle instance shut down

Oracle instance started

Total System Global Area    1068937216 bytes

Fixed Size                     2220200 bytes
Variable Size                620760920 bytes
Database Buffers             440401920 bytes
Redo Buffers                   5554176 bytes

Starting restore at 20-SEP-13
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=130 device type=DISK

channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/u02/oradata/RLQA/control01.ctl
Finished restore at 20-SEP-13

database mounted
released channel: ORA_AUX_DISK_1
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=130 device type=DISK
Not connected to TARGET or TARGET not open, cannot verify that subset of tablespaces is self-contained
Not connected to TARGET, cannot verify that set of tablespaces being duplicated does not have SYS objects
Datafile 7 skipped by request

contents of Memory Script:
{
   set newname for datafile  1 to
 "/u02/oradata/RLQA/RLQARLTESTsystem01.dbf";
   set newname for datafile  2 to
 "/u02/oradata/RLQA/RLQARLTESTsysaux01.dbf";
   set newname for datafile  3 to
 "/u02/oradata/RLQA/RLQARLTESTundotbs01.dbf";
   set newname for datafile  4 to
 "/u02/oradata/RLQA/RLQARLTESTusers01.dbf";
   set newname for datafile  5 to
 "/u02/oradata/RLQA/RLQARLTESTusers02.dbf";
   set newname for datafile  6 to
 "/u02/oradata/RLQA/RLQARLTESTusersindx01.dbf";
   restore
   clone database
   skip forever tablespace  "PATROL"   ;
}
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 restore at 20-SEP-13
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to /u02/oradata/RLQA/RLQARLTESTsystem01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00002 to /u02/oradata/RLQA/RLQARLTESTsysaux01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00003 to /u02/oradata/RLQA/RLQARLTESTundotbs01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00004 to /u02/oradata/RLQA/RLQARLTESTusers01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00006 to /u02/oradata/RLQA/RLQARLTESTusersindx01.dbf
channel ORA_AUX_DISK_1: reading from backup piece /u02/clonedb_rman/RLTEST/RLTEST_08okaea8.bak
channel ORA_AUX_DISK_1: piece handle=/u02/clonedb_rman/RLTEST/RLTEST_08okaea8.bak tag=TAG20130920T084352
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:25
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00005 to /u02/oradata/RLQA/RLQARLTESTusers02.dbf
channel ORA_AUX_DISK_1: reading from backup piece /u02/clonedb_rman/RLTEST/RLTEST_06okae8r.bak
channel ORA_AUX_DISK_1: piece handle=/u02/clonedb_rman/RLTEST/RLTEST_06okae8r.bak tag=TAG20130920T084306
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:15
Finished restore at 20-SEP-13

contents of Memory Script:
{
   switch clone datafile all;
}
executing Memory Script

datafile 1 switched to datafile copy
input datafile copy RECID=7 STAMP=826621099 file name=/u02/oradata/RLQA/RLQARLTESTsystem01.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=8 STAMP=826621099 file name=/u02/oradata/RLQA/RLQARLTESTsysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=9 STAMP=826621099 file name=/u02/oradata/RLQA/RLQARLTESTundotbs01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=10 STAMP=826621099 file name=/u02/oradata/RLQA/RLQARLTESTusers01.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=11 STAMP=826621099 file name=/u02/oradata/RLQA/RLQARLTESTusers02.dbf
datafile 6 switched to datafile copy
input datafile copy RECID=12 STAMP=826621099 file name=/u02/oradata/RLQA/RLQARLTESTusersindx01.dbf

contents of Memory Script:
{
   recover
   clone database
   skip forever tablespace  "PATROL"   noredo
    delete archivelog
   ;
}
executing Memory Script

Starting recover at 20-SEP-13
using channel ORA_AUX_DISK_1

Executing: alter database datafile 7 offline drop
Finished recover at 20-SEP-13

contents of Memory Script:
{
   shutdown clone immediate;
   startup clone nomount;
   sql clone "alter system set  db_name =
 ''RLQA'' comment=
 ''Reset to original value by RMAN'' scope=spfile";
   sql clone "alter system reset  db_unique_name scope=spfile";
   shutdown clone immediate;
   startup clone nomount;
}
executing Memory Script

database dismounted
Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area    1068937216 bytes

Fixed Size                     2220200 bytes
Variable Size                620760920 bytes
Database Buffers             440401920 bytes
Redo Buffers                   5554176 bytes

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

sql statement: alter system reset  db_unique_name scope=spfile

Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area    1068937216 bytes

Fixed Size                     2220200 bytes
Variable Size                620760920 bytes
Database Buffers             440401920 bytes
Redo Buffers                   5554176 bytes
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "RLQA" RESETLOGS NOARCHIVELOG
  MAXLOGFILES     16
  MAXLOGMEMBERS      2
  MAXDATAFILES       30
  MAXINSTANCES     1
  MAXLOGHISTORY      292
 LOGFILE
  GROUP  1 ( '/u02/oradata/RLQA/RLQAredo1a.log' ) SIZE 5 M ,
  GROUP  2 ( '/u02/oradata/RLQA/RLQAredo2a.log' ) SIZE 5 M ,
  GROUP  3 ( '/u02/oradata/RLQA/RLQAredo3a.log' ) SIZE 5 M
 DATAFILE
  '/u02/oradata/RLQA/RLQARLTESTsystem01.dbf'
 CHARACTER SET AL32UTF8


contents of Memory Script:
{
   catalog clone datafilecopy  "/u02/oradata/RLQA/RLQARLTESTsysaux01.dbf",
 "/u02/oradata/RLQA/RLQARLTESTundotbs01.dbf",
 "/u02/oradata/RLQA/RLQARLTESTusers01.dbf",
 "/u02/oradata/RLQA/RLQARLTESTusers02.dbf",
 "/u02/oradata/RLQA/RLQARLTESTusersindx01.dbf";
   switch clone datafile all;
}
executing Memory Script

cataloged datafile copy
datafile copy file name=/u02/oradata/RLQA/RLQARLTESTsysaux01.dbf RECID=1 STAMP=826621120
cataloged datafile copy
datafile copy file name=/u02/oradata/RLQA/RLQARLTESTundotbs01.dbf RECID=2 STAMP=826621120
cataloged datafile copy
datafile copy file name=/u02/oradata/RLQA/RLQARLTESTusers01.dbf RECID=3 STAMP=826621120
cataloged datafile copy
datafile copy file name=/u02/oradata/RLQA/RLQARLTESTusers02.dbf RECID=4 STAMP=826621120
cataloged datafile copy
datafile copy file name=/u02/oradata/RLQA/RLQARLTESTusersindx01.dbf RECID=5 STAMP=826621120

datafile 2 switched to datafile copy
input datafile copy RECID=1 STAMP=826621120 file name=/u02/oradata/RLQA/RLQARLTESTsysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=2 STAMP=826621120 file name=/u02/oradata/RLQA/RLQARLTESTundotbs01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=3 STAMP=826621120 file name=/u02/oradata/RLQA/RLQARLTESTusers01.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=4 STAMP=826621120 file name=/u02/oradata/RLQA/RLQARLTESTusers02.dbf
datafile 6 switched to datafile copy
input datafile copy RECID=5 STAMP=826621120 file name=/u02/oradata/RLQA/RLQARLTESTusersindx01.dbf

contents of Memory Script:
{
   Alter clone database open resetlogs;
}
executing Memory Script

database opened

contents of Memory Script:
{
# drop offline and skipped tablespaces
sql clone 'drop tablespace  "PATROL" including contents cascade constraints';
}
executing Memory Script

sql statement: drop tablespace  "PATROL" including contents cascade constraints
Finished Duplicate Db at 20-SEP-13

No comments:

Post a Comment