[oracle@Lambor dbs]$ rman target sys/oracle auxiliary sys/oracle@Lambor1:1521/sh
Recovery Manager: Release 11.2.0.4.0 - Production on Fri Jun 8 15:55:57 2018
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: PROD (DBID=385531491)
connected to auxiliary database: PROD (not mounted)
connected to auxiliary database: PROD (not mounted)
RMAN> duplicate target database for standby from active database;
Starting Duplicate Db at 2018/06/08 15:56:24
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=20 device type=DISK
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=20 device type=DISK
contents of Memory Script:
{
backup as copy reuse
targetfile '/u01/app/oracle/product/11.2.0.4/db_1/dbs/orapwbj' auxiliary format
'/u01/app/oracle/product/11.2.0.4/db_1/dbs/orapwsh' ;
}
executing Memory Script
{
backup as copy reuse
targetfile '/u01/app/oracle/product/11.2.0.4/db_1/dbs/orapwbj' auxiliary format
'/u01/app/oracle/product/11.2.0.4/db_1/dbs/orapwsh' ;
}
executing Memory Script
Starting backup at 2018/06/08 15:56:24
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=39 device type=DISK
Finished backup at 2018/06/08 15:56:26
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=39 device type=DISK
Finished backup at 2018/06/08 15:56:26
contents of Memory Script:
{
backup as copy current controlfile for standby auxiliary format '/u01/app/oracle/oradata/sh/control01.ctl';
restore clone controlfile to '/u01/app/oracle/oradata/sh/control02.ctl' from
'/u01/app/oracle/oradata/sh/control01.ctl';
restore clone controlfile to '/u01/app/oracle/oradata/sh/control03.ctl' from
'/u01/app/oracle/oradata/sh/control01.ctl';
restore clone controlfile to '/u02/control04.ctl' from
'/u01/app/oracle/oradata/sh/control01.ctl';
}
executing Memory Script
{
backup as copy current controlfile for standby auxiliary format '/u01/app/oracle/oradata/sh/control01.ctl';
restore clone controlfile to '/u01/app/oracle/oradata/sh/control02.ctl' from
'/u01/app/oracle/oradata/sh/control01.ctl';
restore clone controlfile to '/u01/app/oracle/oradata/sh/control03.ctl' from
'/u01/app/oracle/oradata/sh/control01.ctl';
restore clone controlfile to '/u02/control04.ctl' from
'/u01/app/oracle/oradata/sh/control01.ctl';
}
executing Memory Script
Starting backup at 2018/06/08 15:56:26
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
copying standby control file
output file name=/u01/app/oracle/product/11.2.0.4/db_1/dbs/snapcf_bj.f tag=TAG20180608T155626 RECID=10 STAMP=978278187
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
Finished backup at 2018/06/08 15:56:29
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
copying standby control file
output file name=/u01/app/oracle/product/11.2.0.4/db_1/dbs/snapcf_bj.f tag=TAG20180608T155626 RECID=10 STAMP=978278187
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
Finished backup at 2018/06/08 15:56:29
Starting restore at 2018/06/08 15:56:29
using channel ORA_AUX_DISK_1
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: copied control file copy
Finished restore at 2018/06/08 15:56:31
Finished restore at 2018/06/08 15:56:31
Starting restore at 2018/06/08 15:56:31
using channel ORA_AUX_DISK_1
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: copied control file copy
Finished restore at 2018/06/08 15:56:32
Finished restore at 2018/06/08 15:56:32
Starting restore at 2018/06/08 15:56:32
using channel ORA_AUX_DISK_1
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: copied control file copy
Finished restore at 2018/06/08 15:56:33
Finished restore at 2018/06/08 15:56:33
contents of Memory Script:
{
sql clone 'alter database mount standby database';
}
executing Memory Script
{
sql clone 'alter database mount standby database';
}
executing Memory Script
sql statement: alter database mount standby database
Using previous duplicated file /u01/app/oracle/oradata/sh/system01.dbf for datafile 1 with checkpoint SCN of 827874
Using previous duplicated file /u01/app/oracle/oradata/sh/sysaux01.dbf for datafile 2 with checkpoint SCN of 827895
Using previous duplicated file /u01/app/oracle/oradata/sh/undotbs01.dbf for datafile 3 with checkpoint SCN of 827912
Using previous duplicated file /u01/app/oracle/oradata/sh/users01.dbf for datafile 4 with checkpoint SCN of 827855
Using previous duplicated file /u01/app/oracle/oradata/sh/a.dbf for datafile 5 with checkpoint SCN of 827923
Using previous duplicated file /u01/app/oracle/oradata/sh/sales.dbf for datafile 6 with checkpoint SCN of 827927
Using previous duplicated file /u01/app/oracle/oradata/sh/system01.dbf for datafile 1 with checkpoint SCN of 827874
Using previous duplicated file /u01/app/oracle/oradata/sh/sysaux01.dbf for datafile 2 with checkpoint SCN of 827895
Using previous duplicated file /u01/app/oracle/oradata/sh/undotbs01.dbf for datafile 3 with checkpoint SCN of 827912
Using previous duplicated file /u01/app/oracle/oradata/sh/users01.dbf for datafile 4 with checkpoint SCN of 827855
Using previous duplicated file /u01/app/oracle/oradata/sh/a.dbf for datafile 5 with checkpoint SCN of 827923
Using previous duplicated file /u01/app/oracle/oradata/sh/sales.dbf for datafile 6 with checkpoint SCN of 827927
contents of Memory Script:
{
set newname for tempfile 1 to
"/u01/app/oracle/oradata/sh/temp01.dbf";
switch clone tempfile all;
set newname for datafile 1 to
"/u01/app/oracle/oradata/sh/system01.dbf";
set newname for datafile 2 to
"/u01/app/oracle/oradata/sh/sysaux01.dbf";
set newname for datafile 3 to
"/u01/app/oracle/oradata/sh/undotbs01.dbf";
set newname for datafile 4 to
"/u01/app/oracle/oradata/sh/users01.dbf";
set newname for datafile 5 to
"/u01/app/oracle/oradata/sh/a.dbf";
set newname for datafile 6 to
"/u01/app/oracle/oradata/sh/sales.dbf";
set newname for datafile 7 to
"/u01/app/oracle/oradata/sh1/a02.dbf";
backup as copy reuse
datafile 7 auxiliary format
"/u01/app/oracle/oradata/sh1/a02.dbf" ;
sql 'alter system archive log current';
}
executing Memory Script
{
set newname for tempfile 1 to
"/u01/app/oracle/oradata/sh/temp01.dbf";
switch clone tempfile all;
set newname for datafile 1 to
"/u01/app/oracle/oradata/sh/system01.dbf";
set newname for datafile 2 to
"/u01/app/oracle/oradata/sh/sysaux01.dbf";
set newname for datafile 3 to
"/u01/app/oracle/oradata/sh/undotbs01.dbf";
set newname for datafile 4 to
"/u01/app/oracle/oradata/sh/users01.dbf";
set newname for datafile 5 to
"/u01/app/oracle/oradata/sh/a.dbf";
set newname for datafile 6 to
"/u01/app/oracle/oradata/sh/sales.dbf";
set newname for datafile 7 to
"/u01/app/oracle/oradata/sh1/a02.dbf";
backup as copy reuse
datafile 7 auxiliary format
"/u01/app/oracle/oradata/sh1/a02.dbf" ;
sql 'alter system archive log current';
}
executing Memory Script
executing command: SET NEWNAME
renamed tempfile 1 to /u01/app/oracle/oradata/sh/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
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting backup at 2018/06/08 15:56:40
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile file number=00007 name=/u01/app/oracle/oradata/prod1/a02.dbf
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 06/08/2018 15:56:41
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 06/08/2018 15:56:41
ORA-17628: Oracle error 19505 returned by remote Oracle server
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile file number=00007 name=/u01/app/oracle/oradata/prod1/a02.dbf
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 06/08/2018 15:56:41
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 06/08/2018 15:56:41
ORA-17628: Oracle error 19505 returned by remote Oracle server
本文记录了使用Oracle Recovery Manager (RMAN) 进行在线热备复制的过程,包括目标数据库与辅助数据库的连接、数据文件及控制文件的备份、数据库挂载等步骤。但在执行数据文件复制时遇到错误。
1261





