Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Duplicate target database command failed with ORA-06023

941083Jul 6 2012 — edited Jul 6 2012
Hello everybody,

Both ORCL and CLONE databases resides in same host and sharing same ORACLE_HOME. The details are below

[oracle@RHELSRV ~]$ export ORACLE_SID=orcl
[oracle@RHELSRV ~]$ sqlplus '/as sysdba'

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jul 5 08:56:31 2012

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


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> set pagesize 9999;
SQL> conn reddy/reddy
Connected.
SQL> select table_name from user_tables where tablespace_name='REDDY';

TABLE_NAME
------------------------------
TEST
EMP
RECORDS

SQL> create table test as select * from emp;
create table test as select * from emp
*
ERROR at line 1:
ORA-00955: name is already used by an existing object


SQL> create table emp_rec as select * from emp;

Table created.

SQL> conn /as sysdba
Connected.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@RHELSRV ~]$ rman

Recovery Manager: Release 10.2.0.1.0 - Production on Thu Jul 5 08:59:23 2012

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

RMAN> connect target/

connected to target database: ORCL (DBID=1314955841)

RMAN> show all;

using target database control file 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 '/u01/app/oracle/flash_recovery_area/ORCL/%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # 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 DEVICE TYPE DISK FORMAT '/u01/app/oracle/flash_recovery_area/ORCL/%d_%u.bkp';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/10.2.0/dn_1/dbs/snapcf_orcl.f'; # default

RMAN> backup database plus archivelog;


Starting backup at 05-JUL-12
current log archived
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=141 devtype=DISK
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=19 recid=17 stamp=787806812
input archive log thread=1 sequence=20 recid=18 stamp=787809555
input archive log thread=1 sequence=21 recid=19 stamp=787809557
input archive log thread=1 sequence=22 recid=20 stamp=787809583
input archive log thread=1 sequence=23 recid=21 stamp=787809740
input archive log thread=1 sequence=24 recid=22 stamp=787809875
input archive log thread=1 sequence=25 recid=23 stamp=787811145
input archive log thread=1 sequence=26 recid=24 stamp=787811147
input archive log thread=1 sequence=27 recid=25 stamp=787811172
input archive log thread=1 sequence=28 recid=26 stamp=787811743
input archive log thread=1 sequence=29 recid=27 stamp=787812102
input archive log thread=1 sequence=30 recid=28 stamp=787812134
input archive log thread=1 sequence=31 recid=29 stamp=787812825
input archive log thread=1 sequence=32 recid=30 stamp=787812919
input archive log thread=1 sequence=33 recid=31 stamp=787813142
input archive log thread=1 sequence=34 recid=32 stamp=787826397
input archive log thread=1 sequence=35 recid=33 stamp=787826523
input archive log thread=1 sequence=36 recid=34 stamp=787826635
input archive log thread=1 sequence=37 recid=35 stamp=787827597
channel ORA_DISK_1: starting piece 1 at 05-JUL-12
channel ORA_DISK_1: finished piece 1 at 05-JUL-12
piece handle=/u01/app/oracle/flash_recovery_area/ORCL/ORCL_22nfaise.bkp tag=TAG20120705T085958 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:05
Finished backup at 05-JUL-12

Starting backup at 05-JUL-12
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/u01/app/oracle/oradata/orcl/system01.dbf
input datafile fno=00003 name=/u01/app/oracle/oradata/orcl/sysaux01.dbf
input datafile fno=00005 name=/u01/app/oracle/oradata/orcl/example01.dbf
input datafile fno=00007 name=/u01/orabackup/rman01.dbf
input datafile fno=00006 name=/u01/app/oracle/oradata/orcl/sandy01.dbf
input datafile fno=00002 name=/u01/app/oracle/oradata/orcl/undotbs01.dbf
input datafile fno=00008 name=/u01/app/oracle/oradata/orcl/reddy01.dbf
input datafile fno=00004 name=/u01/app/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: starting piece 1 at 05-JUL-12
channel ORA_DISK_1: finished piece 1 at 05-JUL-12
piece handle=/u01/app/oracle/flash_recovery_area/ORCL/ORCL_23nfaisj.bkp tag=TAG20120705T090003 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:11:49
Finished backup at 05-JUL-12

Starting backup at 05-JUL-12
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=38 recid=36 stamp=787828314
channel ORA_DISK_1: starting piece 1 at 05-JUL-12
channel ORA_DISK_1: finished piece 1 at 05-JUL-12
piece handle=/u01/app/oracle/flash_recovery_area/ORCL/ORCL_24nfajir.bkp tag=TAG20120705T091155 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 05-JUL-12

Starting Control File and SPFILE Autobackup at 05-JUL-12
piece handle=/u01/app/oracle/flash_recovery_area/ORCL/c-1314955841-20120705-0a comment=NONE
Finished Control File and SPFILE Autobackup at 05-JUL-12

RMAN> exit


Recovery Manager complete.
[oracle@RHELSRV ~]$ sqlplus

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jul 5 09:12:34 2012

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

Enter user-name: reddy
Enter password:

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> drop table emp_rec;

Table dropped.

SQL> conn /as sysdba
Connected.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@RHELSRV ~]$ export ORACLE_SID=clone
[oracle@RHELSRV ~]$ sqlplus '/as sysdba'

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jul 5 09:13:58 2012

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

Connected to an idle instance.

SQL> startup nomount pfile='/u01/app/oracle/product/10.2.0/dn_1/dbs/initclone.ora'
ORACLE instance started.

Total System Global Area 608174080 bytes
Fixed Size 1220844 bytes
Variable Size 167776020 bytes
Database Buffers 436207616 bytes
Redo Buffers 2969600 bytes
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@RHELSRV ~]$ tnsping orcl

TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 05-JUL-2012 09:14:55

Copyright (c) 1997, 2005, Oracle. All rights reserved.

Used parameter files:
/u01/app/oracle/product/10.2.0/dn_1/network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = RHELSRV.cybage.com)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = orcl)))
OK (10 msec)
[oracle@RHELSRV ~]$ rman target=sys/orcl@orcl auxiliary=/

Recovery Manager: Release 10.2.0.1.0 - Production on Thu Jul 5 09:15:20 2012

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

connected to target database: ORCL (DBID=1314955841)
connected to auxiliary database: CLONE (not mounted)

RMAN> run{
2> set until sequence 37 thread 1;
3> duplicate target database to "clone" nofilenamecheck;
4> }

executing command: SET until clause
using target database control file instead of recovery catalog

Starting Duplicate Db at 05-JUL-12
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=156 devtype=DISK

contents of Memory Script:
{
set until scn 684501;
set newname for datafile 1 to
"/u01/app/oracle/oradata/clone/system01.dbf";
set newname for datafile 2 to
"/u01/app/oracle/oradata/clone/undotbs01.dbf";
set newname for datafile 3 to
"/u01/app/oracle/oradata/clone/sysaux01.dbf";
set newname for datafile 4 to
"/u01/app/oracle/oradata/clone/users01.dbf";
set newname for datafile 5 to
"/u01/app/oracle/oradata/clone/example01.dbf";
set newname for datafile 6 to
"/u01/app/oracle/oradata/clone/sandy01.dbf";
set newname for datafile 7 to
"/u01/orabackup/rman01.dbf";
set newname for datafile 8 to
"/u01/app/oracle/oradata/clone/reddy01.dbf";
restore
check readonly
clone database
;
}
executing 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

Starting restore at 05-JUL-12
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backupset restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/app/oracle/oradata/clone/system01.dbf
restoring datafile 00002 to /u01/app/oracle/oradata/clone/undotbs01.dbf
restoring datafile 00003 to /u01/app/oracle/oradata/clone/sysaux01.dbf
restoring datafile 00004 to /u01/app/oracle/oradata/clone/users01.dbf
restoring datafile 00005 to /u01/app/oracle/oradata/clone/example01.dbf
restoring datafile 00006 to /u01/app/oracle/oradata/clone/sandy01.dbf
restoring datafile 00007 to /u01/orabackup/rman01.dbf
channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/flash_recovery_area/ORCL/ORCL_1pnfa4hq.bkp
ORA-19870: error reading backup piece /u01/app/oracle/flash_recovery_area/ORCL/ORCL_1pnfa4hq.bkp
ORA-19504: failed to create file "/u01/orabackup/rman01.dbf"
ORA-27086: unable to lock file - already in use
Linux Error: 11: Resource temporarily unavailable
Additional information: 8
Additional information: 12287
channel ORA_AUX_DISK_1: starting datafile backupset restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00008 to /u01/app/oracle/oradata/clone/reddy01.dbf
channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/flash_recovery_area/ORCL/ORCL_1snfahst.bkp
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle=/u01/app/oracle/flash_recovery_area/ORCL/ORCL_1snfahst.bkp tag=TAG20120705T084309
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
failover to previous backup

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 07/05/2012 09:16:41
RMAN-03015: error occurred in stored script Memory Script
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 7 found to restore
RMAN-06023: no backup or copy of datafile 6 found to restore
RMAN-06023: no backup or copy of datafile 5 found to restore
RMAN-06023: no backup or copy of datafile 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore

I picked this procedure in internet. I tried to work out from all the possible options i can think of. Please, any suggestions would be appreciable. I am happy provide any further details. Thanks for your time and support .
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 3 2012
Added on Jul 6 2012
5 comments
369 views