RMAN-06023: no backup or copy of datafile <n> found to restore

Problem:

$ rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Fri Mar 4 01:13:51 2022
Version 19.3.0.0.0

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

connected to target database: ORCL (not mounted)

RMAN> restore standby controlfile from '/ACFS/rman/db_stby.ctl';

Starting restore at 04-MAR-22
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=396 instance=orcl1 device type=DISK

channel ORA_DISK_1: copied control file copy
output file name=+DATADG/ORCLSTBY/CONTROLFILE/current.257.1098377679
Finished restore at 04-MAR-22

RMAN> alter database mount;

released channel: ORA_DISK_1
Statement processed

RMAN> run {
set newname for datafile 1 to '+DATADG/ORCLSTBY/DATAFILE/system.257.1059355087';
set newname for datafile 2 to '+DATADG/ORCLSTBY/DATAFILE/tdata.587.1068061231';
set newname for datafile 3 to '+DATADG/ORCLSTBY/DATAFILE/sysaux.263.1059355123';
set newname for datafile 4 to '+DATADG/ORCLSTBY/DATAFILE/undotbs1.258.1059355147';
set newname for datafile 5 to '+DATADG/ORCLSTBY/DATAFILE/tdata.268.1059409085';
set newname for datafile 7 to '+DATADG/ORCLSTBY/DATAFILE/users.259.1059355149';
restore database;
switch datafile all;
}

using channel ORA_DISK_1

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 03/04/2022 01:15:34
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 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore

Check datafile 1 of backup & backup set

-- Check datafile 1 of backup
RMAN> list backup of datafile 1;

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
2899    Full    6.20G      DISK        00:19:36     04-MAR-22      
        BP Key: 2899   Status: AVAILABLE  Compressed: YES  Tag: TAG20220304T002333
        Piece Name: /ACFS/rman/qn0ngko5_1_1
  List of Datafiles in backup set 2899
  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- --------- ----------- ------ ----
  1       Full 4899846165 04-MAR-22              NO    +DATADG/ORCL/DATAFILE/system.257.1059355087

[oracle@orcl-db1 rman]$ ls -l /ACFS/rman/qn0ngko5_1_1
-rw-r----- 1 oracle asmadmin 6655459328 Mar  4 00:43 /ACFS/rman/qn0ngko5_1_1

Show list incarnation

RMAN> list incarnation;

List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1       1       ORCL     1587135951       PARENT  1          17-APR-19
2       2       ORCL     1587135951       PARENT  1920977    17-DEC-20
3       3       ORCL     1587135951       CURRENT 155396270  07-JAN-21

Soultion: 重設 incarnation

RMAN> reset database to incarnation 2;
RMAN> run {
set newname for datafile 1 to '+DATADG/ORCLSTBY/DATAFILE/system.257.1059355087';
set newname for datafile 2 to '+DATADG/ORCLSTBY/DATAFILE/tdata.587.1068061231';
set newname for datafile 3 to '+DATADG/ORCLSTBY/DATAFILE/sysaux.263.1059355123';
set newname for datafile 4 to '+DATADG/ORCLSTBY/DATAFILE/undotbs1.258.1059355147';
set newname for datafile 5 to '+DATADG/ORCLSTBY/DATAFILE/tdata.268.1059409085';
set newname for datafile 7 to '+DATADG/ORCLSTBY/DATAFILE/users.259.1059355149';
restore database;
switch datafile all;
}2> 3> 4> 5> 6> 7> 8> 9> 10> 

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 04-MAR-22
using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to +DATADG/ORCLSTBY/DATAFILE/system.257.1059355087
channel ORA_DISK_1: restoring datafile 00002 to +DATADG/ORCLSTBY/DATAFILE/tdata.587.1068061231
channel ORA_DISK_1: restoring datafile 00003 to +DATADG/ORCLSTBY/DATAFILE/sysaux.263.1059355123
channel ORA_DISK_1: restoring datafile 00004 to +DATADG/ORCLSTBY/DATAFILE/undotbs1.258.1059355147
channel ORA_DISK_1: restoring datafile 00005 to +DATADG/ORCLSTBY/DATAFILE/tdata.268.1059409085
channel ORA_DISK_1: restoring datafile 00007 to +DATADG/ORCLSTBY/DATAFILE/users.259.1059355149
channel ORA_DISK_1: reading from backup piece /ACFS/rman/qn0ngko5_1_1

datafile 1 switched to datafile copy
input datafile copy RECID=10 STAMP=1098409344 file name=+DATADG/ORCLSTBY/DATAFILE/system.389.1098407999
datafile 2 switched to datafile copy
input datafile copy RECID=11 STAMP=1098409344 file name=+DATADG/ORCLSTBY/DATAFILE/tdata.297.1098407999
datafile 3 switched to datafile copy
input datafile copy RECID=12 STAMP=1098409344 file name=+DATADG/ORCLSTBY/DATAFILE/sysaux.610.1098407999
datafile 4 switched to datafile copy
input datafile copy RECID=13 STAMP=1098409344 file name=+DATADG/ORCLSTBY/DATAFILE/undotbs1.406.1098407999
datafile 5 switched to datafile copy
input datafile copy RECID=14 STAMP=1098409344 file name=+DATADG/ORCLSTBY/DATAFILE/tdata.258.1098407999
datafile 7 switched to datafile copy
input datafile copy RECID=15 STAMP=1098409344 file name=+DATADG/ORCLSTBY/DATAFILE/users.312.1098407999

RMAN> report schema;

RMAN-06139: warning: control file is not current for REPORT SCHEMA
Report of database schema for database with db_unique_name ORCLSTBY

List of Permanent Datafiles
===========================
File Size(MB) Tablespace           RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1    5210     SYSTEM               ***     +DATADG/ORCLSTBY/DATAFILE/system.389.1098407999
2    21924    TDATA              ***     +DATADG/ORCLSTBY/DATAFILE/tdata.297.1098407999
3    3050     SYSAUX               ***     +DATADG/ORCLSTBY/DATAFILE/sysaux.610.1098407999
4    3005     UNDOTBS1             ***     +DATADG/ORCLSTBY/DATAFILE/undotbs1.406.1098407999
5    32767    TDATA              ***     +DATADG/ORCLSTBY/DATAFILE/tdata.258.1098407999
7    5        USERS                ***     +DATADG/ORCLSTBY/DATAFILE/users.312.1098407999

List of Temporary Files
=======================
File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1    20       TEMP                 32767       +DATADG/ORCL/TEMPFILE/temp.261.1059355223

張貼留言

0 留言