NBU 异机恢复 rman-06026 man-06023 异常处理

NBU 异机恢复 rman-06026 man-06023 异常处理

owner
2024-04-10 / 0 评论 / 75 阅读 / 正在检测是否收录...

异常信息

rman异机恢复时,报错RMAN-06026、RMAN-06023,如下所示:

敏感信息做脱敏处理

RMAN> run {
ALLOCATE CHANNEL CH10 TYPE 'sbt_tape';
ALLOCATE CHANNEL CH11 TYPE 'sbt_tape';
ALLOCATE CHANNEL CH12 TYPE 'sbt_tape';
ALLOCATE CHANNEL CH13 TYPE 'sbt_tape';
ALLOCATE CHANNEL CH14 TYPE 'sbt_tape';
SEND 'NB_ORA_SERV=nbuServer, NB_ORA_CLIENT=xxxdb';
set newname for datafile  1 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile  2 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile  3 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile  4 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile  5 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile  6 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile  7 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile  8 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile  9 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 10 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 11 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 12 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 13 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 14 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 15 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 16 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 17 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 18 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 19 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 20 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 21 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 22 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 23 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 24 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 25 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 26 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 27 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 28 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 29 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 30 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 31 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 32 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 33 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 34 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 35 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 36 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 37 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 38 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 39 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 40 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 41 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 42 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 43 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 44 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 45 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 46 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 47 to '/u01/app/oracle/oradata/xxx.dbf';
restore database;
switch datafile all;
release channel ch10;
release channel ch11;
release channel ch12;
release channel ch13;
release channel ch14;
62> }

allocated channel: CH10
channel CH10: SID=1702 device type=SBT_TAPE
channel CH10: Veritas NetBackup for Oracle - Release 10.2 (2023032421)

allocated channel: CH11
channel CH11: SID=2268 device type=SBT_TAPE
channel CH11: Veritas NetBackup for Oracle - Release 10.2 (2023032421)

allocated channel: CH12
channel CH12: SID=2834 device type=SBT_TAPE
channel CH12: Veritas NetBackup for Oracle - Release 10.2 (2023032421)

allocated channel: CH13
channel CH13: SID=3400 device type=SBT_TAPE
channel CH13: Veritas NetBackup for Oracle - Release 10.2 (2023032421)

allocated channel: CH14
channel CH14: SID=3967 device type=SBT_TAPE
channel CH14: Veritas NetBackup for Oracle - Release 10.2 (2023032421)

sent command to channel: ORA_MAINT_SBT_TAPE_3
sent command to channel: ORA_MAINT_DISK_4
sent command to channel: CH10
sent command to channel: CH11
sent command to channel: CH12
sent command to channel: CH13
sent command to channel: CH14

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

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

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

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

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 10-APR-24

released channel: CH10
released channel: CH11
released channel: CH12
released channel: CH13
released channel: CH14
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 04/10/2024 17:06:56
RMAN-06026: some targets not found - aborting 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

显示找不到数据文件的备份文件。

在目标机器上使用rman查询incarnatioin记录:

rman target /
RMAN> list incarnation;
List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1       1       JHEMR    1358074586       ORPHAN 1          24-AUG-13
2       2       JHEMR    1358074586       ORPHAN  925702     22-JUL-19
3       3       JHEMR    1358074586       ORPHAN  86506916788 17-DEC-21
4       4       JHEMR    1358074586       CURRENT  88670576572 25-FEB-22

在原数据库上执行相同的查询:

RMAN> list incarnation;

using target database control file instead of recovery catalog

List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1       1       JHEMR    1358074586       PARENT  1          2013:08:2411:37:30
2       2       JHEMR    1358074586       PARENT  925702     2019:07:2200:57:01
3       3       JHEMR    1358074586       CURRENT 86506916788 2021:12:1700:51:45

结论及处理方案

对比incarnatioin记录 发现目标库的CURRENT记录号和原库的CURRENT记录号不一致, 将目标库的当前记录修改为原库一致的记录号:

RMAN> reset database to  incarnation 3;
database reset to incarnation 3

然后再次执行NBU恢复命令, 无异常

敏感信息做脱敏处理

RMAN> run {
ALLOCATE CHANNEL CH10 TYPE 'sbt_tape';
ALLOCATE CHANNEL CH11 TYPE 'sbt_tape';
ALLOCATE CHANNEL CH12 TYPE 'sbt_tape';
ALLOCATE CHANNEL CH13 TYPE 'sbt_tape';
ALLOCATE CHANNEL CH14 TYPE 'sbt_tape';
SEND 'NB_ORA_SERV=nbuServer, NB_ORA_CLIENT=xxxdb';
set newname for datafile  1 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile  2 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile  3 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile  4 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile  5 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile  6 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile  7 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile  8 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile  9 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 10 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 11 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 12 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 13 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 14 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 15 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 16 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 17 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 18 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 19 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 20 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 21 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 22 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 23 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 24 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 25 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 26 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 27 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 28 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 29 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 30 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 31 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 32 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 33 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 34 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 35 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 36 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 37 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 38 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 39 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 40 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 41 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 42 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 43 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 44 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 45 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 46 to '/u01/app/oracle/oradata/xxx.dbf';
set newname for datafile 47 to '/u01/app/oracle/oradata/xxx.dbf';
restore database;
switch datafile all;
release channel ch10;
release channel ch11;
release channel ch12;
release channel ch13;
release channel ch14;
62> }

allocated channel: CH10
channel CH10: SID=1702 device type=SBT_TAPE
channel CH10: Veritas NetBackup for Oracle - Release 10.2 (2023032421)

allocated channel: CH11
channel CH11: SID=2268 device type=SBT_TAPE
channel CH11: Veritas NetBackup for Oracle - Release 10.2 (2023032421)

allocated channel: CH12
channel CH12: SID=2834 device type=SBT_TAPE
channel CH12: Veritas NetBackup for Oracle - Release 10.2 (2023032421)

allocated channel: CH13
channel CH13: SID=3400 device type=SBT_TAPE
channel CH13: Veritas NetBackup for Oracle - Release 10.2 (2023032421)

allocated channel: CH14
channel CH14: SID=3967 device type=SBT_TAPE
channel CH14: Veritas NetBackup for Oracle - Release 10.2 (2023032421)

sent command to channel: ORA_MAINT_SBT_TAPE_3
sent command to channel: ORA_MAINT_DISK_4
sent command to channel: CH10
sent command to channel: CH11
sent command to channel: CH12
sent command to channel: CH13
sent command to channel: CH14

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

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

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

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

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 10-APR-24

Starting restore at 10-APR-24

channel CH10: starting datafile backup set restore
channel CH10: specifying datafile(s) to restore from backup set
channel CH10: restoring datafile 00003 to /u01/app/oracle/oradata/xxx.dbf
channel CH10: restoring datafile 00008 to /u01/app/oracle/oradata/xxx.dbf
channel CH10: restoring datafile 00021 to /u01/app/oracle/oradata/xxx.dbf
channel CH10: restoring datafile 00030 to /u01/app/oracle/oradata/xxx.dbf
channel CH10: restoring datafile 00043 to /u01/app/oracle/oradata/xxx.dbf
channel CH10: reading from backup piece bk_47370_1_1165622409
channel CH11: starting datafile backup set restore
channel CH11: specifying datafile(s) to restore from backup set
channel CH11: restoring datafile 00009 to /u01/app/oracle/oradata/xxx.dbf
channel CH11: restoring datafile 00022 to /u01/app/oracle/oradata/xxx.dbf
channel CH11: restoring datafile 00024 to /u01/app/oracle/oradata/xxx.dbf
channel CH11: restoring datafile 00031 to /u01/app/oracle/oradata/xxx.dbf
channel CH11: restoring datafile 00044 to /u01/app/oracle/oradata/xxx.dbf
channel CH11: reading from backup piece bk_47371_1_1165622409
channel CH12: starting datafile backup set restore
channel CH12: specifying datafile(s) to restore from backup set
channel CH12: restoring datafile 00001 to /u01/app/oracle/oradata/xxx.dbf
channel CH12: restoring datafile 00005 to /u01/app/oracle/oradata/xxx.dbf
channel CH12: restoring datafile 00013 to /u01/app/oracle/oradata/xxx.dbf
channel CH12: restoring datafile 00014 to /u01/app/oracle/oradata/xxx.dbf
channel CH12: restoring datafile 00016 to /u01/app/oracle/oradata/xxx.dbf
channel CH12: reading from backup piece bk_47372_1_1165629595
channel CH13: starting datafile backup set restore
channel CH13: specifying datafile(s) to restore from backup set
channel CH13: restoring datafile 00012 to /u01/app/oracle/oradata/xxx.dbf
channel CH13: restoring datafile 00017 to /u01/app/oracle/oradata/xxx.dbf
channel CH13: restoring datafile 00018 to /u01/app/oracle/oradata/xxx.dbf
channel CH13: restoring datafile 00047 to /u01/app/oracle/oradata/xxx.dbf
channel CH13: reading from backup piece bk_47373_1_1165638790
channel CH14: starting datafile backup set restore
channel CH14: specifying datafile(s) to restore from backup set
channel CH14: restoring datafile 00011 to /u01/app/oracle/oradata/xxx.dbf
channel CH14: restoring datafile 00028 to /u01/app/oracle/oradata/xxx.dbf
channel CH14: restoring datafile 00037 to /u01/app/oracle/oradata/xxx.dbf
channel CH14: restoring datafile 00046 to /u01/app/oracle/oradata/xxx.dbf
channel CH14: reading from backup piece bk_47374_1_1165641215
0

评论 (0)

取消