RMAN-05001,RMAN-05500 問題解決

tolywang發表於2010-01-04

On the primary node, perform. an RMAN backup of the primary database that places the backup pieces into the staging directory. For example:
[oracle@chicago_host1 stage]$ rman  target /

RMAN> BACKUP DEVICE TYPE DISK FORMAT '/u01/backup/%U' DATABASE PLUS ARCHIVELOG;

RMAN> BACKUP DEVICE TYPE DISK FORMAT '/u01.backup/%U' CURRENT CONTROLFILE FOR STANDBY;


Standby要置為   SQL> startup nomount

rac01sty$cd  backup/
rac01sty$ls
01l277gl_1_1  03l277i0_1_1  05l277jq_1_1  listener.ora
02l277h6_1_1  04l277i9_1_1  initORCL.ora  tnsnames.ora

rac01sty$rman target   auxiliary /

Recovery Manager: Release 10.2.0.4.0 - Production on Wed Dec 30 05:40:07 2009

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

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

RMAN> duplicate target database for standby ;

Starting Duplicate Db at 30-DEC-09
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=149 instance=orcl1 devtype=DISK

contents of Memory Script.:
{
   restore clone standby controlfile;
   sql clone 'alter database mount standby database';
}
executing Memory Script

Starting restore at 30-DEC-09
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backupset restore
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: reading from backup piece /u01/backup/05l277jq_1_1
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle=/u01/backup/05l277jq_1_1 tag=TAG20091230T143642
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:04
output filename=/ocfs_data/orcl/control01.ctl
output filename=/ocfs_data/orcl/control02.ctl
output filename=/ocfs_data/orcl/control03.ctl
Finished restore at 30-DEC-09

sql statement: alter database mount standby database
released channel: ORA_AUX_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 12/30/2009 05:40:43
RMAN-05501: aborting duplication of target database
RMAN-05001: auxiliary filename /ocfs_data/orcl/undotbs02.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /ocfs_data/orcl/users01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /ocfs_data/orcl/sysaux01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /ocfs_data/orcl/undotbs01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /ocfs_data/orcl/system01.dbf conflicts with a file used by the target database

RMAN>

 

 

RMAN> duplicate target database for standby nofilenamecheck;

Starting Duplicate Db at 30-DEC-09
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=150 instance=orcl1 devtype=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 12/30/2009 05:46:22
RMAN-05500: the auxiliary database must be not mounted when issuing a DUPLICATE command

RMAN> exit

 

 


rac01sty$
rac01sty$sqlplus "/as sysdba"

SQL*Plus: Release 10.2.0.4.0 - Production on Wed Dec 30 05:49:14 2009

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, Oracle Label Security, OLAP,
Data Mining Scoring Engine and Real Application Testing options

SQL> shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup nomount
ORACLE instance started.

Total System Global Area  339738624 bytes
Fixed Size                  1267380 bytes
Variable Size             109054284 bytes
Database Buffers          226492416 bytes
Redo Buffers                2924544 bytes
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, Oracle Label Security, OLAP,
Data Mining Scoring Engine and Real Application Testing options
rac01sty$
rac01sty$ls
01l277gl_1_1  03l277i0_1_1  05l277jq_1_1  listener.ora
02l277h6_1_1  04l277i9_1_1  initORCL.ora  tnsnames.ora

 


rac01sty$rman target   auxiliary /

Recovery Manager: Release 10.2.0.4.0 - Production on Wed Dec 30 05:50:35 2009

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

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

 


RMAN> duplicate target database for standby nofilenamecheck;   

Starting Duplicate Db at 30-DEC-09
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=149 instance=orcl1 devtype=DISK

contents of Memory Script.:
{
   restore clone standby controlfile;
   sql clone 'alter database mount standby database';
}
executing Memory Script

Starting restore at 30-DEC-09
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backupset restore
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: reading from backup piece /u01/backup/05l277jq_1_1
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle=/u01/backup/05l277jq_1_1 tag=TAG20091230T143642
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
output filename=/ocfs_data/orcl/control01.ctl
output filename=/ocfs_data/orcl/control02.ctl
output filename=/ocfs_data/orcl/control03.ctl
Finished restore at 30-DEC-09 

sql statement: alter database mount standby database
released channel: ORA_AUX_DISK_1

contents of Memory Script.:
{
   set newname for tempfile  1 to
 "/ocfs_data/orcl/temp01.dbf";
   switch clone tempfile all;
   set newname for datafile  1 to
 "/ocfs_data/orcl/system01.dbf";
   set newname for datafile  2 to
 "/ocfs_data/orcl/undotbs01.dbf";
   set newname for datafile  3 to
 "/ocfs_data/orcl/sysaux01.dbf";
   set newname for datafile  4 to
 "/ocfs_data/orcl/users01.dbf";
   set newname for datafile  5 to
 "/ocfs_data/orcl/undotbs02.dbf";
   restore
   check readonly
   clone database
   ;
}
executing Memory Script
executing command: SET NEWNAME
renamed temporary file 1 to /ocfs_data/orcl/temp01.dbf in control file
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME

Starting restore at 30-DEC-09
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=149 instance=orcl1 devtype=DISK

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 /ocfs_data/orcl/system01.dbf
restoring datafile 00002 to /ocfs_data/orcl/undotbs01.dbf
restoring datafile 00003 to /ocfs_data/orcl/sysaux01.dbf
restoring datafile 00004 to /ocfs_data/orcl/users01.dbf
restoring datafile 00005 to /ocfs_data/orcl/undotbs02.dbf
channel ORA_AUX_DISK_1: reading from backup piece /u01/backup/02l277h6_1_1
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle=/u01/backup/02l277h6_1_1 tag=TAG20091230T143518
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:25
Finished restore at 30-DEC-09

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

datafile 1 switched to datafile copy
input datafile copy recid=6 stamp=706945969 filename=/ocfs_data/orcl/system01.dbf
datafile 2 switched to datafile copy
input datafile copy recid=7 stamp=706945969 filename=/ocfs_data/orcl/undotbs01.dbf
datafile 3 switched to datafile copy
input datafile copy recid=8 stamp=706945969 filename=/ocfs_data/orcl/sysaux01.dbf
datafile 4 switched to datafile copy
input datafile copy recid=9 stamp=706945969 filename=/ocfs_data/orcl/users01.dbf
datafile 5 switched to datafile copy
input datafile copy recid=10 stamp=706945969 filename=/ocfs_data/orcl/undotbs02.dbf
Finished Duplicate Db at 30-DEC-09

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/35489/viewspace-624188/,如需轉載,請註明出處,否則將追究法律責任。

相關文章