RMAN-03002 RMAN-06172 Rman 从磁带恢复整个database

RMAN> startup nomount;

Oracle instance started

Total System Global Area    2382361320 bytes

Fixed Size                     9167592 bytes
Variable Size                922746880 bytes
Database Buffers            1442840576 bytes
Redo Buffers                   7606272 bytes

RMAN> run {
2> allocate channel ch00 device type 'SBT_TAPE'
3> PARMS="SBT_LIBRARY=oracle.disksbt,
4> ENV=(BACKUP_DIR=/nfs)";
5> restore controlfile FROM "c-2265125454-202406";
6> ##restore controlfile from autobackup maxdays 30;
7>     }

using target database control file instead of recovery catalog
allocated channel: ch00
channel ch00: SID=32 instance=cdb3 device type=SBT_TAPE
channel ch00: WARNING: Oracle Test Disk API

Starting restore at 07-JUL-24

released channel: ch00
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 07/07/2024 01:30:25
RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece

c-2265125454-202406 少了16-0e

RMAN> run {
2> allocate channel ch00 device type 'SBT_TAPE'
3> PARMS="SBT_LIBRARY=oracle.disksbt,
4> ENV=(BACKUP_DIR=/nfs)";
5> ##restore controlfile FROM "c-2265125454-202406";
6> restore controlfile from autobackup maxdays 30;
7>     }

allocated channel: ch00
channel ch00: SID=32 instance=cdb3 device type=SBT_TAPE
channel ch00: WARNING: Oracle Test Disk API

Starting restore at 07-JUL-24

AUTOBACKUP search with format "%F" not attempted because DBID was not set
released channel: ch00
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 07/07/2024 01:30:46
RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece

 


Recovery Manager complete.
[oracle@rac3 ~]$ echo $ORACLE_SID
cdb3              SID有了,还需要DBID, DBID去alert log search就可以
[oracle@rac3 ~]$ rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Sun Jul 7 01:31:22 2024
Version 19.20.0.0.0

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

connected to target database: CDB (not mounted)

RMAN> run {
2> allocate channel ch00 device type 'SBT_TAPE'
3> PARMS="SBT_LIBRARY=oracle.disksbt,
4> ENV=(BACKUP_DIR=/nfs)";
5> ##restore controlfile FROM "c-2265125454-202406";
6> restore controlfile from autobackup maxdays 30;
7>     }

using target database control file instead of recovery catalog
allocated channel: ch00
channel ch00: SID=29 instance=cdb3 device type=SBT_TAPE
channel ch00: WARNING: Oracle Test Disk API

Starting restore at 07-JUL-24

AUTOBACKUP search with format "%F" not attempted because DBID was not set
released channel: ch00
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 07/07/2024 01:31:26
RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece

RMAN> set dbid 2265125454;

executing command: SET DBID

RMAN> run {
2> allocate channel ch00 device type 'SBT_TAPE'
3> PARMS="SBT_LIBRARY=oracle.disksbt,
4> ENV=(BACKUP_DIR=/nfs)";
5> ##restore controlfile FROM "c-2265125454-202406";
6> restore controlfile from autobackup maxdays 30;
7>     }

allocated channel: ch00
channel ch00: SID=29 instance=cdb3 device type=SBT_TAPE
channel ch00: WARNING: Oracle Test Disk API

Starting restore at 07-JUL-24

channel ch00: looking for AUTOBACKUP on day: 20240707
channel ch00: looking for AUTOBACKUP on day: 20240706
channel ch00: looking for AUTOBACKUP on day: 20240705
channel ch00: looking for AUTOBACKUP on day: 20240704
channel ch00: looking for AUTOBACKUP on day: 20240703
channel ch00: looking for AUTOBACKUP on day: 20240702
channel ch00: looking for AUTOBACKUP on day: 20240701
channel ch00: looking for AUTOBACKUP on day: 20240630
channel ch00: looking for AUTOBACKUP on day: 20240629
channel ch00: looking for AUTOBACKUP on day: 20240628
channel ch00: looking for AUTOBACKUP on day: 20240627
channel ch00: looking for AUTOBACKUP on day: 20240626
channel ch00: looking for AUTOBACKUP on day: 20240625
channel ch00: looking for AUTOBACKUP on day: 20240624
channel ch00: looking for AUTOBACKUP on day: 20240623
channel ch00: looking for AUTOBACKUP on day: 20240622
channel ch00: looking for AUTOBACKUP on day: 20240621
channel ch00: looking for AUTOBACKUP on day: 20240620
channel ch00: looking for AUTOBACKUP on day: 20240619
channel ch00: looking for AUTOBACKUP on day: 20240618
channel ch00: looking for AUTOBACKUP on day: 20240617
channel ch00: looking for AUTOBACKUP on day: 20240616
channel ch00: AUTOBACKUP found: c-2265125454-20240616-0e
channel ch00: restoring control file from AUTOBACKUP c-2265125454-20240616-0e
channel ch00: control file restore from AUTOBACKUP complete
output file name=+DATA/CDB/CONTROLFILE/current.303.1148478735
output file name=+DATA/CDB/CONTROLFILE/current.289.1148478735
Finished restore at 07-JUL-24
released channel: ch00

RMAN> run {          
2> allocate channel ch00 device type 'SBT_TAPE'
3> PARMS="SBT_LIBRARY=oracle.disksbt,
4> ENV=(BACKUP_DIR=/nfs)";
5> restore controlfile FROM "c-2265125454-202406";
6> ##restore controlfile from autobackup maxdays 30;
7>     } 

RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece

 

RMAN> run {
2> allocate channel ch00 device type 'SBT_TAPE'
3> PARMS="SBT_LIBRARY=oracle.disksbt,
4> ENV=(BACKUP_DIR=/nfs)";
5> restore controlfile from "c-2265125454-20240616-0e"; 要全的
6> }

released channel: ORA_DISK_1
allocated channel: ch00
channel ch00: SID=32 instance=cdb3 device type=SBT_TAPE
channel ch00: WARNING: Oracle Test Disk API

Starting restore at 07-JUL-24

channel ch00: restoring control file
channel ch00: restore complete, elapsed time: 00:00:01
output file name=+DATA/CDB/CONTROLFILE/current.303.1148478735
output file name=+DATA/CDB/CONTROLFILE/current.289.1148478735
Finished restore at 07-JUL-24
released channel: ch00
 

-------list backu看不到controlfile 但是可以恢复, 未恢复旧的controlfile时可以看到的!!!-----

--

[root@rac3 nfs]# ls -ltr
total 1493280
-rw-r--r--. 1 oracle asmadmin   6029328 Jun 16 12:28 5j2tghj1_179_1_1
-rw-r--r--. 1 oracle asmadmin 629145616 Jun 16 12:28 5k2tghj2_180_1_1
-rw-r--r--. 1 oracle asmadmin 444596240 Jun 16 12:29 5l2tghk6_181_1_1
-rw-r--r--. 1 oracle asmadmin 423624720 Jun 16 12:29 5m2tghkv_182_1_1
-rw-r--r--. 1 oracle asmadmin    524304 Jun 16 12:29 5n2tghlo_183_1_1
-rw-r--r--. 1 oracle asmadmin  25165840 Jun 16 12:29 c-2265125454-20240616-0e
-rw-r--r--. 1 oracle asmadmin      7840 Jul  7 01:35 Oracle_Disk_SBT_Catalog

--

RMAN> alter database mount;

RMAN> list backup;


BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
141     5.75M      SBT_TAPE    00:00:01     16-JUN-24      
        BP Key: 182   Status: AVAILABLE  Compressed: YES  Tag: FULLDBBACKUP0617
        Handle: 5j2tghj1_179_1_1   Media: /nfs,5j2tghj1_179_1_1

  List of Archived Logs in backup set 141
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  3    3       7602574    16-JUN-24 7605085    16-JUN-24

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
142     Full    600.00M    SBT_TAPE    00:00:32     16-JUN-24      
        BP Key: 183   Status: AVAILABLE  Compressed: YES  Tag: FULLDBBACKUP0617
        Handle: 5k2tghj2_180_1_1   Media: /nfs,5k2tghj2_180_1_1
  List of Datafiles in backup set 142
  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- --------- ----------- ------ ----
  1       Full 7605102    16-JUN-24              NO    +DATA/CDB/DATAFILE/system.258.1171797291
  3       Full 7605102    16-JUN-24              NO    +DATA/CDB/DATAFILE/sysaux.287.1171797291
  4       Full 7605102    16-JUN-24              NO    +DATA/CDB/DATAFILE/undotbs1.302.1171797291
  7       Full 7605102    16-JUN-24              NO    +DATA/CDB/DATAFILE/users.259.1171797291
  9       Full 7605102    16-JUN-24              NO    +DATA/CDB/DATAFILE/undotbs2.290.1171797291
  10      Full 7605102    16-JUN-24              NO    +DATA/CDB/DATAFILE/undotbs3.276.1171797291

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
143     Full    424.00M    SBT_TAPE    00:00:22     16-JUN-24      
        BP Key: 184   Status: AVAILABLE  Compressed: YES  Tag: FULLDBBACKUP0617
        Handle: 5l2tghk6_181_1_1   Media: /nfs,5l2tghk6_181_1_1
  List of Datafiles in backup set 143
  Container ID: 3, PDB Name: PDB
  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- --------- ----------- ------ ----
  11      Full 7605114    16-JUN-24              NO    +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.296.1171800421
  12      Full 7605114    16-JUN-24              NO    +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.289.1171800421
  13      Full 7605114    16-JUN-24              NO    +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.259.1171800421
  14      Full 7605114    16-JUN-24              NO    +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.338.1171800421
  15      Full 7605114    16-JUN-24              NO    +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.345.1171800421
  16      Full 7605114    16-JUN-24              NO    +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.347.1171800421

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
144     Full    404.00M    SBT_TAPE    00:00:20     16-JUN-24      
        BP Key: 185   Status: AVAILABLE  Compressed: YES  Tag: FULLDBBACKUP0617
        Handle: 5m2tghkv_182_1_1   Media: /nfs,5m2tghkv_182_1_1
  List of Datafiles in backup set 144
  Container ID: 2, PDB Name: PDB$SEED
  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- --------- ----------- ------ ----
  5       Full 5317292    27-SEP-23              NO    +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.280.1171797313
  6       Full 5317292    27-SEP-23              NO    +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.285.1171797313
  8       Full 5317292    27-SEP-23              NO    +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.293.1171797313

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
145     512.00K    SBT_TAPE    00:00:00     16-JUN-24      
        BP Key: 186   Status: AVAILABLE  Compressed: YES  Tag: FULLDBBACKUP0617
        Handle: 5n2tghlo_183_1_1   Media: /nfs,5n2tghlo_183_1_1

  List of Archived Logs in backup set 145
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  3    4       7605085    16-JUN-24 7606727    16-JUN-24

RMAN> list backup of spfile;   

specification does not match any backup in the repository

RMAN> list backup of spfile;

specification does not match any backup in the repository

RMAN> list backup of controlfile;

specification does not match any backup in the repository

 

RMAN> startup nomount force;

Oracle instance started

Total System Global Area    2382361320 bytes

Fixed Size                     9167592 bytes
Variable Size                922746880 bytes
Database Buffers            1442840576 bytes
Redo Buffers                   7606272 bytes

RMAN> run {
2> allocate channel ch00 device type 'SBT_TAPE'
3> PARMS="SBT_LIBRARY=oracle.disksbt,
4> ENV=(BACKUP_DIR=/nfs)";
5> ##list backup of controlfile;--no valid in run block
6> ##restore controlfile from "c-2265125454-20240616-0e";
7> restore controlfile from autobackup maxdays 30;
8> ##restore database;
9> ##recover database;
10>     }

allocated channel: ch00
channel ch00: SID=29 instance=cdb3 device type=SBT_TAPE
channel ch00: WARNING: Oracle Test Disk API

Starting restore at 07-JUL-24

channel ch00: looking for AUTOBACKUP on day: 20240707
channel ch00: looking for AUTOBACKUP on day: 20240706
channel ch00: looking for AUTOBACKUP on day: 20240705
channel ch00: looking for AUTOBACKUP on day: 20240704
channel ch00: looking for AUTOBACKUP on day: 20240703
channel ch00: looking for AUTOBACKUP on day: 20240702
channel ch00: looking for AUTOBACKUP on day: 20240701
channel ch00: looking for AUTOBACKUP on day: 20240630
channel ch00: looking for AUTOBACKUP on day: 20240629
channel ch00: looking for AUTOBACKUP on day: 20240628
channel ch00: looking for AUTOBACKUP on day: 20240627
channel ch00: looking for AUTOBACKUP on day: 20240626
channel ch00: looking for AUTOBACKUP on day: 20240625
channel ch00: looking for AUTOBACKUP on day: 20240624
channel ch00: looking for AUTOBACKUP on day: 20240623
channel ch00: looking for AUTOBACKUP on day: 20240622
channel ch00: looking for AUTOBACKUP on day: 20240621
channel ch00: looking for AUTOBACKUP on day: 20240620
channel ch00: looking for AUTOBACKUP on day: 20240619
channel ch00: looking for AUTOBACKUP on day: 20240618
channel ch00: looking for AUTOBACKUP on day: 20240617
channel ch00: looking for AUTOBACKUP on day: 20240616
channel ch00: AUTOBACKUP found: c-2265125454-20240616-0e
channel ch00: restoring control file from AUTOBACKUP c-2265125454-20240616-0e
channel ch00: control file restore from AUTOBACKUP complete
output file name=+DATA/CDB/CONTROLFILE/current.303.1148478735
output file name=+DATA/CDB/CONTROLFILE/current.289.1148478735
Finished restore at 07-JUL-24
released channel: ch00

  

RMAN> alter database mount;

Statement processed

RMAN> list backup of controlfile;---看不到这个controlfile 备份了

specification does not match any backup in the repository

RMAN>  list backup of controlfile until time 'SYSDATE-30';

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "until": expecting one of: "application, archivelog, backed, by, completed, controlfile, database, database root, datafile, device, foreign, for, guid, like, pluggable, recoverable, spfile, summary, tablespace, tag, ;"
RMAN-01007: at line 1 column 29 file: standard input

RMAN>

---------------------------

RMAN> alter database mount;

Statement processed

RMAN> run {
2> allocate channel ch00 device type 'SBT_TAPE'
3> PARMS="SBT_LIBRARY=oracle.disksbt,
4> ENV=(BACKUP_DIR=/nfs)";
5> ##restore controlfile from autobackup maxdays 30;
6> restore database;
7> recover database;
8>     }

allocated channel: ch00
channel ch00: SID=37 instance=cdb3 device type=SBT_TAPE
channel ch00: WARNING: Oracle Test Disk API

Starting restore at 07-JUL-24
Starting implicit crosscheck backup at 07-JUL-24
Finished implicit crosscheck backup at 07-JUL-24

Starting implicit crosscheck copy at 07-JUL-24
Crosschecked 5 objects
Finished implicit crosscheck copy at 07-JUL-24

searching for all files in the recovery area
cataloging files...
no files cataloged


channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00001 to +DATA/CDB/DATAFILE/system.258.1171797291
channel ch00: restoring datafile 00003 to +DATA/CDB/DATAFILE/sysaux.287.1171797291
channel ch00: restoring datafile 00004 to +DATA/CDB/DATAFILE/undotbs1.302.1171797291
channel ch00: restoring datafile 00007 to +DATA/CDB/DATAFILE/users.259.1171797291
channel ch00: restoring datafile 00009 to +DATA/CDB/DATAFILE/undotbs2.290.1171797291
channel ch00: restoring datafile 00010 to +DATA/CDB/DATAFILE/undotbs3.276.1171797291
channel ch00: reading from backup piece 5k2tghj2_180_1_1
channel ch00: piece handle=5k2tghj2_180_1_1 tag=FULLDBBACKUP0617
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:45
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00011 to +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.296.1171800421
channel ch00: restoring datafile 00012 to +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.289.1171800421
channel ch00: restoring datafile 00013 to +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.259.1171800421
channel ch00: restoring datafile 00014 to +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.338.1171800421
channel ch00: restoring datafile 00015 to +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.345.1171800421
channel ch00: restoring datafile 00016 to +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.347.1171800421
channel ch00: reading from backup piece 5l2tghk6_181_1_1
channel ch00: piece handle=5l2tghk6_181_1_1 tag=FULLDBBACKUP0617
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:25
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00005 to +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.280.1171797313
channel ch00: restoring datafile 00006 to +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.285.1171797313
channel ch00: restoring datafile 00008 to +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.293.1171797313
channel ch00: reading from backup piece 5m2tghkv_182_1_1
channel ch00: piece handle=5m2tghkv_182_1_1 tag=FULLDBBACKUP0617
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:35
Finished restore at 07-JUL-24

Starting recover at 07-JUL-24

starting media recovery

channel ch00: starting archived log restore to default destination
channel ch00: restoring archived log
archived log thread=3 sequence=4
channel ch00: reading from backup piece 5n2tghlo_183_1_1
channel ch00: piece handle=5n2tghlo_183_1_1 tag=FULLDBBACKUP0617
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_07_07/thread_3_seq_4.349.1173663315 thread=3 sequence=4
channel default: deleting archived log(s)
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_07_07/thread_3_seq_4.349.1173663315 RECID=335 STAMP=1173663315
unable to find archived log
archived log thread=3 sequence=5
released channel: ch00
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 07/07/2024 01:35:16
RMAN-06054: media recovery requesting unknown archived log for thread 3 with sequence 5 and starting SCN of 7606727

----未resetlogs之前的incarnation

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       CDB      2265125454       PARENT  1          17-APR-19
2       2       CDB      2265125454       PARENT  1920977    26-SEP-23
6       6       CDB      2265125454       ORPHAN  7326532    16-JUN-24
5       5       CDB      2265125454       PARENT  7326604    16-JUN-24
14      14      CDB      2265125454       PARENT  7326605    16-JUN-24
11      11      CDB      2265125454       ORPHAN  7326605    16-JUN-24
10      10      CDB      2265125454       ORPHAN  7326605    16-JUN-24
4       4       CDB      2265125454       ORPHAN  7326802    16-JUN-24
3       3       CDB      2265125454       ORPHAN  7329707    16-JUN-24
7       7       CDB      2265125454       ORPHAN  7329707    16-JUN-24
13      13      CDB      2265125454       ORPHAN  7329708    16-JUN-24
12      12      CDB      2265125454       ORPHAN  7329708    16-JUN-24
15      15      CDB      2265125454       PARENT  7496028    16-JUN-24
16      16      CDB      2265125454       ORPHAN  7500404    16-JUN-24
17      17      CDB      2265125454       CURRENT 7500404    16-JUN-24
8       8       CDB      2265125454       ORPHAN  7512942    16-JUN-24
9       9       CDB      2265125454       ORPHAN  7620289    16-JUN-24

 

  15->17

RMAN> alter database open resetlogs;

Statement processed

 

RMAN> 

RMAN> 

RMAN> 

RMAN>  list incarnation;


List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1       1       CDB      2265125454       PARENT  1          17-APR-19
2       2       CDB      2265125454       PARENT  1920977    26-SEP-23
6       6       CDB      2265125454       ORPHAN  7326532    16-JUN-24
5       5       CDB      2265125454       PARENT  7326604    16-JUN-24
14      14      CDB      2265125454       PARENT  7326605    16-JUN-24
11      11      CDB      2265125454       ORPHAN  7326605    16-JUN-24
10      10      CDB      2265125454       ORPHAN  7326605    16-JUN-24
4       4       CDB      2265125454       ORPHAN  7326802    16-JUN-24
3       3       CDB      2265125454       ORPHAN  7329707    16-JUN-24
7       7       CDB      2265125454       ORPHAN  7329707    16-JUN-24
13      13      CDB      2265125454       ORPHAN  7329708    16-JUN-24
12      12      CDB      2265125454       ORPHAN  7329708    16-JUN-24
15      15      CDB      2265125454       PARENT  7496028    16-JUN-24
17      17      CDB      2265125454       PARENT  7500404    16-JUN-24
16      16      CDB      2265125454       ORPHAN  7500404    16-JUN-24
8       8       CDB      2265125454       ORPHAN  7512942    16-JUN-24
18      18      CDB      2265125454       CURRENT 7606728    07-JUL-24
9       9       CDB      2265125454       ORPHAN  7620289    16-JUN-24

15->17->18


Recovery Manager complete.
[oracle@rac3 ~]$ s

SQL*Plus: Release 19.0.0.0.0 - Production on Sun Jul 7 01:36:49 2024
Version 19.20.0.0.0

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


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.20.0.0.0

SQL> show pdbs;

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 PDB                            READ WRITE YES
SQL> 

 ----RMAN-03002 RMAN-06172

RMAN> restore spfile from autobackup;

RMAN-03002: failure of restore command at 08/16/2014 03:39:24
RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece
  •  

 rman默认查找7天内的备份,如果7天之内没有发生自动备份,那么rman也将无法找到自动备份。

遇到这种情况一般有两种解决方式:
① restore spfile from autobackup until time ‘SYSDATE-N’;
② restore spfile from autobackup maxdays N;

(3)第三种情况就是上篇试验中遇到的。由于autobackup的默认设置发生了变化,也就是说,原来我们已经设置了"configure controlfile autobackup on";但是再重新使用rman进行spfile的恢复时,这个设置已经变成了off了。这种情况在错误中不会提示,所以较难发现。出现这种情况是由于目前数据库只是通过rman的默认设置启动,而且处在nomount状态。解决的方法是找到自动备份的路径,直接将路径告诉rman。

RMAN> restore spfile from '/orabk/ctrl_c-2363318542-20210222-02';

Starting restore at 23-FEB-21
using channel ORA_DISK_1

channel ORA_DISK_1: restoring spfile from AUTOBACKUP /orabk/ctrl_c-2363318542-20210222-02
channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete
Finished restore at 23-FEB-21
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值