oracle dg复制备库约到如下错误

连接主备库
rman target sys/oracle@fc91 auxiliary sys/oracle@fc94
执行脚本:
run{
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
allocate AUXILIARY channel c4 type disk;
allocate AUXILIARY channel c5 type disk;
allocate AUXILIARY channel c6 type disk;
DUPLICATE TARGET DATABASE
FOR STANDBY
FROM ACTIVE DATABASE
DORECOVER
NOFILENAMECHECK;
release channel c1;
release channel c2;
release channel c3;
release channel c4;
release channel c5;
release channel c6;
}

Recovery Manager: Release 19.0.0.0.0 - Production on Tue Jan 21 16:23:00 2020
Version 19.3.0.0.0

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

connected to target database: FC91 (DBID=2505363336)
connected to auxiliary database: FC91 (DBID=2505363336, not open)

RMAN>

现在日志如下:
using target database control file instead of recovery catalog
allocated channel: c1
channel c1: SID=729 device type=DISK

allocated channel: c2
channel c2: SID=1094 device type=DISK

allocated channel: c3
channel c3: SID=609 device type=DISK

allocated channel: c4
channel c4: SID=1212 device type=DISK

allocated channel: c5
channel c5: SID=1333 device type=DISK

allocated channel: c6
channel c6: SID=1454 device type=DISK

Starting Duplicate Db at 21-JAN-20

contents of Memory Script:
{
backup as copy reuse
passwordfile auxiliary format '/opt/oracle/product/19c/dbhome_1/dbs/orapwFC94' ;
}
executing Memory Script

Starting backup at 21-JAN-20
Finished backup at 21-JAN-20

contents of Memory Script:
{
restore clone from service 'fc91' standby controlfile;
}
executing Memory Script

Starting restore at 21-JAN-20

channel c4: starting datafile backup set restore
channel c4: using network backup set from service fc91
channel c4: restoring control file
channel c4: restore complete, elapsed time: 00:00:01
output file name=/opt/oracle/oradata/FC94/control01.ctl
output file name=/opt/oracle/oradata/FC94/control02.ctl
Finished restore at 21-JAN-20

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

sql statement: alter database mount standby database

contents of Memory Script:
{
set newname for tempfile 1 to
"/opt/oracle/oradata/FC94/temp01.dbf";
set newname for tempfile 2 to
"/opt/oracle/oradata/FC94/pdbseed/temp012020-01-21_11-02-57-925-AM.dbf";
set newname for tempfile 3 to
"/opt/oracle/oradata/FC94/ORCLPDB1/temp01.dbf";
switch clone tempfile all;
set newname for datafile 1 to
"/opt/oracle/oradata/FC94/system01.dbf";
set newname for datafile 3 to
"/opt/oracle/oradata/FC94/sysaux01.dbf";
set newname for datafile 4 to
"/opt/oracle/oradata/FC94/undotbs01.dbf";
set newname for datafile 5 to
"/opt/oracle/oradata/FC94/pdbseed/system01.dbf";
set newname for datafile 6 to
"/opt/oracle/oradata/FC94/pdbseed/sysaux01.dbf";
set newname for datafile 7 to
"/opt/oracle/oradata/FC94/users01.dbf";
set newname for datafile 8 to
"/opt/oracle/oradata/FC94/pdbseed/undotbs01.dbf";
set newname for datafile 9 to
"/opt/oracle/oradata/FC94/ORCLPDB1/system01.dbf";
set newname for datafile 10 to
"/opt/oracle/oradata/FC94/ORCLPDB1/sysaux01.dbf";
set newname for datafile 11 to
"/opt/oracle/oradata/FC94/ORCLPDB1/undotbs01.dbf";
set newname for datafile 12 to
"/opt/oracle/oradata/FC94/ORCLPDB1/users01.dbf";
restore
from nonsparse from service
'fc91' clone database
;
sql 'alter system archive log current';
}
executing Memory Script

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

renamed tempfile 1 to /opt/oracle/oradata/FC94/temp01.dbf in control file
renamed tempfile 2 to /opt/oracle/oradata/FC94/pdbseed/temp012020-01-21_11-02-57-925-AM.dbf in control file
renamed tempfile 3 to /opt/oracle/oradata/FC94/ORCLPDB1/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

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 21-JAN-20

channel c4: starting datafile backup set restore
channel c4: using network backup set from service fc91
channel c4: specifying datafile(s) to restore from backup set
channel c4: restoring datafile 00001 to /opt/oracle/oradata/FC94/system01.dbf
released channel: c1
released channel: c2
released channel: c3
released channel: c4
released channel: c5
released channel: c6
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 01/21/2020 16:12:58
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
ORA-19845: error in backupDataFile while communicating with remote database server
ORA-17628: Oracle error 19602 returned by remote Oracle server
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode
ORA-19660: some files in the backup set could not be verified
ORA-19661: datafile 1 could not be verified
ORA-19845: error in backupDataFile while communicating with remote database server
ORA-17628: Oracle error 19602 returned by remote Oracle server
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode

根据日志,出现了ORA-19602错误,该错误是由于复制过程中无法备份或复制处于NOARCHIVELOG模式下的活跃文件所导致的。需要在主库上打开归档日志模式,才能使备库处于可恢复状态。在NOARCHIVELOG模式下,不支持增量备份和恢复,只能使用完全备份,并且每次重启数据库时都需要将数据库还原到最近一次完全备份。

您需要采取以下步骤:

  1. 在主库上通过如下命令打开归档日志模式:

ALTER DATABASE ARCHIVELOG;

  1. 确保主库至少有一个完整备份,例如全库备份。

  2. 重新运行复制脚本。

希望这能帮到您解决问题!