<经典> set newname 切换数据库文件位置 incarnation切换恢复

[oracle@rac1 ~]$ s

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Jun 15 22:31:40 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> exit

Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.20.0.0.0

[oracle@rac1 ~]$ rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Sat Jun 15 22:31:55 2024

Version 19.20.0.0.0

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

connected to target database: CDB (DBID=2265125454)

RMAN> report schema;

using target database control file instead of recovery catalog

Report of database schema for database with db_unique_name CDB

List of Permanent Datafiles

===========================

File Size(MB) Tablespace RB segs Datafile Name


1 1160 SYSTEM YES +DATA/CDB/DATAFILE/system.275.1148478571

3 890 SYSAUX NO +DATA/CDB/DATAFILE/sysaux.263.1148478647

4 615 UNDOTBS1 YES +DATA/CDB/DATAFILE/undotbs1.264.1148478683

5 510 PDB$SEED:SYSTEM NO +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/system.272.1148480251

6 480 PDB$SEED:SYSAUX NO +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/sysaux.271.1148480251

7 5 USERS NO +DATA/CDB/DATAFILE/users.269.1148478683

8 215 PDB$SEED:UNDOTBS1 NO +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/undotbs1.267.1148480251

9 250 UNDOTBS2 YES +DATA/CDB/DATAFILE/undotbs2.268.1148480549

10 25 UNDOTBS3 YES +DATA/CDB/DATAFILE/undotbs3.262.1148480551

11 510 PDB:SYSTEM NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.292.1148481713

12 490 PDB:SYSAUX NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.288.1148481713

13 215 PDB:UNDOTBS1 NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.293.1148481713

14 215 PDB:UNDO_3 NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.291.1148481745

15 215 PDB:UNDO_4 NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.285.1148481747

16 5 PDB:USERS NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.284.1148481749

List of Temporary Files

=======================

File Size(MB) Tablespace Maxsize(MB) Tempfile Name


1 272 TEMP 32767 +DATA/CDB/TEMPFILE/temp.273.1148478745

2 237 PDB$SEED:TEMP 32767 +DATA/CDB/0633F844101D69CBE0636401A8C09D55/TEMPFILE/temp.265.1148480293

3 144 PDB:TEMP 32767 +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/TEMPFILE/temp.286.1148481715

RMAN> backup database plus archivelog tag 'full db backup';

Starting backup at 15-JUN-24

current log archived

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=74 instance=cdb1 device type=DISK

channel ORA_DISK_1: starting archived log backup set

channel ORA_DISK_1: specifying archived log(s) in backup set

input archived log thread=1 sequence=99 RECID=175 STAMP=1156933601

input archived log thread=3 sequence=52 RECID=178 STAMP=1156933603

input archived log thread=2 sequence=76 RECID=176 STAMP=1156933602

input archived log thread=2 sequence=77 RECID=177 STAMP=1156933602

input archived log thread=3 sequence=53 RECID=179 STAMP=1156933603

input archived log thread=1 sequence=100 RECID=180 STAMP=1156933667

input archived log thread=1 sequence=101 RECID=181 STAMP=1156933752

input archived log thread=3 sequence=54 RECID=186 STAMP=1156936544

input archived log thread=1 sequence=102 RECID=182 STAMP=1156933752

input archived log thread=2 sequence=78 RECID=183 STAMP=1156936543

input archived log thread=1 sequence=103 RECID=184 STAMP=1156936544

input archived log thread=1 sequence=104 RECID=185 STAMP=1156936544

input archived log thread=3 sequence=55 RECID=187 STAMP=1156936544

input archived log thread=2 sequence=79 RECID=189 STAMP=1156939799

input archived log thread=1 sequence=105 RECID=188 STAMP=1156938195

input archived log thread=3 sequence=56 RECID=190 STAMP=1156939799

input archived log thread=1 sequence=106 RECID=193 STAMP=1156940668

input archived log thread=3 sequence=57 RECID=191 STAMP=1156939799

input archived log thread=2 sequence=80 RECID=192 STAMP=1156939799

input archived log thread=2 sequence=81 RECID=195 STAMP=1156940714

input archived log thread=3 sequence=58 RECID=197 STAMP=1156942489

input archived log thread=1 sequence=107 RECID=194 STAMP=1156940669

input archived log thread=2 sequence=82 RECID=196 STAMP=1156940715

input archived log thread=3 sequence=59 RECID=200 STAMP=1156942701

input archived log thread=1 sequence=108 RECID=198 STAMP=1156942700

input archived log thread=2 sequence=83 RECID=201 STAMP=1156943080

input archived log thread=1 sequence=109 RECID=199 STAMP=1156942700

input archived log thread=3 sequence=60 RECID=202 STAMP=1156943081

input archived log thread=3 sequence=61 RECID=203 STAMP=1156943081

input archived log thread=2 sequence=84 RECID=206 STAMP=1156944646

input archived log thread=3 sequence=62 RECID=204 STAMP=1156944642

input archived log thread=1 sequence=110 RECID=208 STAMP=1156944772

input archived log thread=3 sequence=63 RECID=205 STAMP=1156944643

input archived log thread=2 sequence=85 RECID=207 STAMP=1156944646

input archived log thread=1 sequence=111 RECID=209 STAMP=1156944772

input archived log thread=3 sequence=64 RECID=212 STAMP=1156944777

input archived log thread=1 sequence=112 RECID=210 STAMP=1156944775

input archived log thread=1 sequence=113 RECID=211 STAMP=1156944775

input archived log thread=3 sequence=65 RECID=216 STAMP=1156945718

input archived log thread=2 sequence=86 RECID=214 STAMP=1156945716

input archived log thread=1 sequence=114 RECID=213 STAMP=1156945716

input archived log thread=1 sequence=115 RECID=215 STAMP=1156945717

input archived log thread=2 sequence=87 RECID=217 STAMP=1156945754

input archived log thread=3 sequence=66 RECID=219 STAMP=1171708227

input archived log thread=2 sequence=88 RECID=218 STAMP=1156945755

input archived log thread=3 sequence=67 RECID=220 STAMP=1171708227

input archived log thread=1 sequence=116 RECID=223 STAMP=1171708232

input archived log thread=3 sequence=68 RECID=221 STAMP=1171708230

input archived log thread=3 sequence=69 RECID=222 STAMP=1171708230

input archived log thread=1 sequence=117 RECID=224 STAMP=1171708337

channel ORA_DISK_1: starting piece 1 at 15-JUN-24

channel ORA_DISK_1: finished piece 1 at 15-JUN-24

piece handle=+DATA1/CDB/BACKUPSET/2024_06_15/annnf0_full db backup_0.319.1171708337 tag=FULL DB BACKUP comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 15-JUN-24

Starting backup at 15-JUN-24

using channel ORA_DISK_1

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00001 name=+DATA/CDB/DATAFILE/system.275.1148478571

input datafile file number=00003 name=+DATA/CDB/DATAFILE/sysaux.263.1148478647

input datafile file number=00004 name=+DATA/CDB/DATAFILE/undotbs1.264.1148478683

input datafile file number=00009 name=+DATA/CDB/DATAFILE/undotbs2.268.1148480549

input datafile file number=00010 name=+DATA/CDB/DATAFILE/undotbs3.262.1148480551

input datafile file number=00007 name=+DATA/CDB/DATAFILE/users.269.1148478683

channel ORA_DISK_1: starting piece 1 at 15-JUN-24

channel ORA_DISK_1: finished piece 1 at 15-JUN-24

piece handle=+DATA1/CDB/BACKUPSET/2024_06_15/nnndf0_tag20240615t223219_0.320.1171708339 tag=TAG20240615T223219 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00011 name=+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.292.1148481713

input datafile file number=00012 name=+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.288.1148481713

input datafile file number=00013 name=+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.293.1148481713

input datafile file number=00014 name=+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.291.1148481745

input datafile file number=00015 name=+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.285.1148481747

input datafile file number=00016 name=+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.284.1148481749

channel ORA_DISK_1: starting piece 1 at 15-JUN-24

channel ORA_DISK_1: finished piece 1 at 15-JUN-24

piece handle=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_06_15/nnndf0_tag20240615t223219_0.321.1171708343 tag=TAG20240615T223219 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00005 name=+DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/system.272.1148480251

input datafile file number=00006 name=+DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/sysaux.271.1148480251

input datafile file number=00008 name=+DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/undotbs1.267.1148480251

channel ORA_DISK_1: starting piece 1 at 15-JUN-24

channel ORA_DISK_1: finished piece 1 at 15-JUN-24

piece handle=+DATA1/CDB/0633F844101D69CBE0636401A8C09D55/BACKUPSET/2024_06_15/nnndf0_tag20240615t223219_0.322.1171708345 tag=TAG20240615T223219 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03

Finished backup at 15-JUN-24

Starting backup at 15-JUN-24

current log archived

using channel ORA_DISK_1

channel ORA_DISK_1: starting archived log backup set

channel ORA_DISK_1: specifying archived log(s) in backup set

input archived log thread=1 sequence=118 RECID=225 STAMP=1171751548

channel ORA_DISK_1: starting piece 1 at 15-JUN-24

channel ORA_DISK_1: finished piece 1 at 15-JUN-24

piece handle=+DATA1/CDB/BACKUPSET/2024_06_15/annnf0_full db backup_0.324.1171708349 tag=FULL DB BACKUP comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 15-JUN-24

Starting Control File and SPFILE Autobackup at 15-JUN-24

piece handle=+DATA1/CDB/AUTOBACKUP/2024_06_15/s_1171751549.325.1171708349 comment=NONE

Finished Control File and SPFILE Autobackup at 15-JUN-24

RMAN> set newname for database to '+data1';

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03031: this option of set command needs to be used inside a run block

RMAN> RUN {

2> set newname for database to '+data1';

3> restore database ;

4> }

executing command: SET NEWNAME

Starting restore at 15-JUN-24

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 +data1

channel ORA_DISK_1: restoring datafile 00003 to +data1

channel ORA_DISK_1: restoring datafile 00004 to +data1

channel ORA_DISK_1: restoring datafile 00007 to +data1

channel ORA_DISK_1: restoring datafile 00009 to +data1

channel ORA_DISK_1: restoring datafile 00010 to +data1

channel ORA_DISK_1: reading from backup piece +DATA1/CDB/BACKUPSET/2024_06_15/nnndf0_tag20240615t223219_0.320.1171708339
channel ORA_DISK_1: piece handle=+DATA1/CDB/BACKUPSET/2024_06_15/nnndf0_tag20240615t223219_0.320.1171708339 tag=TAG20240615T223219

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:07

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 00011 to +data1

channel ORA_DISK_1: restoring datafile 00012 to +data1

channel ORA_DISK_1: restoring datafile 00013 to +data1

channel ORA_DISK_1: restoring datafile 00014 to +data1

channel ORA_DISK_1: restoring datafile 00015 to +data1

channel ORA_DISK_1: restoring datafile 00016 to +data1

channel ORA_DISK_1: reading from backup piece +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_06_15/nnndf0_tag20240615t223219_0.321.1171708343

channel ORA_DISK_1: piece handle=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_06_15/nnndf0_tag20240615t223219_0.321.1171708343 tag=TAG20240615T223219

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:04

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 00005 to +data1

channel ORA_DISK_1: restoring datafile 00006 to +data1

channel ORA_DISK_1: restoring datafile 00008 to +data1

channel ORA_DISK_1: reading from backup piece +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/BACKUPSET/2024_06_15/nnndf0_tag20240615t223219_0.322.1171708345

channel ORA_DISK_1: piece handle=+DATA1/CDB/0633F844101D69CBE0636401A8C09D55/BACKUPSET/2024_06_15/nnndf0_tag20240615t223219_0.322.1171708345 tag=TAG20240615T223219

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:07

Finished restore at 15-JUN-24

RMAN> report schema;---还没有变

Report of database schema for database with db_unique_name CDB

List of Permanent Datafiles

===========================

File Size(MB) Tablespace RB segs Datafile Name


1 1160 SYSTEM YES +DATA/CDB/DATAFILE/system.275.1148478571

3 890 SYSAUX NO +DATA/CDB/DATAFILE/sysaux.263.1148478647

4 615 UNDOTBS1 YES +DATA/CDB/DATAFILE/undotbs1.264.1148478683

5 510 PDB$SEED:SYSTEM NO +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/system.272.1148480251

6 480 PDB$SEED:SYSAUX NO +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/sysaux.271.1148480251

7 5 USERS NO +DATA/CDB/DATAFILE/users.269.1148478683

8 215 PDB$SEED:UNDOTBS1 NO +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/undotbs1.267.1148480251

9 250 UNDOTBS2 YES +DATA/CDB/DATAFILE/undotbs2.268.1148480549

10 25 UNDOTBS3 YES +DATA/CDB/DATAFILE/undotbs3.262.1148480551

11 510 PDB:SYSTEM NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.292.1148481713

12 490 PDB:SYSAUX NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.288.1148481713

13 215 PDB:UNDOTBS1 NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.293.1148481713

14 215 PDB:UNDO_3 NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.291.1148481745

15 215 PDB:UNDO_4 NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.285.1148481747

16 5 PDB:USERS NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.284.1148481749

List of Temporary Files

=======================

File Size(MB) Tablespace Maxsize(MB) Tempfile Name


1 272 TEMP 32767 +DATA/CDB/TEMPFILE/temp.273.1148478745

2 237 PDB$SEED:TEMP 32767 +DATA/CDB/0633F844101D69CBE0636401A8C09D55/TEMPFILE/temp.265.1148480293

3 144 PDB:TEMP 32767 +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/TEMPFILE/temp.286.1148481715

RMAN> switch database to copy;

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of switch to copy command at 06/15/2024 22:35:19
RMAN-06572: database is open and datafile 1 is not offline

RMAN> startup mount force;

Oracle instance started

database mounted

Total System Global Area 2382361320 bytes

Fixed Size 9167592 bytes

Variable Size 805306368 bytes

Database Buffers 1560281088 bytes

Redo Buffers 7606272 bytes

RMAN> report schema;

Report of database schema for database with db_unique_name CDB

List of Permanent Datafiles

===========================

File Size(MB) Tablespace RB segs Datafile Name


1 1160 SYSTEM *** +DATA/CDB/DATAFILE/system.275.1148478571

3 890 SYSAUX *** +DATA/CDB/DATAFILE/sysaux.263.1148478647

4 615 UNDOTBS1 *** +DATA/CDB/DATAFILE/undotbs1.264.1148478683

5 510 PDB$SEED:SYSTEM *** +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/system.272.1148480251

6 480 PDB$SEED:SYSAUX *** +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/sysaux.271.1148480251

7 5 USERS *** +DATA/CDB/DATAFILE/users.269.1148478683

8 215 PDB$SEED:UNDOTBS1 *** +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/undotbs1.267.1148480251

9 250 UNDOTBS2 *** +DATA/CDB/DATAFILE/undotbs2.268.1148480549

10 25 UNDOTBS3 *** +DATA/CDB/DATAFILE/undotbs3.262.1148480551

11 510 PDB:SYSTEM *** +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.292.1148481713

12 490 PDB:SYSAUX *** +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.288.1148481713

13 215 PDB:UNDOTBS1 *** +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.293.1148481713

14 215 PDB:UNDO_3 *** +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.291.1148481745

15 215 PDB:UNDO_4 *** +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.285.1148481747

16 5 PDB:USERS *** +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.284.1148481749

List of Temporary Files

=======================

File Size(MB) Tablespace Maxsize(MB) Tempfile Name


1 272 TEMP 32767 +DATA/CDB/TEMPFILE/temp.273.1148478745

2 237 PDB$SEED:TEMP 32767 +DATA/CDB/0633F844101D69CBE0636401A8C09D55/TEMPFILE/temp.265.1148480293

3 144 PDB:TEMP 32767 +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/TEMPFILE/temp.286.1148481715

RMAN> switch database to copy;

datafile 1 switched to datafile copy "+DATA1/CDB/DATAFILE/system.326.1171708477"

datafile 3 switched to datafile copy "+DATA1/CDB/DATAFILE/sysaux.327.1171708477"

datafile 4 switched to datafile copy "+DATA1/CDB/DATAFILE/undotbs1.328.1171708477"

datafile 5 switched to datafile copy "+DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.338.1171708487"

datafile 6 switched to datafile copy "+DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.339.1171708487"

datafile 7 switched to datafile copy "+DATA1/CDB/DATAFILE/users.331.1171708477"

datafile 8 switched to datafile copy "+DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.340.1171708487"

datafile 9 switched to datafile copy "+DATA1/CDB/DATAFILE/undotbs2.329.1171708477"

datafile 10 switched to datafile copy "+DATA1/CDB/DATAFILE/undotbs3.330.1171708477"

datafile 11 switched to datafile copy "+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.332.1171708485"

datafile 12 switched to datafile copy "+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.333.1171708485"

datafile 13 switched to datafile copy "+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.334.1171708485"

datafile 14 switched to datafile copy "+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.335.1171708485"

datafile 15 switched to datafile copy "+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.336.1171708485"

datafile 16 switched to datafile copy "+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.337.1171708485"

RMAN> report schema;

Report of database schema for database with db_unique_name CDB

List of Permanent Datafiles

===========================

File Size(MB) Tablespace RB segs Datafile Name


1 1160 SYSTEM *** +DATA1/CDB/DATAFILE/system.326.1171708477

3 890 SYSAUX *** +DATA1/CDB/DATAFILE/sysaux.327.1171708477

4 615 UNDOTBS1 *** +DATA1/CDB/DATAFILE/undotbs1.328.1171708477

5 510 PDB$SEED:SYSTEM *** +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.338.1171708487

6 480 PDB$SEED:SYSAUX *** +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.339.1171708487

7 5 USERS *** +DATA1/CDB/DATAFILE/users.331.1171708477

8 215 PDB$SEED:UNDOTBS1 *** +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.340.1171708487

9 250 UNDOTBS2 *** +DATA1/CDB/DATAFILE/undotbs2.329.1171708477

10 25 UNDOTBS3 *** +DATA1/CDB/DATAFILE/undotbs3.330.1171708477

11 510 PDB:SYSTEM *** +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.332.1171708485

12 490 PDB:SYSAUX *** +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.333.1171708485

13 215 PDB:UNDOTBS1 *** +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.334.1171708485

14 215 PDB:UNDO_3 *** +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.335.1171708485

15 215 PDB:UNDO_4 *** +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.336.1171708485

16 5 PDB:USERS *** +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.337.1171708485

List of Temporary Files

=======================

File Size(MB) Tablespace Maxsize(MB) Tempfile Name


1 272 TEMP 32767 +DATA/CDB/TEMPFILE/temp.273.1148478745

2 237 PDB$SEED:TEMP 32767 +DATA/CDB/0633F844101D69CBE0636401A8C09D55/TEMPFILE/temp.265.1148480293

3 144 PDB:TEMP 32767 +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/TEMPFILE/temp.286.1148481715

RMAN> alter database open;

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of sql statement command at 06/15/2024 22:36:30

ORA-01113: file 1 needs media recovery

ORA-01110: data file 1: '+DATA1/CDB/DATAFILE/system.326.1171708477'

RMAN> recover database;

Starting recover at 15-JUN-24

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=794 instance=cdb1 device type=DISK

starting media recovery

media recovery complete, elapsed time: 00:00:01

Finished recover at 15-JUN-24

RMAN> alter database open;

Statement processed

RMAN> report schema;

Report of database schema for database with db_unique_name CDB

List of Permanent Datafiles

===========================

File Size(MB) Tablespace RB segs Datafile Name


1 1160 SYSTEM YES +DATA1/CDB/DATAFILE/system.326.1171708477

3 890 SYSAUX NO +DATA1/CDB/DATAFILE/sysaux.327.1171708477

4 615 UNDOTBS1 YES +DATA1/CDB/DATAFILE/undotbs1.328.1171708477

5 510 PDB$SEED:SYSTEM NO +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.338.1171708487

6 480 PDB$SEED:SYSAUX NO +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.339.1171708487

7 5 USERS NO +DATA1/CDB/DATAFILE/users.331.1171708477

8 215 PDB$SEED:UNDOTBS1 NO +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.340.1171708487

9 250 UNDOTBS2 YES +DATA1/CDB/DATAFILE/undotbs2.329.1171708477

10 25 UNDOTBS3 YES +DATA1/CDB/DATAFILE/undotbs3.330.1171708477

11 510 PDB:SYSTEM NO +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.332.1171708485

12 490 PDB:SYSAUX NO +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.333.1171708485

13 215 PDB:UNDOTBS1 NO +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.334.1171708485

14 215 PDB:UNDO_3 NO +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.335.1171708485

15 215 PDB:UNDO_4 NO +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.336.1171708485

16 5 PDB:USERS NO +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.337.1171708485

List of Temporary Files

=======================

File Size(MB) Tablespace Maxsize(MB) Tempfile Name


1 272 TEMP 32767 +DATA/CDB/TEMPFILE/temp.273.1148478745

2 237 PDB$SEED:TEMP 32767 +DATA/CDB/0633F844101D69CBE0636401A8C09D55/TEMPFILE/temp.265.1148480293

3 144 PDB:TEMP 32767 +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/TEMPFILE/temp.286.1148481715

--------------------清理旧的文件

RMAN> delete datafilecopy all;

released channel: ORA_DISK_1

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=794 instance=cdb1 device type=DISK

List of Datafile Copies

=======================

Key File S Completion Time Ckp SCN Ckp Time Sparse


19 1 A 15-JUN-24 7325671 15-JUN-24 NO

Name: +DATA/CDB/DATAFILE/system.275.1148478571

20 3 A 15-JUN-24 7325671 15-JUN-24 NO

Name: +DATA/CDB/DATAFILE/sysaux.263.1148478647

21 4 A 15-JUN-24 7325671 15-JUN-24 NO

Name: +DATA/CDB/DATAFILE/undotbs1.264.1148478683

22 5 A 15-JUN-24 5317292 27-SEP-23 NO

Name: +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/system.272.1148480251

23 6 A 15-JUN-24 5317292 27-SEP-23 NO

Name: +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/sysaux.271.1148480251

24 7 A 15-JUN-24 7325671 15-JUN-24 NO

Name: +DATA/CDB/DATAFILE/users.269.1148478683

25 8 A 15-JUN-24 5317292 27-SEP-23 NO

Name: +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/undotbs1.267.1148480251

26 9 A 15-JUN-24 7325671 15-JUN-24 NO

Name: +DATA/CDB/DATAFILE/undotbs2.268.1148480549

27 10 A 15-JUN-24 7325671 15-JUN-24 NO

Name: +DATA/CDB/DATAFILE/undotbs3.262.1148480551

28 11 A 15-JUN-24 7325710 15-JUN-24 NO

Name: +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.292.1148481713

29 12 A 15-JUN-24 7325710 15-JUN-24 NO

Name: +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.288.1148481713

30 13 A 15-JUN-24 7325710 15-JUN-24 NO

Name: +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.293.1148481713

31 14 A 15-JUN-24 7325710 15-JUN-24 NO

Name: +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.291.1148481745

32 15 A 15-JUN-24 7325710 15-JUN-24 NO

Name: +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.285.1148481747

33 16 A 15-JUN-24 7325710 15-JUN-24 NO

Name: +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.284.1148481749

Do you really want to delete the above objects (enter YES or NO)? YES

deleted datafile copy

datafile copy file name=+DATA/CDB/DATAFILE/system.275.1148478571 RECID=19 STAMP=1171751766

deleted datafile copy

datafile copy file name=+DATA/CDB/DATAFILE/sysaux.263.1148478647 RECID=20 STAMP=1171751766

deleted datafile copy

datafile copy file name=+DATA/CDB/DATAFILE/undotbs1.264.1148478683 RECID=21 STAMP=1171751766

deleted datafile copy

datafile copy file name=+DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/system.272.1148480251 RECID=22 STAMP=1171751766

deleted datafile copy

datafile copy file name=+DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/sysaux.271.1148480251 RECID=23 STAMP=1171751766

deleted datafile copy

datafile copy file name=+DATA/CDB/DATAFILE/users.269.1148478683 RECID=24 STAMP=1171751766

deleted datafile copy

datafile copy file name=+DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/undotbs1.267.1148480251 RECID=25 STAMP=1171751766

deleted datafile copy

datafile copy file name=+DATA/CDB/DATAFILE/undotbs2.268.1148480549 RECID=26 STAMP=1171751766

deleted datafile copy

datafile copy file name=+DATA/CDB/DATAFILE/undotbs3.262.1148480551 RECID=27 STAMP=1171751766

deleted datafile copy

datafile copy file name=+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.292.1148481713 RECID=28 STAMP=1171751766

deleted datafile copy

datafile copy file name=+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.288.1148481713 RECID=29 STAMP=1171751766

deleted datafile copy

datafile copy file name=+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.293.1148481713 RECID=30 STAMP=1171751766

deleted datafile copy

datafile copy file name=+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.291.1148481745 RECID=31 STAMP=1171751766

deleted datafile copy

datafile copy file name=+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.285.1148481747 RECID=32 STAMP=1171751766

deleted datafile copy

datafile copy file name=+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.284.1148481749 RECID=33 STAMP=1171751766

Deleted 15 objects

RMAN> report schmea;

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-00558: error encountered while parsing input commands

RMAN-01009: syntax error: found "identifier": expecting one of: "device, need, obsolete, schema, tag, unrecoverable"

RMAN-01008: the bad identifier was: schmea

RMAN-01007: at line 1 column 8 file: standard input

RMAN> report schema;

Report of database schema for database with db_unique_name CDB

List of Permanent Datafiles

===========================

File Size(MB) Tablespace RB segs Datafile Name


1 1160 SYSTEM YES +DATA1/CDB/DATAFILE/system.326.1171708477

3 890 SYSAUX NO +DATA1/CDB/DATAFILE/sysaux.327.1171708477

4 615 UNDOTBS1 YES +DATA1/CDB/DATAFILE/undotbs1.328.1171708477

5 510 PDB$SEED:SYSTEM NO +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.338.1171708487

6 480 PDB$SEED:SYSAUX NO +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.339.1171708487

7 5 USERS NO +DATA1/CDB/DATAFILE/users.331.1171708477

8 215 PDB$SEED:UNDOTBS1 NO +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.340.1171708487

9 250 UNDOTBS2 YES +DATA1/CDB/DATAFILE/undotbs2.329.1171708477

10 25 UNDOTBS3 YES +DATA1/CDB/DATAFILE/undotbs3.330.1171708477

11 510 PDB:SYSTEM NO +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.332.1171708485

12 490 PDB:SYSAUX NO +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.333.1171708485

13 215 PDB:UNDOTBS1 NO +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.334.1171708485

14 215 PDB:UNDO_3 NO +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.335.1171708485

15 215 PDB:UNDO_4 NO +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.336.1171708485

16 5 PDB:USERS NO +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.337.1171708485

List of Temporary Files

=======================

File Size(MB) Tablespace Maxsize(MB) Tempfile Name


1 272 TEMP 32767 +DATA/CDB/TEMPFILE/temp.273.1148478745

2 237 PDB$SEED:TEMP 32767 +DATA/CDB/0633F844101D69CBE0636401A8C09D55/TEMPFILE/temp.265.1148480293

3 144 PDB:TEMP 32767 +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/TEMPFILE/temp.286.1148481715

RMAN>

--------------------用刚刚的backup restore 呢?

RMAN> startup mount force;

Oracle instance started

database mounted

Total System Global Area 2382361320 bytes

Fixed Size 9167592 bytes

Variable Size 805306368 bytes

Database Buffers 1560281088 bytes

Redo Buffers 7606272 bytes

RMAN> restore database;

Starting restore at 15-JUN-24

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=34 instance=cdb1 device type=DISK

skipping datafile 5; already restored to file +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.338.1171708487

skipping datafile 6; already restored to file +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.339.1171708487

skipping datafile 8; already restored to file +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.340.1171708487

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 +DATA1/CDB/DATAFILE/system.326.1171708477

channel ORA_DISK_1: restoring datafile 00003 to +DATA1/CDB/DATAFILE/sysaux.327.1171708477

channel ORA_DISK_1: restoring datafile 00004 to +DATA1/CDB/DATAFILE/undotbs1.328.1171708477

channel ORA_DISK_1: restoring datafile 00007 to +DATA1/CDB/DATAFILE/users.331.1171708477

channel ORA_DISK_1: restoring datafile 00009 to +DATA1/CDB/DATAFILE/undotbs2.329.1171708477

channel ORA_DISK_1: restoring datafile 00010 to +DATA1/CDB/DATAFILE/undotbs3.330.1171708477

channel ORA_DISK_1: reading from backup piece +DATA1/CDB/BACKUPSET/2024_06_15/nnndf0_tag20240615t223219_0.320.1171708339

channel ORA_DISK_1: piece handle=+DATA1/CDB/BACKUPSET/2024_06_15/nnndf0_tag20240615t223219_0.320.1171708339 tag=TAG20240615T223219

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:07

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 00011 to +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.332.1171708485

channel ORA_DISK_1: restoring datafile 00012 to +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.333.1171708485

channel ORA_DISK_1: restoring datafile 00013 to +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.334.1171708485

channel ORA_DISK_1: restoring datafile 00014 to +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.335.1171708485

channel ORA_DISK_1: restoring datafile 00015 to +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.336.1171708485

channel ORA_DISK_1: restoring datafile 00016 to +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.337.1171708485

channel ORA_DISK_1: reading from backup piece +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_06_15/nnndf0_tag20240615t223219_0.321.1171708343

channel ORA_DISK_1: piece handle=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_06_15/nnndf0_tag20240615t223219_0.321.1171708343 tag=TAG20240615T223219

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:03

Finished restore at 15-JUN-24

RMAN> recover database;

Starting recover at 15-JUN-24

using channel ORA_DISK_1

starting media recovery

archived log for thread 1 with sequence 118 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_118.323.1171708349

archived log for thread 1 with sequence 119 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_119.341.1171708599

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_118.323.1171708349 thread=1 sequence=118

media recovery complete, elapsed time: 00:00:01

Finished recover at 15-JUN-24

RMAN> alter database open;

Statement processed

RMAN> report schema;

Report of database schema for database with db_unique_name CDB

List of Permanent Datafiles

===========================

File Size(MB) Tablespace RB segs Datafile Name


1 1160 SYSTEM YES +DATA1/CDB/DATAFILE/system.326.1171708477

3 890 SYSAUX NO +DATA1/CDB/DATAFILE/sysaux.327.1171708477

4 615 UNDOTBS1 YES +DATA1/CDB/DATAFILE/undotbs1.328.1171708477

5 510 PDB$SEED:SYSTEM NO +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.338.1171708487

6 480 PDB$SEED:SYSAUX NO +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.339.1171708487

7 5 USERS NO +DATA1/CDB/DATAFILE/users.331.1171708477

8 215 PDB$SEED:UNDOTBS1 NO +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.340.1171708487

9 250 UNDOTBS2 YES +DATA1/CDB/DATAFILE/undotbs2.329.1171708477

10 25 UNDOTBS3 YES +DATA1/CDB/DATAFILE/undotbs3.330.1171708477

11 510 PDB:SYSTEM NO +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.332.1171708485

12 490 PDB:SYSAUX NO +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.333.1171708485

13 215 PDB:UNDOTBS1 NO +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.334.1171708485

14 215 PDB:UNDO_3 NO +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.335.1171708485

15 215 PDB:UNDO_4 NO +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.336.1171708485

16 5 PDB:USERS NO +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.337.1171708485

List of Temporary Files

=======================

File Size(MB) Tablespace Maxsize(MB) Tempfile Name


1 272 TEMP 32767 +DATA/CDB/TEMPFILE/temp.273.1148478745

2 237 PDB$SEED:TEMP 32767 +DATA/CDB/0633F844101D69CBE0636401A8C09D55/TEMPFILE/temp.265.1148480293

3 144 PDB:TEMP 32767 +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/TEMPFILE/temp.286.1148481715

RMAN>

----------------不成功,要restore control file 试试

RMAN> restore controlfile from autobackup;

Starting restore at 15-JUN-24

using channel ORA_DISK_1

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of restore command at 06/15/2024 22:44:23

RMAN-06496: must use the TO clause when the database is mounted or open

RMAN> startup nomount;

database is already started

RMAN> startup nomount force;

RMAN> restore controlfile from autobackup;

Starting restore at 15-JUN-24

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=32 instance=cdb1 device type=DISK

recovery area destination: +DATA1

database name (or database unique name) used for search: CDB

channel ORA_DISK_1: AUTOBACKUP +DATA1/CDB/AUTOBACKUP/2024_06_15/s_1171751549.325.1171708349 found in the recovery area

channel ORA_DISK_1: looking for AUTOBACKUP on day: 20240615

channel ORA_DISK_1: restoring control file from AUTOBACKUP +DATA1/CDB/AUTOBACKUP/2024_06_15/s_1171751549.325.1171708349

channel ORA_DISK_1: 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 15-JUN-24

RMAN> restore database;

Starting restore at 15-JUN-24

using channel ORA_DISK_1

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of restore command at 06/15/2024 22:45:19

ORA-01507: database not mounted

RMAN> alter database mount;

released channel: ORA_DISK_1

Statement processed

RMAN> restore database;

Starting restore at 15-JUN-24

Starting implicit crosscheck backup at 15-JUN-24

allocated channel: ORA_DISK_1

Crosschecked 9 objects

Finished implicit crosscheck backup at 15-JUN-24

Starting implicit crosscheck copy at 15-JUN-24

using channel ORA_DISK_1

Finished implicit crosscheck copy at 15-JUN-24

searching for all files in the recovery area

cataloging files...

cataloging done

List of Cataloged Files

=======================

File Name: +DATA1/CDB/DATAFILE/system.326.1171708477

File Name: +DATA1/CDB/DATAFILE/sysaux.327.1171708477

File Name: +DATA1/CDB/DATAFILE/undotbs1.328.1171708477

File Name: +DATA1/CDB/DATAFILE/undotbs2.329.1171708477

File Name: +DATA1/CDB/DATAFILE/undotbs3.330.1171708477

File Name: +DATA1/CDB/DATAFILE/users.331.1171708477

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_119.341.1171708599

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_120.342.1171708963

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_15/s_1171751549.325.1171708349

File Name: +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.332.1171708485

File Name: +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.333.1171708485

File Name: +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.334.1171708485

File Name: +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.335.1171708485

File Name: +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.336.1171708485

File Name: +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.337.1171708485

File Name: +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.338.1171708487

File Name: +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.339.1171708487

File Name: +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.340.1171708487

using channel ORA_DISK_1

channel ORA_DISK_1: restoring datafile 00001

input datafile copy RECID=4 STAMP=1171752333 file name=+DATA1/CDB/DATAFILE/system.326.1171708477
destination for restore of datafile 00001: +DATA/CDB/DATAFILE/system.275.1148478571

channel ORA_DISK_1: copied datafile copy of datafile 00001, elapsed time: 00:00:03

output file name=+DATA/CDB/DATAFILE/system.284.1171709135 RECID=0 STAMP=0

channel ORA_DISK_1: restoring datafile 00003

input datafile copy RECID=5 STAMP=1171752333 file name=+DATA1/CDB/DATAFILE/sysaux.327.1171708477

destination for restore of datafile 00003: +DATA/CDB/DATAFILE/sysaux.263.1148478647

channel ORA_DISK_1: copied datafile copy of datafile 00003, elapsed time: 00:00:03

output file name=+DATA/CDB/DATAFILE/sysaux.285.1171709137 RECID=0 STAMP=0

channel ORA_DISK_1: restoring datafile 00004

input datafile copy RECID=6 STAMP=1171752333 file name=+DATA1/CDB/DATAFILE/undotbs1.328.1171708477

destination for restore of datafile 00004: +DATA/CDB/DATAFILE/undotbs1.264.1148478683

channel ORA_DISK_1: copied datafile copy of datafile 00004, elapsed time: 00:00:01

output file name=+DATA/CDB/DATAFILE/undotbs1.291.1171709141 RECID=0 STAMP=0

channel ORA_DISK_1: restoring datafile 00005

input datafile copy RECID=16 STAMP=1171752333 file name=+DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.338.1171708487

destination for restore of datafile 00005: +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/system.272.1148480251

channel ORA_DISK_1: copied datafile copy of datafile 00005, elapsed time: 00:00:01

output file name=+DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.293.1171709141 RECID=0 STAMP=0

channel ORA_DISK_1: restoring datafile 00006

input datafile copy RECID=17 STAMP=1171752333 file name=+DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.339.1171708487

destination for restore of datafile 00006: +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/sysaux.271.1148480251

channel ORA_DISK_1: copied datafile copy of datafile 00006, elapsed time: 00:00:01

output file name=+DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.288.1171709143 RECID=0 STAMP=0

channel ORA_DISK_1: restoring datafile 00007

input datafile copy RECID=9 STAMP=1171752333 file name=+DATA1/CDB/DATAFILE/users.331.1171708477

destination for restore of datafile 00007: +DATA/CDB/DATAFILE/users.269.1148478683

channel ORA_DISK_1: copied datafile copy of datafile 00007, elapsed time: 00:00:01

output file name=+DATA/CDB/DATAFILE/users.292.1171709143 RECID=0 STAMP=0

channel ORA_DISK_1: restoring datafile 00008

input datafile copy RECID=18 STAMP=1171752333 file name=+DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.340.1171708487

destination for restore of datafile 00008: +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/undotbs1.267.1148480251

channel ORA_DISK_1: copied datafile copy of datafile 00008, elapsed time: 00:00:01

output file name=+DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.262.1171709145 RECID=0 STAMP=0

channel ORA_DISK_1: restoring datafile 00009

input datafile copy RECID=7 STAMP=1171752333 file name=+DATA1/CDB/DATAFILE/undotbs2.329.1171708477

destination for restore of datafile 00009: +DATA/CDB/DATAFILE/undotbs2.268.1148480549

channel ORA_DISK_1: copied datafile copy of datafile 00009, elapsed time: 00:00:01

output file name=+DATA/CDB/DATAFILE/undotbs2.268.1171709145 RECID=0 STAMP=0

channel ORA_DISK_1: restoring datafile 00010

input datafile copy RECID=8 STAMP=1171752333 file name=+DATA1/CDB/DATAFILE/undotbs3.330.1171708477

destination for restore of datafile 00010: +DATA/CDB/DATAFILE/undotbs3.262.1148480551

channel ORA_DISK_1: copied datafile copy of datafile 00010, elapsed time: 00:00:01

output file name=+DATA/CDB/DATAFILE/undotbs3.267.1171709147 RECID=0 STAMP=0

channel ORA_DISK_1: restoring datafile 00011

input datafile copy RECID=10 STAMP=1171752333 file name=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.332.1171708485

destination for restore of datafile 00011: +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.292.1148481713

channel ORA_DISK_1: copied datafile copy of datafile 00011, elapsed time: 00:00:01

output file name=+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.269.1171709147 RECID=0 STAMP=0

channel ORA_DISK_1: restoring datafile 00012

input datafile copy RECID=11 STAMP=1171752333 file name=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.333.1171708485

destination for restore of datafile 00012: +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.288.1148481713

channel ORA_DISK_1: copied datafile copy of datafile 00012, elapsed time: 00:00:01

output file name=+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.271.1171709149 RECID=0 STAMP=0

channel ORA_DISK_1: restoring datafile 00013

input datafile copy RECID=12 STAMP=1171752333 file name=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.334.1171708485

destination for restore of datafile 00013: +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.293.1148481713

channel ORA_DISK_1: copied datafile copy of datafile 00013, elapsed time: 00:00:01

output file name=+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.272.1171709149 RECID=0 STAMP=0

channel ORA_DISK_1: restoring datafile 00014

input datafile copy RECID=13 STAMP=1171752333 file name=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.335.1171708485

destination for restore of datafile 00014: +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.291.1148481745

channel ORA_DISK_1: copied datafile copy of datafile 00014, elapsed time: 00:00:01

output file name=+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.264.1171709151 RECID=0 STAMP=0

channel ORA_DISK_1: restoring datafile 00015

input datafile copy RECID=14 STAMP=1171752333 file name=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.336.1171708485

destination for restore of datafile 00015: +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.285.1148481747

channel ORA_DISK_1: copied datafile copy of datafile 00015, elapsed time: 00:00:01

output file name=+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.263.1171709151 RECID=0 STAMP=0

channel ORA_DISK_1: restoring datafile 00016

input datafile copy RECID=15 STAMP=1171752333 file name=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.337.1171708485

destination for restore of datafile 00016: +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.284.1148481749

channel ORA_DISK_1: copied datafile copy of datafile 00016, elapsed time: 00:00:01

output file name=+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.275.1171709153 RECID=0 STAMP=0

Finished restore at 15-JUN-24

RMAN> report schema;

RMAN-06139: warning: control file is not current for REPORT SCHEMA

Report of database schema for database with db_unique_name CDB

List of Permanent Datafiles

===========================

File Size(MB) Tablespace RB segs Datafile Name


1 1160 SYSTEM *** +DATA/CDB/DATAFILE/system.284.1171709135

3 890 SYSAUX *** +DATA/CDB/DATAFILE/sysaux.285.1171709137

4 615 UNDOTBS1 *** +DATA/CDB/DATAFILE/undotbs1.291.1171709141

5 510 PDB$SEED:SYSTEM *** +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.293.1171709141

6 480 PDB$SEED:SYSAUX *** +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.288.1171709143

7 5 USERS *** +DATA/CDB/DATAFILE/users.292.1171709143

8 215 PDB$SEED:UNDOTBS1 *** +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.262.1171709145

9 250 UNDOTBS2 *** +DATA/CDB/DATAFILE/undotbs2.268.1171709145

10 25 UNDOTBS3 *** +DATA/CDB/DATAFILE/undotbs3.267.1171709147

11 510 PDB:SYSTEM *** +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.269.1171709147

12 490 PDB:SYSAUX *** +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.271.1171709149

13 215 PDB:UNDOTBS1 *** +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.272.1171709149

14 215 PDB:UNDO_3 *** +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.264.1171709151

15 215 PDB:UNDO_4 *** +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.263.1171709151

16 5 PDB:USERS *** +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.275.1171709153

List of Temporary Files

=======================

File Size(MB) Tablespace Maxsize(MB) Tempfile Name


1 272 TEMP 32767 +DATA/CDB/TEMPFILE/temp.273.1148478745

2 237 PDB$SEED:TEMP 32767 +DATA/CDB/0633F844101D69CBE0636401A8C09D55/TEMPFILE/temp.265.1148480293

3 144 PDB:TEMP 32767 +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/TEMPFILE/temp.286.1148481715

RMAN> alter database open resetlogs;

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of sql statement command at 06/15/2024 22:46:52

ORA-01152: file 1 was not restored from a sufficiently old backup

ORA-01110: data file 1: '+DATA/CDB/DATAFILE/system.284.1171709135'

RMAN> recover database ;

Starting recover at 15-JUN-24

using channel ORA_DISK_1

starting media recovery

archived log for thread 1 with sequence 119 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_119.341.1171708599

archived log for thread 1 with sequence 120 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_120.342.1171708963

archived log for thread 1 with sequence 121 is already on disk as file +DATA/CDB/ONLINELOG/group_1.266.1148478739

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_119.341.1171708599 thread=1 sequence=119

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_120.342.1171708963 thread=1 sequence=120

archived log file name=+DATA/CDB/ONLINELOG/group_1.266.1148478739 thread=1 sequence=121

media recovery complete, elapsed time: 00:00:01

Finished recover at 15-JUN-24

RMAN> report schema;

RMAN-06139: warning: control file is not current for REPORT SCHEMA

Report of database schema for database with db_unique_name CDB

List of Permanent Datafiles

===========================

File Size(MB) Tablespace RB segs Datafile Name


1 1160 SYSTEM *** +DATA/CDB/DATAFILE/system.284.1171709135

3 890 SYSAUX *** +DATA/CDB/DATAFILE/sysaux.285.1171709137

4 615 UNDOTBS1 *** +DATA/CDB/DATAFILE/undotbs1.291.1171709141

5 510 PDB$SEED:SYSTEM *** +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.293.1171709141

6 480 PDB$SEED:SYSAUX *** +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.288.1171709143

7 5 USERS *** +DATA/CDB/DATAFILE/users.292.1171709143

8 215 PDB$SEED:UNDOTBS1 *** +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.262.1171709145

9 250 UNDOTBS2 *** +DATA/CDB/DATAFILE/undotbs2.268.1171709145

10 25 UNDOTBS3 *** +DATA/CDB/DATAFILE/undotbs3.267.1171709147

11 510 PDB:SYSTEM *** +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.269.1171709147

12 490 PDB:SYSAUX *** +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.271.1171709149

13 215 PDB:UNDOTBS1 *** +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.272.1171709149

14 215 PDB:UNDO_3 *** +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.264.1171709151

15 215 PDB:UNDO_4 *** +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.263.1171709151

16 5 PDB:USERS *** +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.275.1171709153

List of Temporary Files

=======================

File Size(MB) Tablespace Maxsize(MB) Tempfile Name


1 272 TEMP 32767 +DATA/CDB/TEMPFILE/temp.273.1148478745

2 237 PDB$SEED:TEMP 32767 +DATA/CDB/0633F844101D69CBE0636401A8C09D55/TEMPFILE/temp.265.1148480293

3 144 PDB:TEMP 32767 +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/TEMPFILE/temp.286.1148481715

RMAN> alter database open resetlogs;

Statement processed

RMAN> report schema;

Report of database schema for database with db_unique_name CDB

List of Permanent Datafiles

===========================

File Size(MB) Tablespace RB segs Datafile Name


1 1160 SYSTEM YES +DATA/CDB/DATAFILE/system.284.1171709135

3 890 SYSAUX NO +DATA/CDB/DATAFILE/sysaux.285.1171709137

4 615 UNDOTBS1 YES +DATA/CDB/DATAFILE/undotbs1.291.1171709141

5 510 PDB$SEED:SYSTEM NO +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.293.1171709141

6 480 PDB$SEED:SYSAUX NO +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.288.1171709143

7 5 USERS NO +DATA/CDB/DATAFILE/users.292.1171709143

8 215 PDB$SEED:UNDOTBS1 NO +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.262.1171709145

9 250 UNDOTBS2 YES +DATA/CDB/DATAFILE/undotbs2.268.1171709145

10 25 UNDOTBS3 YES +DATA/CDB/DATAFILE/undotbs3.267.1171709147

11 510 PDB:SYSTEM NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.269.1171709147

12 490 PDB:SYSAUX NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.271.1171709149

13 215 PDB:UNDOTBS1 NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.272.1171709149

14 215 PDB:UNDO_3 NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.264.1171709151

15 215 PDB:UNDO_4 NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.263.1171709151

16 5 PDB:USERS NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.275.1171709153

List of Temporary Files

=======================

File Size(MB) Tablespace Maxsize(MB) Tempfile Name


1 272 TEMP 32767 +DATA/CDB/TEMPFILE/temp.273.1148478745

2 237 PDB$SEED:TEMP 32767 +DATA/CDB/0633F844101D69CBE0636401A8C09D55/TEMPFILE/temp.265.1148480293

3 144 PDB:TEMP 32767 +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/TEMPFILE/temp.286.1148481715

RMAN>

---------------------------恢复到原有位置了,但是是从datafile copy过来的,不是从backup 来的

RMAN> delete datafilecopy all;

released channel: ORA_DISK_1

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=32 instance=cdb1 device type=DISK

List of Datafile Copies

=======================

Key File S Completion Time Ckp SCN Ckp Time Sparse


4 1 A 15-JUN-24 7728846 15-JUN-24 NO

Name: +DATA1/CDB/DATAFILE/system.326.1171708477

5 3 A 15-JUN-24 7728846 15-JUN-24 NO

Name: +DATA1/CDB/DATAFILE/sysaux.327.1171708477

6 4 A 15-JUN-24 7728846 15-JUN-24 NO

Name: +DATA1/CDB/DATAFILE/undotbs1.328.1171708477

16 5 A 15-JUN-24 5317292 27-SEP-23 NO

Name: +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.338.1171708487

17 6 A 15-JUN-24 5317292 27-SEP-23 NO

Name: +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.339.1171708487

9 7 A 15-JUN-24 7728846 15-JUN-24 NO

Name: +DATA1/CDB/DATAFILE/users.331.1171708477

18 8 A 15-JUN-24 5317292 27-SEP-23 NO

Name: +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.340.1171708487

7 9 A 15-JUN-24 7728846 15-JUN-24 NO

Name: +DATA1/CDB/DATAFILE/undotbs2.329.1171708477

8 10 A 15-JUN-24 7728846 15-JUN-24 NO

Name: +DATA1/CDB/DATAFILE/undotbs3.330.1171708477

10 11 A 15-JUN-24 7728846 15-JUN-24 NO

Name: +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.332.1171708485

11 12 A 15-JUN-24 7728846 15-JUN-24 NO

Name: +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.333.1171708485

12 13 A 15-JUN-24 7728846 15-JUN-24 NO

Name: +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.334.1171708485

13 14 A 15-JUN-24 7728846 15-JUN-24 NO

Name: +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.335.1171708485

14 15 A 15-JUN-24 7728846 15-JUN-24 NO

Name: +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.336.1171708485

15 16 A 15-JUN-24 7728846 15-JUN-24 NO

Name: +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.337.1171708485

Do you really want to delete the above objects (enter YES or NO)? YES

deleted datafile copy

datafile copy file name=+DATA1/CDB/DATAFILE/system.326.1171708477 RECID=4 STAMP=1171752333

deleted datafile copy

datafile copy file name=+DATA1/CDB/DATAFILE/sysaux.327.1171708477 RECID=5 STAMP=1171752333

deleted datafile copy

datafile copy file name=+DATA1/CDB/DATAFILE/undotbs1.328.1171708477 RECID=6 STAMP=1171752333

deleted datafile copy

datafile copy file name=+DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.338.1171708487 RECID=16 STAMP=1171752333

deleted datafile copy

datafile copy file name=+DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.339.1171708487 RECID=17 STAMP=1171752333

deleted datafile copy

datafile copy file name=+DATA1/CDB/DATAFILE/users.331.1171708477 RECID=9 STAMP=1171752333

deleted datafile copy

datafile copy file name=+DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.340.1171708487 RECID=18 STAMP=1171752333

deleted datafile copy

datafile copy file name=+DATA1/CDB/DATAFILE/undotbs2.329.1171708477 RECID=7 STAMP=1171752333

deleted datafile copy

datafile copy file name=+DATA1/CDB/DATAFILE/undotbs3.330.1171708477 RECID=8 STAMP=1171752333

deleted datafile copy

datafile copy file name=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.332.1171708485 RECID=10 STAMP=1171752333

deleted datafile copy

datafile copy file name=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.333.1171708485 RECID=11 STAMP=1171752333

deleted datafile copy

datafile copy file name=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.334.1171708485 RECID=12 STAMP=1171752333

deleted datafile copy

datafile copy file name=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.335.1171708485 RECID=13 STAMP=1171752333

deleted datafile copy

datafile copy file name=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.336.1171708485 RECID=14 STAMP=1171752333

deleted datafile copy

datafile copy file name=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.337.1171708485 RECID=15 STAMP=1171752333

Deleted 15 objects

RMAN>

RMAN> restore controlfile from autobackup;

Starting restore at 15-JUN-24

using channel ORA_DISK_1

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of restore command at 06/15/2024 22:44:23

RMAN-06496: must use the TO clause when the database is mounted or open

RMAN> startup nomount;

database is already started

RMAN> startup nomount force;

Oracle instance started

Total System Global Area 2382361320 bytes

Fixed Size 9167592 bytes

Variable Size 805306368 bytes

Database Buffers 1560281088 bytes

Redo Buffers 7606272 bytes

RMAN> restore controlfile from autobackup;

Starting restore at 15-JUN-24

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=32 instance=cdb1 device type=DISK

recovery area destination: +DATA1

database name (or database unique name) used for search: CDB

channel ORA_DISK_1: AUTOBACKUP +DATA1/CDB/AUTOBACKUP/2024_06_15/s_1171751549.325.1171708349 found in the recovery area

channel ORA_DISK_1: looking for AUTOBACKUP on day: 20240615

channel ORA_DISK_1: restoring control file from AUTOBACKUP +DATA1/CDB/AUTOBACKUP/2024_06_15/s_1171751549.325.1171708349

channel ORA_DISK_1: 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 15-JUN-24

RMAN> restore database;

Starting restore at 15-JUN-24

using channel ORA_DISK_1

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of restore command at 06/15/2024 22:45:19

ORA-01507: database not mounted

RMAN> alter database mount;

released channel: ORA_DISK_1

Statement processed

RMAN> restore database;

Starting restore at 15-JUN-24

Starting implicit crosscheck backup at 15-JUN-24

allocated channel: ORA_DISK_1

Crosschecked 9 objects

Finished implicit crosscheck backup at 15-JUN-24

Starting implicit crosscheck copy at 15-JUN-24

using channel ORA_DISK_1

Finished implicit crosscheck copy at 15-JUN-24

searching for all files in the recovery area

cataloging files...

cataloging done

List of Cataloged Files

=======================

File Name: +DATA1/CDB/DATAFILE/system.326.1171708477

File Name: +DATA1/CDB/DATAFILE/sysaux.327.1171708477

File Name: +DATA1/CDB/DATAFILE/undotbs1.328.1171708477

File Name: +DATA1/CDB/DATAFILE/undotbs2.329.1171708477

File Name: +DATA1/CDB/DATAFILE/undotbs3.330.1171708477

File Name: +DATA1/CDB/DATAFILE/users.331.1171708477

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_119.341.1171708599

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_120.342.1171708963

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_15/s_1171751549.325.1171708349

File Name: +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.332.1171708485

File Name: +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.333.1171708485

File Name: +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.334.1171708485

File Name: +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.335.1171708485

File Name: +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.336.1171708485

File Name: +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.337.1171708485

File Name: +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.338.1171708487

File Name: +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.339.1171708487

File Name: +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.340.1171708487

using channel ORA_DISK_1

channel ORA_DISK_1: restoring datafile 00001

input datafile copy RECID=4 STAMP=1171752333 file name=+DATA1/CDB/DATAFILE/system.326.1171708477

destination for restore of datafile 00001: +DATA/CDB/DATAFILE/system.275.1148478571

channel ORA_DISK_1: copied datafile copy of datafile 00001, elapsed time: 00:00:03

output file name=+DATA/CDB/DATAFILE/system.284.1171709135 RECID=0 STAMP=0

channel ORA_DISK_1: restoring datafile 00003

input datafile copy RECID=5 STAMP=1171752333 file name=+DATA1/CDB/DATAFILE/sysaux.327.1171708477

destination for restore of datafile 00003: +DATA/CDB/DATAFILE/sysaux.263.1148478647

channel ORA_DISK_1: copied datafile copy of datafile 00003, elapsed time: 00:00:03

output file name=+DATA/CDB/DATAFILE/sysaux.285.1171709137 RECID=0 STAMP=0

channel ORA_DISK_1: restoring datafile 00004

input datafile copy RECID=6 STAMP=1171752333 file name=+DATA1/CDB/DATAFILE/undotbs1.328.1171708477

destination for restore of datafile 00004: +DATA/CDB/DATAFILE/undotbs1.264.1148478683

channel ORA_DISK_1: copied datafile copy of datafile 00004, elapsed time: 00:00:01

output file name=+DATA/CDB/DATAFILE/undotbs1.291.1171709141 RECID=0 STAMP=0

channel ORA_DISK_1: restoring datafile 00005

input datafile copy RECID=16 STAMP=1171752333 file name=+DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.338.1171708487

destination for restore of datafile 00005: +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/system.272.1148480251

channel ORA_DISK_1: copied datafile copy of datafile 00005, elapsed time: 00:00:01

output file name=+DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.293.1171709141 RECID=0 STAMP=0

channel ORA_DISK_1: restoring datafile 00006

input datafile copy RECID=17 STAMP=1171752333 file name=+DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.339.1171708487

destination for restore of datafile 00006: +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/sysaux.271.1148480251

channel ORA_DISK_1: copied datafile copy of datafile 00006, elapsed time: 00:00:01

output file name=+DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.288.1171709143 RECID=0 STAMP=0

channel ORA_DISK_1: restoring datafile 00007

input datafile copy RECID=9 STAMP=1171752333 file name=+DATA1/CDB/DATAFILE/users.331.1171708477

destination for restore of datafile 00007: +DATA/CDB/DATAFILE/users.269.1148478683

channel ORA_DISK_1: copied datafile copy of datafile 00007, elapsed time: 00:00:01

output file name=+DATA/CDB/DATAFILE/users.292.1171709143 RECID=0 STAMP=0

channel ORA_DISK_1: restoring datafile 00008

input datafile copy RECID=18 STAMP=1171752333 file name=+DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.340.1171708487

destination for restore of datafile 00008: +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/undotbs1.267.1148480251

channel ORA_DISK_1: copied datafile copy of datafile 00008, elapsed time: 00:00:01

output file name=+DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.262.1171709145 RECID=0 STAMP=0

channel ORA_DISK_1: restoring datafile 00009

input datafile copy RECID=7 STAMP=1171752333 file name=+DATA1/CDB/DATAFILE/undotbs2.329.1171708477

destination for restore of datafile 00009: +DATA/CDB/DATAFILE/undotbs2.268.1148480549

channel ORA_DISK_1: copied datafile copy of datafile 00009, elapsed time: 00:00:01

output file name=+DATA/CDB/DATAFILE/undotbs2.268.1171709145 RECID=0 STAMP=0

channel ORA_DISK_1: restoring datafile 00010

input datafile copy RECID=8 STAMP=1171752333 file name=+DATA1/CDB/DATAFILE/undotbs3.330.1171708477

destination for restore of datafile 00010: +DATA/CDB/DATAFILE/undotbs3.262.1148480551

channel ORA_DISK_1: copied datafile copy of datafile 00010, elapsed time: 00:00:01

output file name=+DATA/CDB/DATAFILE/undotbs3.267.1171709147 RECID=0 STAMP=0

channel ORA_DISK_1: restoring datafile 00011

input datafile copy RECID=10 STAMP=1171752333 file name=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.332.1171708485

destination for restore of datafile 00011: +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.292.1148481713

channel ORA_DISK_1: copied datafile copy of datafile 00011, elapsed time: 00:00:01

output file name=+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.269.1171709147 RECID=0 STAMP=0

channel ORA_DISK_1: restoring datafile 00012

input datafile copy RECID=11 STAMP=1171752333 file name=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.333.1171708485

destination for restore of datafile 00012: +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.288.1148481713

channel ORA_DISK_1: copied datafile copy of datafile 00012, elapsed time: 00:00:01

output file name=+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.271.1171709149 RECID=0 STAMP=0

channel ORA_DISK_1: restoring datafile 00013

input datafile copy RECID=12 STAMP=1171752333 file name=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.334.1171708485

destination for restore of datafile 00013: +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.293.1148481713

channel ORA_DISK_1: copied datafile copy of datafile 00013, elapsed time: 00:00:01

output file name=+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.272.1171709149 RECID=0 STAMP=0

channel ORA_DISK_1: restoring datafile 00014

input datafile copy RECID=13 STAMP=1171752333 file name=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.335.1171708485

destination for restore of datafile 00014: +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.291.1148481745

channel ORA_DISK_1: copied datafile copy of datafile 00014, elapsed time: 00:00:01

output file name=+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.264.1171709151 RECID=0 STAMP=0

channel ORA_DISK_1: restoring datafile 00015

input datafile copy RECID=14 STAMP=1171752333 file name=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.336.1171708485

destination for restore of datafile 00015: +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.285.1148481747

channel ORA_DISK_1: copied datafile copy of datafile 00015, elapsed time: 00:00:01

output file name=+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.263.1171709151 RECID=0 STAMP=0

channel ORA_DISK_1: restoring datafile 00016

input datafile copy RECID=15 STAMP=1171752333 file name=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.337.1171708485

destination for restore of datafile 00016: +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.284.1148481749

channel ORA_DISK_1: copied datafile copy of datafile 00016, elapsed time: 00:00:01

output file name=+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.275.1171709153 RECID=0 STAMP=0

Finished restore at 15-JUN-24

RMAN> report schmea;

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-00558: error encountered while parsing input commands

RMAN-01009: syntax error: found "identifier": expecting one of: "device, need, obsolete, schema, tag, unrecoverable"

RMAN-01008: the bad identifier was: schmea

RMAN-01007: at line 1 column 8 file: standard input

RMAN> report schema;

RMAN-06139: warning: control file is not current for REPORT SCHEMA

Report of database schema for database with db_unique_name CDB

List of Permanent Datafiles

===========================

File Size(MB) Tablespace RB segs Datafile Name


1 1160 SYSTEM *** +DATA/CDB/DATAFILE/system.284.1171709135

3 890 SYSAUX *** +DATA/CDB/DATAFILE/sysaux.285.1171709137

4 615 UNDOTBS1 *** +DATA/CDB/DATAFILE/undotbs1.291.1171709141

5 510 PDB$SEED:SYSTEM *** +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.293.1171709141

6 480 PDB$SEED:SYSAUX *** +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.288.1171709143

7 5 USERS *** +DATA/CDB/DATAFILE/users.292.1171709143

8 215 PDB$SEED:UNDOTBS1 *** +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.262.1171709145

9 250 UNDOTBS2 *** +DATA/CDB/DATAFILE/undotbs2.268.1171709145

10 25 UNDOTBS3 *** +DATA/CDB/DATAFILE/undotbs3.267.1171709147

11 510 PDB:SYSTEM *** +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.269.1171709147

12 490 PDB:SYSAUX *** +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.271.1171709149

13 215 PDB:UNDOTBS1 *** +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.272.1171709149

14 215 PDB:UNDO_3 *** +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.264.1171709151

15 215 PDB:UNDO_4 *** +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.263.1171709151

16 5 PDB:USERS *** +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.275.1171709153

List of Temporary Files

=======================

File Size(MB) Tablespace Maxsize(MB) Tempfile Name


1 272 TEMP 32767 +DATA/CDB/TEMPFILE/temp.273.1148478745

2 237 PDB$SEED:TEMP 32767 +DATA/CDB/0633F844101D69CBE0636401A8C09D55/TEMPFILE/temp.265.1148480293

3 144 PDB:TEMP 32767 +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/TEMPFILE/temp.286.1148481715

RMAN> alter database open;

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of sql statement command at 06/15/2024 22:46:42

ORA-01589: must use RESETLOGS or NORESETLOGS option for database open

RMAN> alter database open resetlogs;

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of sql statement command at 06/15/2024 22:46:52

ORA-01152: file 1 was not restored from a sufficiently old backup

ORA-01110: data file 1: '+DATA/CDB/DATAFILE/system.284.1171709135'

RMAN> recover database ;

Starting recover at 15-JUN-24

using channel ORA_DISK_1

starting media recovery

archived log for thread 1 with sequence 119 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_119.341.1171708599

archived log for thread 1 with sequence 120 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_120.342.1171708963

archived log for thread 1 with sequence 121 is already on disk as file +DATA/CDB/ONLINELOG/group_1.266.1148478739

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_119.341.1171708599 thread=1 sequence=119

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_120.342.1171708963 thread=1 sequence=120

archived log file name=+DATA/CDB/ONLINELOG/group_1.266.1148478739 thread=1 sequence=121

media recovery complete, elapsed time: 00:00:01

Finished recover at 15-JUN-24

RMAN> report schema;

RMAN-06139: warning: control file is not current for REPORT SCHEMA

Report of database schema for database with db_unique_name CDB

List of Permanent Datafiles

===========================

File Size(MB) Tablespace RB segs Datafile Name


1 1160 SYSTEM *** +DATA/CDB/DATAFILE/system.284.1171709135

3 890 SYSAUX *** +DATA/CDB/DATAFILE/sysaux.285.1171709137

4 615 UNDOTBS1 *** +DATA/CDB/DATAFILE/undotbs1.291.1171709141

5 510 PDB$SEED:SYSTEM *** +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.293.1171709141

6 480 PDB$SEED:SYSAUX *** +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.288.1171709143

7 5 USERS *** +DATA/CDB/DATAFILE/users.292.1171709143

8 215 PDB$SEED:UNDOTBS1 *** +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.262.1171709145

9 250 UNDOTBS2 *** +DATA/CDB/DATAFILE/undotbs2.268.1171709145

10 25 UNDOTBS3 *** +DATA/CDB/DATAFILE/undotbs3.267.1171709147

11 510 PDB:SYSTEM *** +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.269.1171709147

12 490 PDB:SYSAUX *** +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.271.1171709149

13 215 PDB:UNDOTBS1 *** +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.272.1171709149

14 215 PDB:UNDO_3 *** +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.264.1171709151

15 215 PDB:UNDO_4 *** +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.263.1171709151

16 5 PDB:USERS *** +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.275.1171709153

List of Temporary Files

=======================

File Size(MB) Tablespace Maxsize(MB) Tempfile Name


1 272 TEMP 32767 +DATA/CDB/TEMPFILE/temp.273.1148478745

2 237 PDB$SEED:TEMP 32767 +DATA/CDB/0633F844101D69CBE0636401A8C09D55/TEMPFILE/temp.265.1148480293

3 144 PDB:TEMP 32767 +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/TEMPFILE/temp.286.1148481715

RMAN> alter database open resetlogs;

Statement processed

RMAN> report schema;

Report of database schema for database with db_unique_name CDB

List of Permanent Datafiles

===========================

File Size(MB) Tablespace RB segs Datafile Name


1 1160 SYSTEM YES +DATA/CDB/DATAFILE/system.284.1171709135

3 890 SYSAUX NO +DATA/CDB/DATAFILE/sysaux.285.1171709137

4 615 UNDOTBS1 YES +DATA/CDB/DATAFILE/undotbs1.291.1171709141

5 510 PDB$SEED:SYSTEM NO +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.293.1171709141

6 480 PDB$SEED:SYSAUX NO +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.288.1171709143

7 5 USERS NO +DATA/CDB/DATAFILE/users.292.1171709143

8 215 PDB$SEED:UNDOTBS1 NO +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.262.1171709145

9 250 UNDOTBS2 YES +DATA/CDB/DATAFILE/undotbs2.268.1171709145

10 25 UNDOTBS3 YES +DATA/CDB/DATAFILE/undotbs3.267.1171709147

11 510 PDB:SYSTEM NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.269.1171709147

12 490 PDB:SYSAUX NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.271.1171709149

13 215 PDB:UNDOTBS1 NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.272.1171709149

14 215 PDB:UNDO_3 NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.264.1171709151

15 215 PDB:UNDO_4 NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.263.1171709151

16 5 PDB:USERS NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.275.1171709153

List of Temporary Files

=======================

File Size(MB) Tablespace Maxsize(MB) Tempfile Name


1 272 TEMP 32767 +DATA/CDB/TEMPFILE/temp.273.1148478745

2 237 PDB$SEED:TEMP 32767 +DATA/CDB/0633F844101D69CBE0636401A8C09D55/TEMPFILE/temp.265.1148480293

3 144 PDB:TEMP 32767 +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/TEMPFILE/temp.286.1148481715

RMAN> delete datafilecopy;

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-00558: error encountered while parsing input commands

RMAN-01009: syntax error: found ";": expecting one of: "all, like, tag, double-quoted-string, integer, single-quoted-string"

RMAN-01007: at line 1 column 20 file: standard input

RMAN> delete datafilecopy all;

released channel: ORA_DISK_1

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=32 instance=cdb1 device type=DISK

List of Datafile Copies

=======================

Key File S Completion Time Ckp SCN Ckp Time Sparse


4 1 A 15-JUN-24 7728846 15-JUN-24 NO

Name: +DATA1/CDB/DATAFILE/system.326.1171708477

5 3 A 15-JUN-24 7728846 15-JUN-24 NO

Name: +DATA1/CDB/DATAFILE/sysaux.327.1171708477

6 4 A 15-JUN-24 7728846 15-JUN-24 NO

Name: +DATA1/CDB/DATAFILE/undotbs1.328.1171708477

16 5 A 15-JUN-24 5317292 27-SEP-23 NO

Name: +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.338.1171708487

17 6 A 15-JUN-24 5317292 27-SEP-23 NO

Name: +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.339.1171708487

9 7 A 15-JUN-24 7728846 15-JUN-24 NO

Name: +DATA1/CDB/DATAFILE/users.331.1171708477

18 8 A 15-JUN-24 5317292 27-SEP-23 NO

Name: +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.340.1171708487

7 9 A 15-JUN-24 7728846 15-JUN-24 NO

Name: +DATA1/CDB/DATAFILE/undotbs2.329.1171708477

8 10 A 15-JUN-24 7728846 15-JUN-24 NO

Name: +DATA1/CDB/DATAFILE/undotbs3.330.1171708477

10 11 A 15-JUN-24 7728846 15-JUN-24 NO

Name: +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.332.1171708485

11 12 A 15-JUN-24 7728846 15-JUN-24 NO

Name: +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.333.1171708485

12 13 A 15-JUN-24 7728846 15-JUN-24 NO

Name: +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.334.1171708485

13 14 A 15-JUN-24 7728846 15-JUN-24 NO

Name: +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.335.1171708485

14 15 A 15-JUN-24 7728846 15-JUN-24 NO

Name: +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.336.1171708485

15 16 A 15-JUN-24 7728846 15-JUN-24 NO

Name: +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.337.1171708485

Do you really want to delete the above objects (enter YES or NO)? YES

deleted datafile copy

datafile copy file name=+DATA1/CDB/DATAFILE/system.326.1171708477 RECID=4 STAMP=1171752333

deleted datafile copy

datafile copy file name=+DATA1/CDB/DATAFILE/sysaux.327.1171708477 RECID=5 STAMP=1171752333

deleted datafile copy

datafile copy file name=+DATA1/CDB/DATAFILE/undotbs1.328.1171708477 RECID=6 STAMP=1171752333

deleted datafile copy

datafile copy file name=+DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.338.1171708487 RECID=16 STAMP=1171752333

deleted datafile copy

datafile copy file name=+DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.339.1171708487 RECID=17 STAMP=1171752333

deleted datafile copy

datafile copy file name=+DATA1/CDB/DATAFILE/users.331.1171708477 RECID=9 STAMP=1171752333

deleted datafile copy

datafile copy file name=+DATA1/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.340.1171708487 RECID=18 STAMP=1171752333

deleted datafile copy

datafile copy file name=+DATA1/CDB/DATAFILE/undotbs2.329.1171708477 RECID=7 STAMP=1171752333

deleted datafile copy

datafile copy file name=+DATA1/CDB/DATAFILE/undotbs3.330.1171708477 RECID=8 STAMP=1171752333

deleted datafile copy

datafile copy file name=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.332.1171708485 RECID=10 STAMP=1171752333

deleted datafile copy

datafile copy file name=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.333.1171708485 RECID=11 STAMP=1171752333

deleted datafile copy

datafile copy file name=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.334.1171708485 RECID=12 STAMP=1171752333

deleted datafile copy

datafile copy file name=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.335.1171708485 RECID=13 STAMP=1171752333

deleted datafile copy

datafile copy file name=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.336.1171708485 RECID=14 STAMP=1171752333

deleted datafile copy

datafile copy file name=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.337.1171708485 RECID=15 STAMP=1171752333

Deleted 15 objects

RMAN> startup force nomount;

Oracle instance started

Total System Global Area 2382361320 bytes

Fixed Size 9167592 bytes

Variable Size 805306368 bytes

Database Buffers 1560281088 bytes

Redo Buffers 7606272 bytes

RMAN> restore controlfile from autobackup;

Starting restore at 15-JUN-24

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=30 instance=cdb1 device type=DISK

recovery area destination: +DATA1

database name (or database unique name) used for search: CDB

channel ORA_DISK_1: AUTOBACKUP +DATA1/CDB/AUTOBACKUP/2024_06_15/s_1171752440.275.1171709241 found in the recovery area

channel ORA_DISK_1: looking for AUTOBACKUP on day: 20240615

channel ORA_DISK_1: restoring control file from AUTOBACKUP +DATA1/CDB/AUTOBACKUP/2024_06_15/s_1171752440.275.1171709241

channel ORA_DISK_1: 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 15-JUN-24

RMAN> alter database mount;

released channel: ORA_DISK_1

Statement processed

RMAN> restore datbase;

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-00558: error encountered while parsing input commands

RMAN-01009: syntax error: found "identifier": expecting one of: "allforeign, application, archivelog, asdecrypted, asencrypted, backupset, channel, check, controlfile, database, database root, datafile, device, dump, farsync, file_name_convert, force, foreign, from, frompreplugin, from service, high, pluggable, preview, primary, section, skip preplugin, skip readonly, spfile, standby, tablespace, to restore point, until restore point, until, using, validate, ("

RMAN-01008: the bad identifier was: datbase

RMAN-01007: at line 1 column 9 file: standard input

RMAN> restore database;

Starting restore at 15-JUN-24

Starting implicit crosscheck backup at 15-JUN-24

allocated channel: ORA_DISK_1

Crosschecked 10 objects

Finished implicit crosscheck backup at 15-JUN-24

Starting implicit crosscheck copy at 15-JUN-24

using channel ORA_DISK_1

Crosschecked 15 objects

Finished implicit crosscheck copy at 15-JUN-24

searching for all files in the recovery area

cataloging files...

cataloging done

List of Cataloged Files

=======================

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_15/s_1171752440.275.1171709241

using channel ORA_DISK_1

skipping datafile 5; already restored to file +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.293.1171709141

skipping datafile 6; already restored to file +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.288.1171709143

skipping datafile 8; already restored to file +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.262.1171709145

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 +DATA/CDB/DATAFILE/system.284.1171709135

channel ORA_DISK_1: restoring datafile 00003 to +DATA/CDB/DATAFILE/sysaux.285.1171709137

channel ORA_DISK_1: restoring datafile 00004 to +DATA/CDB/DATAFILE/undotbs1.291.1171709141

channel ORA_DISK_1: restoring datafile 00007 to +DATA/CDB/DATAFILE/users.292.1171709143

channel ORA_DISK_1: restoring datafile 00009 to +DATA/CDB/DATAFILE/undotbs2.268.1171709145

channel ORA_DISK_1: restoring datafile 00010 to +DATA/CDB/DATAFILE/undotbs3.267.1171709147

channel ORA_DISK_1: reading from backup piece +DATA1/CDB/BACKUPSET/2024_06_15/nnndf0_tag20240615t223219_0.320.1171708339

channel ORA_DISK_1: piece handle=+DATA1/CDB/BACKUPSET/2024_06_15/nnndf0_tag20240615t223219_0.320.1171708339 tag=TAG20240615T223219

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:03

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 00011 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.269.1171709147

channel ORA_DISK_1: restoring datafile 00012 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.271.1171709149

channel ORA_DISK_1: restoring datafile 00013 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.272.1171709149

channel ORA_DISK_1: restoring datafile 00014 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.264.1171709151

channel ORA_DISK_1: restoring datafile 00015 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.263.1171709151

channel ORA_DISK_1: restoring datafile 00016 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.275.1171709153

channel ORA_DISK_1: reading from backup piece +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_06_15/nnndf0_tag20240615t223219_0.321.1171708343

channel ORA_DISK_1: piece handle=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_06_15/nnndf0_tag20240615t223219_0.321.1171708343 tag=TAG20240615T223219

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:03

Finished restore at 15-JUN-24

---ASM级别删除datafile

ASMCMD> cd CDB

ASMCMD> ls

0633F844101D69CBE0636401A8C09D55/

06344F62B8C65A17E0636401A8C0F073/

ARCHIVELOG/

CONTROLFILE/

DATAFILE/

FLASHBACK/

ONLINELOG/

PARAMETERFILE/

PASSWORD/

TEMPFILE/

ASMCMD> rm -rf DATAFILE 06344F62B8C65A17E0636401A8C0F073 0633F844101D69CBE0636401A8C09D55

ASMCMD>


RMAN> restore database;

Starting restore at 15-JUN-24

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 +DATA/CDB/DATAFILE/system.284.1171709135

channel ORA_DISK_1: restoring datafile 00003 to +DATA/CDB/DATAFILE/sysaux.285.1171709137

channel ORA_DISK_1: restoring datafile 00004 to +DATA/CDB/DATAFILE/undotbs1.291.1171709141

channel ORA_DISK_1: restoring datafile 00007 to +DATA/CDB/DATAFILE/users.292.1171709143

channel ORA_DISK_1: restoring datafile 00009 to +DATA/CDB/DATAFILE/undotbs2.268.1171709145

channel ORA_DISK_1: restoring datafile 00010 to +DATA/CDB/DATAFILE/undotbs3.267.1171709147

channel ORA_DISK_1: reading from backup piece +DATA1/CDB/BACKUPSET/2024_06_15/nnndf0_tag20240615t223219_0.320.1171708339

channel ORA_DISK_1: piece handle=+DATA1/CDB/BACKUPSET/2024_06_15/nnndf0_tag20240615t223219_0.320.1171708339 tag=TAG20240615T223219

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:03

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 00011 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.269.1171709147

channel ORA_DISK_1: restoring datafile 00012 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.271.1171709149

channel ORA_DISK_1: restoring datafile 00013 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.272.1171709149

channel ORA_DISK_1: restoring datafile 00014 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.264.1171709151

channel ORA_DISK_1: restoring datafile 00015 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.263.1171709151

channel ORA_DISK_1: restoring datafile 00016 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.275.1171709153

channel ORA_DISK_1: reading from backup piece +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_06_15/nnndf0_tag20240615t223219_0.321.1171708343

channel ORA_DISK_1: piece handle=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_06_15/nnndf0_tag20240615t223219_0.321.1171708343 tag=TAG20240615T223219

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:07

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 00005 to +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.293.1171709141

channel ORA_DISK_1: restoring datafile 00006 to +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.288.1171709143

channel ORA_DISK_1: restoring datafile 00008 to +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.262.1171709145

channel ORA_DISK_1: reading from backup piece +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/BACKUPSET/2024_06_15/nnndf0_tag20240615t223219_0.322.1171708345

channel ORA_DISK_1: piece handle=+DATA1/CDB/0633F844101D69CBE0636401A8C09D55/BACKUPSET/2024_06_15/nnndf0_tag20240615t223219_0.322.1171708345 tag=TAG20240615T223219

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:03

Finished restore at 15-JUN-24

RMAN> recover datatabase;

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-00558: error encountered while parsing input commands

RMAN-01009: syntax error: found "identifier": expecting one of: "allow, application, archivelog, auxiliary, check, clear, copy, corruption, database, database root, datafilecopy, datafile, datapump, delete, device, dump, exclude, file_name_convert, foreign, from, frompreplugin, from service, nonlogged, noparallel, noredo, notableimport, parallel, pfile, pluggable, preview, remap, restore, section, skipoffline, skip readonly, standby, standbydatabase, table, tablespace, test, undo, using, validate"

RMAN-01008: the bad identifier was: datatabase

RMAN-01007: at line 1 column 9 file: standard input

RMAN> recover database;

Starting recover at 15-JUN-24

using channel ORA_DISK_1

starting media recovery

archived log for thread 1 with sequence 118 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_118.323.1171708349

archived log for thread 1 with sequence 119 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_119.341.1171708599

archived log for thread 1 with sequence 120 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_120.306.1171709231

archived log for thread 1 with sequence 121 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_121.307.1171709231

archived log for thread 1 with sequence 1 is already on disk as file +DATA/CDB/ONLINELOG/group_1.266.1148478739

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_118.323.1171708349 thread=1 sequence=118

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_119.341.1171708599 thread=1 sequence=119

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_120.306.1171709231 thread=1 sequence=120

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_121.307.1171709231 thread=1 sequence=121
archived log file name=+DATA/CDB/ONLINELOG/group_1.266.1148478739 thread=1 sequence=1

media recovery complete, elapsed time: 00:00:02

Finished recover at 15-JUN-24

RMAN> alter database open;

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of sql statement command at 06/15/2024 22:54:03

ORA-01589: must use RESETLOGS or NORESETLOGS option for database open

RMAN> alter database open resetlogs;---只要恢复了controlfile都要resetlogs?

Statement processed

------------------------手动apply log也是一样的------------------------------

RMAN>

Finished restore at 15-JUN-24

RMAN> exit

Recovery Manager complete.

[oracle@rac1 ~]$ s

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Jun 15 23:00:30 2024

Version 19.20.0.0.0

SQL> recover database;

ORA-00283: recovery session canceled due to errors

ORA-01610: recovery using the BACKUP CONTROLFILE option must be done

SQL> recover database using BACKUP CONTROLFILE;

ORA-00279: change 7325671 generated at 06/15/2024 22:32:19 needed for thread 1

ORA-00289: suggestion :

+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_118.323.1171708349

ORA-00280: change 7325671 for thread 1 is in sequence #118

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

auto

ORA-00279: change 7325718 generated at 06/15/2024 10:32:28 needed for thread 1

ORA-00289: suggestion :

+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_119.341.1171708599

ORA-00280: change 7325718 for thread 1 is in sequence #119

ORA-00278: log file

'+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_118.323.1171708349' no longer

needed for this recovery

ORA-00279: change 7525934 generated at 06/15/2024 22:36:39 needed for thread 1

ORA-00289: suggestion :

+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_120.306.1171709231

ORA-00280: change 7525934 for thread 1 is in sequence #120

ORA-00278: log file

'+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_119.341.1171708599' no longer

needed for this recovery

ORA-00279: change 7728845 generated at 06/15/2024 22:42:42 needed for thread 1

ORA-00289: suggestion :

+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_121.307.1171709231

ORA-00280: change 7728845 for thread 1 is in sequence #121

ORA-00278: log file

'+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_120.306.1171709231' no longer

needed for this recovery

ORA-00279: change 7732091 generated at 06/15/2024 22:47:11 needed for thread 1

ORA-00289: suggestion :

+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_1.344.1171709653

ORA-00280: change 7732091 for thread 1 is in sequence #1

ORA-00278: log file

'+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_121.307.1171709231' no longer

needed for this recovery

ORA-00279: change 7735183 generated at 06/15/2024 22:54:12 needed for thread 1

ORA-00289: suggestion : +DATA1

ORA-00280: change 7735183 for thread 1 is in sequence #1

ORA-00278: log file

'+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_1.344.1171709653' no longer

needed for this recovery

ORA-00308: cannot open archived log '+DATA1'
ORA-17503: ksfdopn:2 Failed to open file +DATA1
ORA-15045: ASM file name '+DATA1' is not in reference form

SQL> recover database using BACKUP CONTROLFILE;

ORA-00279: change 7735183 generated at 06/15/2024 22:54:12 needed for thread 1

ORA-00289: suggestion : +DATA1

ORA-00280: change 7735183 for thread 1 is in sequence #1

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
+DATA/CDB/ONLINELOG/group_1.266.1148478739

Log applied.

Media recovery complete.

SQL> alter database open;

alter database open

*

ERROR at line 1:

ORA-01589: must use RESETLOGS or NORESETLOGS option for database open

SQL> recover database using BACKUP CONTROLFILE;

ORA-00279: change 7738684 generated at 06/15/2024 22:58:22 needed for thread 1

ORA-00289: suggestion : +DATA1

ORA-00280: change 7738684 for thread 1 is in sequence #1

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

+DATA/CDB/ONLINELOG/group_2.274.1148478739

ORA-00339: archived log does not contain any redo

ORA-00334: archived log: '+DATA/CDB/ONLINELOG/group_2.274.1148478739'

SQL> recover database using BACKUP CONTROLFILE;

ORA-00279: change 7738684 generated at 06/15/2024 22:58:22 needed for thread 1

ORA-00289: suggestion : +DATA1

ORA-00280: change 7738684 for thread 1 is in sequence #1

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

+DATA/CDB/ONLINELOG/

ORA-00308: cannot open archived log '+DATA/CDB/ONLINELOG/'

ORA-17503: ksfdopn:2 Failed to open file +DATA/CDB/ONLINELOG/

ORA-15113: alias name 'ONLINELOG' refers to a directory

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

+DATA/CDB/ONLINELOG/group_3.261.1148481315

ORA-00339: archived log does not contain any redo

ORA-00334: archived log: '+DATA/CDB/ONLINELOG/group_3.261.1148481315'

+DATA/CDB/ONLINELOG/group_6.287.1148481317

ORA-00339: archived log does not contain any redo

ORA-00334: archived log: '+DATA/CDB/ONLINELOG/group_6.287.1148481317'

SQL> recover database using BACKUP CONTROLFILE;

ORA-00279: change 7738684 generated at 06/15/2024 22:58:22 needed for thread 1

ORA-00289: suggestion : +DATA1

ORA-00280: change 7738684 for thread 1 is in sequence #1

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

ORA-00308: cannot open archived log '+DATA1'

ORA-17503: ksfdopn:2 Failed to open file +DATA1

ORA-15045: ASM file name '+DATA1' is not in reference form

--------------1-6 只有第一个有redo

ASMCMD> ls

group_1.266.1148478739

group_1.302.1148478739

group_2.274.1148478739

group_2.301.1148478739

group_3.261.1148481315

group_3.270.1148481315

group_4.260.1148481315

group_4.298.1148481315

group_5.259.1148481315

group_5.276.1148481317

group_6.287.1148481317

group_6.294.1148481317

ASMCMD> pwd

+DATA/CDB/ONLINELOG

ASMCMD>


SQL> ALTER DAtabase open;

ALTER DAtabase open

*

ERROR at line 1:

ORA-01589: must use RESETLOGS or NORESETLOGS option for database open

SQL> exit

Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.20.0.0.0

[oracle@rac1 ~]$ rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Sat Jun 15 23:04:38 2024

Version 19.20.0.0.0

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

connected to target database: CDB (DBID=2265125454, not open)

RMAN> recover database;

Starting recover at 15-JUN-24

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=762 instance=cdb1 device type=DISK

starting media recovery

archived log for thread 1 with sequence 1 is already on disk as file +DATA/CDB/ONLINELOG/group_1.266.1148478739
archived log file name=+DATA/CDB/ONLINELOG/group_1.266.1148478739 thread=1--又apply一次redo

sequence=1

media recovery complete, elapsed time: 00:00:01

Finished recover at 15-JUN-24

RMAN> alter database open;

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of sql statement command at 06/15/2024 23:05:08

ORA-01589: must use RESETLOGS or NORESETLOGS option for database open

RMAN> alter database open resetlogs;------错误没有影响!!!!

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-00601: fatal error in recovery manager

RMAN-03004: fatal error during execution of command

ORA-01092: ORACLE instance terminated. Disconnection forced

RMAN-03002: failure of sql statement command at 06/15/2024 23:05:20

ORA-00603: ORACLE server session terminated by fatal error

ORA-01092: ORACLE instance terminated. Disconnection forced

ORA-65088: database open should be retried

Process ID: 11609

Session ID: 793 Serial number: 44885

[oracle@rac1 ~]$ rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Sat Jun 15 23:05:32 2024

Version 19.20.0.0.0

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

connected to target database (not started)

RMAN> startup

Oracle instance started

database mounted

database opened

Total System Global Area 2382361320 bytes

Fixed Size 9167592 bytes

Variable Size 805306368 bytes

Database Buffers 1560281088 bytes

Redo Buffers 7606272 bytes

RMAN>

------------------------上面方法会有有什么好处,可以自己控制恢复那个archivedlog

[oracle@rac1 ~]$ rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Sat Jun 15 23:12:14 2024

Version 19.20.0.0.0

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

connected to target database: CDB (DBID=2265125454)

RMAN> startup nomount force;

Oracle instance started

Total System Global Area 2382361320 bytes

Fixed Size 9167592 bytes

Variable Size 805306368 bytes

Database Buffers 1560281088 bytes

Redo Buffers 7606272 bytes

RMAN> restore controlfile from autobackup;

Starting restore at 15-JUN-24

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=28 instance=cdb1 device type=DISK

recovery area destination: +DATA1

database name (or database unique name) used for search: CDB

channel ORA_DISK_1: AUTOBACKUP +DATA1/CDB/AUTOBACKUP/2024_06_15/s_1171752861.343.1171709663 found in the recovery area

channel ORA_DISK_1: looking for AUTOBACKUP on day: 20240615

channel ORA_DISK_1: restoring control file from AUTOBACKUP +DATA1/CDB/AUTOBACKUP/2024_06_15/s_1171752861.343.1171709663

channel ORA_DISK_1: 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 15-JUN-24

RMAN> alter database mount;

released channel: ORA_DISK_1

Statement processed

RMAN> restore database;

Starting restore at 15-JUN-24

Starting implicit crosscheck backup at 15-JUN-24

allocated channel: ORA_DISK_1

Crosschecked 11 objects

Finished implicit crosscheck backup at 15-JUN-24

Starting implicit crosscheck copy at 15-JUN-24

using channel ORA_DISK_1

Finished implicit crosscheck copy at 15-JUN-24

searching for all files in the recovery area

cataloging files...

cataloging done

List of Cataloged Files

=======================

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_1.336.1171710315

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_1.337.1171710355

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_15/s_1171752861.343.1171709663

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 +DATA/CDB/DATAFILE/system.265.1171709609

channel ORA_DISK_1: restoring datafile 00003 to +DATA/CDB/DATAFILE/sysaux.262.1171709609

channel ORA_DISK_1: restoring datafile 00004 to +DATA/CDB/DATAFILE/undotbs1.288.1171709609

channel ORA_DISK_1: restoring datafile 00007 to +DATA/CDB/DATAFILE/users.263.1171709609

channel ORA_DISK_1: restoring datafile 00009 to +DATA/CDB/DATAFILE/undotbs2.293.1171709609

channel ORA_DISK_1: restoring datafile 00010 to +DATA/CDB/DATAFILE/undotbs3.275.1171709609

channel ORA_DISK_1: reading from backup piece +DATA1/CDB/BACKUPSET/2024_06_15/nnndf0_tag20240615t223219_0.320.1171708339

channel ORA_DISK_1: piece handle=+DATA1/CDB/BACKUPSET/2024_06_15/nnndf0_tag20240615t223219_0.320.1171708339 tag=TAG20240615T223219

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:03

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 00011 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.264.1171709613

channel ORA_DISK_1: restoring datafile 00012 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.272.1171709613

channel ORA_DISK_1: restoring datafile 00013 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.271.1171709613

channel ORA_DISK_1: restoring datafile 00014 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.269.1171709613

channel ORA_DISK_1: restoring datafile 00015 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.286.1171709613

channel ORA_DISK_1: restoring datafile 00016 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.267.1171709613

channel ORA_DISK_1: reading from backup piece +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_06_15/nnndf0_tag20240615t223219_0.321.1171708343

channel ORA_DISK_1: piece handle=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_06_15/nnndf0_tag20240615t223219_0.321.1171708343 tag=TAG20240615T223219

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:07

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 00005 to +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.268.1171709619

channel ORA_DISK_1: restoring datafile 00006 to +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.292.1171709621

channel ORA_DISK_1: restoring datafile 00008 to +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.291.1171709621

channel ORA_DISK_1: reading from backup piece +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/BACKUPSET/2024_06_15/nnndf0_tag20240615t223219_0.322.1171708345

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of restore command at 06/15/2024 23:13:08

ORA-19870: error while restoring backup piece +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/BACKUPSET/2024_06_15/nnndf0_tag20240615t223219_0.322.1171708345

ORA-19504: failed to create file "+DATA"

ORA-17502: ksfdcre:4 Failed to create file +DATA

ORA-15041: diskgroup "DATA" space exhausted

RMAN> crosscheck datafilecopy all;

released channel: ORA_DISK_1

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=798 instance=cdb1 device type=DISK

specification does not match any datafile copy in the repository

RMAN> restore database;

Starting restore at 15-JUN-24

using channel ORA_DISK_1

skipping datafile 1; already restored to file +DATA/CDB/DATAFILE/system.265.1171709609

skipping datafile 3; already restored to file +DATA/CDB/DATAFILE/sysaux.262.1171709609

skipping datafile 4; already restored to file +DATA/CDB/DATAFILE/undotbs1.288.1171709609

skipping datafile 7; already restored to file +DATA/CDB/DATAFILE/users.263.1171709609

skipping datafile 9; already restored to file +DATA/CDB/DATAFILE/undotbs2.293.1171709609

skipping datafile 10; already restored to file +DATA/CDB/DATAFILE/undotbs3.275.1171709609

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 00011 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.284.1171710781

channel ORA_DISK_1: restoring datafile 00012 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.346.1171710781

channel ORA_DISK_1: restoring datafile 00013 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.347.1171710781

channel ORA_DISK_1: restoring datafile 00014 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.350.1171710781

channel ORA_DISK_1: restoring datafile 00015 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.359.1171710781

channel ORA_DISK_1: restoring datafile 00016 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.360.1171710781

channel ORA_DISK_1: reading from backup piece +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_06_15/nnndf0_tag20240615t223219_0.321.1171708343

channel ORA_DISK_1: piece handle=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_06_15/nnndf0_tag20240615t223219_0.321.1171708343 tag=TAG20240615T223219

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:03

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 00005 to +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.268.1171709619

channel ORA_DISK_1: restoring datafile 00006 to +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.292.1171709621

channel ORA_DISK_1: restoring datafile 00008 to +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.291.1171709621

channel ORA_DISK_1: reading from backup piece +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/BACKUPSET/2024_06_15/nnndf0_tag20240615t223219_0.322.1171708345

channel ORA_DISK_1: piece handle=+DATA1/CDB/0633F844101D69CBE0636401A8C09D55/BACKUPSET/2024_06_15/nnndf0_tag20240615t223219_0.322.1171708345 tag=TAG20240615T223219

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:04

Finished restore at 15-JUN-24

RMAN> exit

Recovery Manager complete.

[oracle@rac1 ~]$ s

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Jun 15 23:14:28 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> recover database using BACKUP CONTROLFILE;

ORA-00279: change 7325671 generated at 06/15/2024 22:32:19 needed for thread 1

ORA-00289: suggestion :

+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_118.323.1171708349

ORA-00280: change 7325671 for thread 1 is in sequence #118

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_118.323.1171708349

ORA-00279: change 7325718 generated at 06/15/2024 10:32:28 needed for thread 1

ORA-00289: suggestion :

+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_119.341.1171708599

ORA-00280: change 7325718 for thread 1 is in sequence #119

ORA-00278: log file

'+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_118.323.1171708349' no longer

needed for this recovery

我只恢复一个archivelog
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
CANCEL

Media recovery cancelled.

SQL> alter database open resetlogs;

Database altered.

SQL>

--------------------------一个都不恢复除了大问题-----------

SQL> recover database using backup controlfile;

ORA-00279: change 7325671 generated at 06/15/2024 22:32:19 needed for thread 1

ORA-00289: suggestion :

+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_118.323.1171708349

ORA-00280: change 7325671 for thread 1 is in sequence #118

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
CANCEL

Media recovery cancelled.

SQL> alter database open resetlogs;

alter database open resetlogs

*

ERROR at line 1:

ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: '+DATA/CDB/DATAFILE/system.265.1171709609'

下面恢复不了了

SQL> recover database using backup controlfile;

ORA-00283: recovery session canceled due to errors

ORA-19912: cannot recover to target incarnation 6

SQL> alter database open resetlogs;

alter database open resetlogs

*

ERROR at line 1:

ORA-01113: file 1 needs media recovery

ORA-01110: data file 1: '+DATA/CDB/DATAFILE/system.265.1171709609'

SQL> recover database;

ORA-00283: recovery session canceled due to errors

ORA-01610: recovery using the BACKUP CONTROLFILE option must be done

SQL> recover database using BACKUP CONTROLFILE;

ORA-00283: recovery session canceled due to errors

ORA-19912: cannot recover to target incarnation 6

SQL> exit

Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.20.0.0.0

[oracle@rac1 ~]$ s

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Jun 15 23:20:21 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> recover database using BACKUP CONTROLFILE;

ORA-00283: recovery session canceled due to errors

ORA-19912: cannot recover to target incarnation 6

SQL> recover database using BACKUP CONTROLFILE until cancel;

ORA-00283: recovery session canceled due to errors

ORA-19912: cannot recover to target incarnation 6

SQL> exit

Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.20.0.0.0

[oracle@rac1 ~]$ rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Sat Jun 15 23:20:46 2024

Version 19.20.0.0.0

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

connected to target database: CDB (DBID=2265125454, not open)

RMAN> recover database;

Starting recover at 15-JUN-24

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=35 instance=cdb1 device type=DISK

starting media recovery

media recovery failed

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of recover command at 06/15/2024 23:20:53

ORA-00283: recovery session canceled due to errors

RMAN-11003: failure during parse/execution of SQL statement: alter database recover

if needed start until cancel using backup controlfile
ORA-00283: recovery session canceled due to errors
ORA-19912: cannot recover to target incarnation 6

说明虽然resetlogs 没有起来,但还是切换了incarnation

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 CURRENT 7325719 15-JUN-24

3 3 CDB 2265125454 ORPHAN 7732091 15-JUN-24

4 4 CDB 2265125454 ORPHAN 7735183 15-JUN-24

5 5 CDB 2265125454 ORPHAN 7738686 15-JUN-24

RMAN> reset database to incarnation 5;---- 怎么变大了

因为每次 restore controlfile from autobackup;不是固定的backup controlfile

database reset to incarnation 5

RMAN

Recovery Manager complete.

[oracle@rac1 ~]$ s

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Jun 15 23:21:32 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> recover database using backup controlfile;

ORA-00279: change 7325671 generated at 06/15/2024 22:32:19 needed for thread 1

ORA-00289: suggestion :

+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_118.323.1171708349

ORA-00280: change 7325671 for thread 1 is in sequence #118

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

auto

ORA-00279: change 7325718 generated at 06/15/2024 10:32:28 needed for thread 1

ORA-00289: suggestion :

+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_119.341.1171708599

ORA-00280: change 7325718 for thread 1 is in sequence #119

ORA-00278: log file

'+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_118.323.1171708349' no longer

needed for this recovery

ORA-00279: change 7525934 generated at 06/15/2024 22:36:39 needed for thread 1

ORA-00289: suggestion :

+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_120.306.1171709231

ORA-00280: change 7525934 for thread 1 is in sequence #120

ORA-00278: log file

'+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_119.341.1171708599' no longer

needed for this recovery

ORA-00279: change 7728845 generated at 06/15/2024 22:42:42 needed for thread 1

ORA-00289: suggestion :

+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_121.307.1171709231

ORA-00280: change 7728845 for thread 1 is in sequence #121

ORA-00278: log file

'+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_120.306.1171709231' no longer

needed for this recovery

ORA-00279: change 7732091 generated at 06/15/2024 22:47:11 needed for thread 1

ORA-00289: suggestion :

+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_1.344.1171709653

ORA-00280: change 7732091 for thread 1 is in sequence #1

ORA-00278: log file

'+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_121.307.1171709231' no longer

needed for this recovery

ORA-00279: change 7735183 generated at 06/15/2024 22:54:12 needed for thread 1

ORA-00289: suggestion :

+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_1.336.1171710315

ORA-00280: change 7735183 for thread 1 is in sequence #1

ORA-00278: log file

'+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_1.344.1171709653' no longer

needed for this recovery

ORA-00279: change 7738686 generated at 06/15/2024 23:05:14 needed for thread 1

ORA-00289: suggestion :

+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_1.337.1171710355

ORA-00280: change 7738686 for thread 1 is in sequence #1

ORA-00278: log file

'+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_1.336.1171710315' no longer

needed for this recovery

ORA-00279: change 7838961 generated at 06/15/2024 23:05:55 needed for thread 1

ORA-00289: suggestion : +DATA1

ORA-00280: change 7838961 for thread 1 is in sequence #2

ORA-00278: log file

'+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_1.337.1171710355' no longer

needed for this recovery

ORA-00308: cannot open archived log '+DATA1'

ORA-17503: ksfdopn:2 Failed to open file +DATA1

ORA-15045: ASM file name '+DATA1' is not in reference form

SQL> alter database open resetlogs;

Database altered.

SQL>

-----------------------------------这次错了不需要reset- 因为只有两个------------------------------

RMAN> startup nomount force;

Oracle instance started

Total System Global Area 2382361320 bytes

Fixed Size 9167592 bytes

Variable Size 805306368 bytes

Database Buffers 1560281088 bytes

Redo Buffers 7606272 bytes

RMAN> restore controlfile from autobackup;

Starting restore at 16-JUN-24

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=33 instance=cdb1 device type=DISK

recovery area destination: +DATA1

database name (or database unique name) used for search: CDB

channel ORA_DISK_1: AUTOBACKUP +DATA1/CDB/AUTOBACKUP/2024_06_16/s_1171764106.297.1171720907 found in the recovery area

channel ORA_DISK_1: looking for AUTOBACKUP on day: 20240616

channel ORA_DISK_1: restoring control file from AUTOBACKUP +DATA1/CDB/AUTOBACKUP/2024_06_16/s_1171764106.297.1171720907

channel ORA_DISK_1: 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 16-JUN-24

RMAN> alter database mount;

released channel: ORA_DISK_1

Statement processed

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 CURRENT 1920977 26-SEP-23

RMAN> restore database;

Starting restore at 16-JUN-24

Starting implicit crosscheck backup at 16-JUN-24

allocated channel: ORA_DISK_1

Crosschecked 5 objects

Finished implicit crosscheck backup at 16-JUN-24

Starting implicit crosscheck copy at 16-JUN-24

using channel ORA_DISK_1

Finished implicit crosscheck copy at 16-JUN-24

searching for all files in the recovery area

cataloging files...

cataloging done

List of Cataloged Files----不包含backupset

=======================

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_16/s_1171764106.297.1171720907

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_123.295.1171720971

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_124.294.1171720975

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_125.292.1171720977

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_126.287.1171720981

using channel ORA_DISK_1

skipping datafile 5; already restored to file +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/system.272.1148480251

skipping datafile 6; already restored to file +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/sysaux.271.1148480251

skipping datafile 8; already restored to file +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/undotbs1.267.1148480251

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 +DATA/CDB/DATAFILE/system.275.1148478571

channel ORA_DISK_1: restoring datafile 00003 to +DATA/CDB/DATAFILE/sysaux.263.1148478647

channel ORA_DISK_1: restoring datafile 00004 to +DATA/CDB/DATAFILE/undotbs1.264.1148478683

channel ORA_DISK_1: restoring datafile 00007 to +DATA/CDB/DATAFILE/users.269.1148478683

channel ORA_DISK_1: restoring datafile 00009 to +DATA/CDB/DATAFILE/undotbs2.268.1148480549

channel ORA_DISK_1: restoring datafile 00010 to +DATA/CDB/DATAFILE/undotbs3.262.1148480551

channel ORA_DISK_1: reading from backup piece +DATA1/CDB/BACKUPSET/2024_06_16/nnndf0_fulldbbackup_0.314.1171720897

channel ORA_DISK_1: piece handle=+DATA1/CDB/BACKUPSET/2024_06_16/nnndf0_fulldbbackup_0.314.1171720897 tag=FULLDBBACKUP

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:07

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 00011 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.292.1148481713

channel ORA_DISK_1: restoring datafile 00012 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.288.1148481713

channel ORA_DISK_1: restoring datafile 00013 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.293.1148481713

channel ORA_DISK_1: restoring datafile 00014 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.291.1148481745

channel ORA_DISK_1: restoring datafile 00015 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.285.1148481747

channel ORA_DISK_1: restoring datafile 00016 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.284.1148481749

channel ORA_DISK_1: reading from backup piece +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_06_16/nnndf0_fulldbbackup_0.313.1171720899

channel ORA_DISK_1: piece handle=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_06_16/nnndf0_fulldbbackup_0.313.1171720899 tag=FULLDBBACKUP

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:03

Finished restore at 16-JUN-24

RMAN> recover database using backup controlfile;

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-00558: error encountered while parsing input commands

RMAN-01009: syntax error: found "backup": expecting one of: "backupset, compressed, double-quoted-string, single-quoted-string"

RMAN-01007: at line 1 column 25 file: standard input

RMAN> exit

Recovery Manager complete.

[oracle@rac1 ~]$ s

SQL*Plus: Release 19.0.0.0.0 - Production on Sun Jun 16 02:09:19 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> recover database using backup controlfile;

ORA-00279: change 7326509 generated at 06/16/2024 02:01:36 needed for thread 1

ORA-00289: suggestion :

+DATA1/CDB/ARCHIVELOG/2024_06_16/thread_1_seq_122.305.1171720905

ORA-00280: change 7326509 for thread 1 is in sequence #122

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
CANCEL

Media recovery cancelled.

SQL> alter database open resetlogs;

alter database open resetlogs

*

ERROR at line 1:

ORA-01113: file 1 needs media recovery

ORA-01110: data file 1: '+DATA/CDB/DATAFILE/system.275.1148478571'

SQL> exit

Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.20.0.0.0

[oracle@rac1 ~]$ rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Sun Jun 16 02:09:36 2024

Version 19.20.0.0.0

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

connected to target database: CDB (DBID=2265125454, not open)

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 CURRENT 1920977 26-SEP-23

RMAN>

RMAN> recover database;

Starting recover at 16-JUN-24

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=39 instance=cdb1 device type=DISK

starting media recovery

archived log for thread 1 with sequence 122 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_16/thread_1_seq_122.305.1171720905

archived log for thread 1 with sequence 123 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_123.295.1171720971

archived log for thread 1 with sequence 124 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_124.294.1171720975

archived log for thread 1 with sequence 125 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_125.292.1171720977

archived log for thread 1 with sequence 126 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_126.287.1171720981

archived log for thread 1 with sequence 127 is already on disk as file +DATA/CDB/ONLINELOG/group_1.266.1148478739

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_16/thread_1_seq_122.305.1171720905 thread=1 sequence=122

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_123.295.1171720971 thread=1 sequence=123

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_124.294.1171720975 thread=1 sequence=124

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_125.292.1171720977 thread=1 sequence=125

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_126.287.1171720981 thread=1 sequence=126

archived log file name=+DATA/CDB/ONLINELOG/group_1.266.1148478739 thread=1 sequence=127

media recovery complete, elapsed time: 00:00:02

Finished recover at 16-JUN-24

RMAN>

[oracle@rac1 ~]$ s

SQL*Plus: Release 19.0.0.0.0 - Production on Sun Jun 16 02:13:13 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> alter session set container=pdb;

Session altered.

SQL> select count(*) from abc;

COUNT(*)

73082

SQL> exit

Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.20.0.0.0

---------------------------继续恢复测试----------------------

[oracle@rac1 ~]$ rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Sun Jun 16 02:13:28 2024

Version 19.20.0.0.0

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

liconnected to target database: CDB (DBID=2265125454)

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

3 3 CDB 2265125454 CURRENT 7326802 16-JUN-24

RMAN> startup nomount force;

restore controlfile from autobackup;

alter database mount;

list incarnation;Oracle instance started

Total System Global Area 2382361320 bytes

Fixed Size 9167592 bytes

Variable Size 805306368 bytes

Database Buffers 1560281088 bytes

Redo Buffers 7606272 bytes

RMAN>

Starting restore at 16-JUN-24

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=28 instance=cdb1 device type=DISK

recovery area destination: +DATA1

database name (or database unique name) used for search: CDB

channel ORA_DISK_1: AUTOBACKUP +DATA1/CDB/AUTOBACKUP/2024_06_16/s_1171764787.275.1171721587 found in the recovery area

-----上一次是297 只有两个incarnation----------

channel ORA_DISK_1: restoring control file from AUTOBACKUP +DATA1/CDB/AUTOBACKUP/2024_06_16/s_1171764106.297.1171720907


channel ORA_DISK_1: looking for AUTOBACKUP on day: 20240616

channel ORA_DISK_1: restoring control file from AUTOBACKUP +DATA1/CDB/AUTOBACKUP/2024_06_16/s_1171764787.275.1171721587

channel ORA_DISK_1: 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 16-JUN-24

RMAN>

released channel: ORA_DISK_1

Statement processed

RMAN>

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

3 3 CDB 2265125454 CURRENT 7326802 16-JUN-24

RMAN> restore database;

Finished restore at 16-JUN-24

RMAN> exit

Recovery Manager complete.

[oracle@rac1 ~]$ s

SQL*Plus: Release 19.0.0.0.0 - Production on Sun Jun 16 02:15:50 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> recover database using backup controlfile;

ORA-00279: change 7326509 generated at 06/16/2024 02:01:36 needed for thread 1

ORA-00289: suggestion :

+DATA1/CDB/ARCHIVELOG/2024_06_16/thread_1_seq_122.305.1171720905

ORA-00280: change 7326509 for thread 1 is in sequence #122

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

+DATA1/CDB/ARCHIVELOG/2024_06_16/thread_1_seq_122.305.1171720905

ORA-00279: change 7326531 generated at 06/15/2024 14:01:45 needed for thread 1

ORA-00289: suggestion :

+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_123.295.1171720971

ORA-00280: change 7326531 for thread 1 is in sequence #123

ORA-00278: log file

'+DATA1/CDB/ARCHIVELOG/2024_06_16/thread_1_seq_122.305.1171720905' no longer

needed for this recovery

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

cancel;

ORA-00308: cannot open archived log 'cancel;'

ORA-27037: unable to obtain file status

Linux-x86_64 Error: 2: No such file or directory

Additional information: 7

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

cance;

ORA-00308: cannot open archived log 'cance;'

ORA-27037: unable to obtain file status

Linux-x86_64 Error: 2: No such file or directory

Additional information: 7

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

cancel

Media recovery cancelled.

SQL> alter database open resetlogs;

alter database open resetlogs

*

ERROR at line 1:

ORA-01113: file 1 needs media recovery

ORA-01110: data file 1: '+DATA/CDB/DATAFILE/system.275.1148478571'

SQL> alter database open resetlogs;

alter database open resetlogs

*

ERROR at line 1:

ORA-01113: file 1 needs media recovery

ORA-01110: data file 1: '+DATA/CDB/DATAFILE/system.275.1148478571'

SQL> recover database using backup controlfile;

ORA-00283: recovery session canceled due to errors

ORA-19912: cannot recover to target incarnation 3

SQL> exit

Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.20.0.0.0

[oracle@rac1 ~]$ rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Sun Jun 16 02:16:55 2024

Version 19.20.0.0.0

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

connected to target database: CDB (DBID=2265125454, not open)

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

3 3 CDB 2265125454 CURRENT 7326802 16-JUN-24

RMAN> recover database;

Starting recover at 16-JUN-24

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=790 instance=cdb1 device type=DISK

starting media recovery

media recovery failed

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of recover command at 06/16/2024 02:17:08

ORA-00283: recovery session canceled due to errors

RMAN-11003: failure during parse/execution of SQL statement: alter database recover

if needed start until cancel using backup controlfile

ORA-00283: recovery session canceled due to errors

ORA-19912: cannot recover to target incarnation 3

RMAN> reset database to incarnation 2;

database reset to incarnation 2

RMAN> exit

Recovery Manager complete.

[oracle@rac1 ~]$ s

SQL*Plus: Release 19.0.0.0.0 - Production on Sun Jun 16 02:19:27 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> recover database using backup controlfile;

ORA-00279: change 7326531 generated at 06/15/2024 14:01:45 needed for thread 1

ORA-00289: suggestion :

+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_123.295.1171720971

ORA-00280: change 7326531 for thread 1 is in sequence #123

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

+DATA1/CDB/ARCHIVELOG/2024_06_16/thread_1_seq_121.316.1171720895

ORA-00310: archived log contains sequence 121; sequence 123 required

ORA-00334: archived log:

'+DATA1/CDB/ARCHIVELOG/2024_06_16/thread_1_seq_121.316.1171720895'

SQL> recover database using backup controlfile;

ORA-00279: change 7326531 generated at 06/15/2024 14:01:45 needed for thread 1

ORA-00289: suggestion :

+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_123.295.1171720971

ORA-00280: change 7326531 for thread 1 is in sequence #123

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_123.295.1171720971

ORA-00279: change 7326603 generated at 06/15/2024 14:02:51 needed for thread 1

ORA-00289: suggestion :

+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_124.294.1171720975

ORA-00280: change 7326603 for thread 1 is in sequence #124

ORA-00278: log file

'+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_123.295.1171720971' no longer

needed for this recovery

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
cancel

Media recovery cancelled.

SQL> alter database open resetlogs;

Database altered.

SQL> alter session set container=pdb;

Session altered.

SQL> select count(*) from abc;

select count(*) from abc

*

ERROR at line 1:

ORA-00942: table or view does not exist

---------------------------------恢复了一半还能继续吗?---------------------------------------

《经典》

startup nomount force;

restore controlfile from autobackup;

alter database mount;

list incarnation;

restore database;

[oracle@rac1 ~]$ s

SQL*Plus: Release 19.0.0.0.0 - Production on Sun Jun 16 02:13:13 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> alter session set container=pdb;

Session altered.

SQL> select count(*) from abc;

COUNT(*)


73082

[oracle@rac1 ~]$ rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Sun Jun 16 02:16:55 2024

Version 19.20.0.0.0

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

connected to target database: CDB (DBID=2265125454, not open)

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

3 3 CDB 2265125454 CURRENT 7326802 16-JUN-24

RMAN> recover database;

Starting recover at 16-JUN-24

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=790 instance=cdb1 device type=DISK

starting media recovery

media recovery failed

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of recover command at 06/16/2024 02:17:08

ORA-00283: recovery session canceled due to errors

RMAN-11003: failure during parse/execution of SQL statement: alter database recover

if needed start until cancel using backup controlfile

ORA-00283: recovery session canceled due to errors

ORA-19912: cannot recover to target incarnation 3

RMAN> reset database incarnation to 2;

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-00558: error encountered while parsing input commands

RMAN-01009: syntax error: found "incarnation": expecting one of: "to, ;"

RMAN-01007: at line 1 column 16 file: standard input

RMAN> reset incarnation to database 2;

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-00558: error encountered while parsing input commands

RMAN-01009: syntax error: found "incarnation": expecting one of: "database, pluggable"

RMAN-01007: at line 1 column 7 file: standard input

RMAN> reset database to incarnation 2;

database reset to incarnation 2

RMAN> exit

Recovery Manager complete.

[oracle@rac1 ~]$ s

SQL*Plus: Release 19.0.0.0.0 - Production on Sun Jun 16 02:19:27 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> recover database using backup controlfile;

ORA-00279: change 7326531 generated at 06/15/2024 14:01:45 needed for thread 1

ORA-00289: suggestion :

+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_123.295.1171720971

ORA-00280: change 7326531 for thread 1 is in sequence #123

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

+DATA1/CDB/ARCHIVELOG/2024_06_16/thread_1_seq_121.316.1171720895

ORA-00310: archived log contains sequence 121; sequence 123 required

ORA-00334: archived log:

'+DATA1/CDB/ARCHIVELOG/2024_06_16/thread_1_seq_121.316.1171720895'

SQL> recover database using backup controlfile;

ORA-00279: change 7326531 generated at 06/15/2024 14:01:45 needed for thread 1

ORA-00289: suggestion :

+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_123.295.1171720971

ORA-00280: change 7326531 for thread 1 is in sequence #123

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_123.295.1171720971

ORA-00279: change 7326603 generated at 06/15/2024 14:02:51 needed for thread 1

ORA-00289: suggestion :

+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_124.294.1171720975

ORA-00280: change 7326603 for thread 1 is in sequence #124

ORA-00278: log file

'+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_123.295.1171720971' no longer

needed for this recovery

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

cancel

Media recovery cancelled.

SQL> alter database open resetlogs;

Database altered.

SQL> alter session set container=pdb;

Session altered.

SQL> select count(*) from abc;

select count(*) from abc

*

ERROR at line 1:

ORA-00942: table or view does not exist

[oracle@rac1 ~]$ rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Sun Jun 16 02:29:24 2024

Version 19.20.0.0.0

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

connected to target database: CDB (DBID=2265125454)

RMAN> startup nomount force;

restore controlfile from autobackup;

alter database mount;

list incarnation;

restore database;

Oracle instance started

Total System Global Area 2382361320 bytes

Fixed Size 9167592 bytes

Variable Size 805306368 bytes

Database Buffers 1560281088 bytes

Redo Buffers 7606272 bytes

RMAN>

Starting restore at 16-JUN-24

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=28 instance=cdb1 device type=DISK

recovery area destination: +DATA1

database name (or database unique name) used for search: CDB

channel ORA_DISK_1: AUTOBACKUP +DATA1/CDB/AUTOBACKUP/2024_06_16/s_1171765303.307.1171722103 found in the recovery area

channel ORA_DISK_1: looking for AUTOBACKUP on day: 20240616

channel ORA_DISK_1: restoring control file from AUTOBACKUP +DATA1/CDB/AUTOBACKUP/2024_06_16/s_1171765303.307.1171722103

channel ORA_DISK_1: 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 16-JUN-24

RMAN>

released channel: ORA_DISK_1

Statement processed

RMAN>

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

4 4 CDB 2265125454 CURRENT 7326604 16-JUN-24

3 3 CDB 2265125454 ORPHAN 7326802 16-JUN-24

RMAN>

Starting restore at 16-JUN-24

Starting implicit crosscheck backup at 16-JUN-24

allocated channel: ORA_DISK_1

Crosschecked 7 objects

Finished implicit crosscheck backup at 16-JUN-24

Starting implicit crosscheck copy at 16-JUN-24

using channel ORA_DISK_1

Finished implicit crosscheck copy at 16-JUN-24

searching for all files in the recovery area

cataloging files...

cataloging done

List of Cataloged Files

=======================

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_16/s_1171765303.307.1171722103

using channel ORA_DISK_1

skipping datafile 5; already restored to file +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/system.272.1148480251

skipping datafile 6; already restored to file +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/sysaux.271.1148480251

skipping datafile 8; already restored to file +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/undotbs1.267.1148480251

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 +DATA/CDB/DATAFILE/system.275.1148478571

channel ORA_DISK_1: restoring datafile 00003 to +DATA/CDB/DATAFILE/sysaux.263.1148478647

channel ORA_DISK_1: restoring datafile 00004 to +DATA/CDB/DATAFILE/undotbs1.264.1148478683

channel ORA_DISK_1: restoring datafile 00007 to +DATA/CDB/DATAFILE/users.269.1148478683

channel ORA_DISK_1: restoring datafile 00009 to +DATA/CDB/DATAFILE/undotbs2.268.1148480549

channel ORA_DISK_1: restoring datafile 00010 to +DATA/CDB/DATAFILE/undotbs3.262.1148480551

channel ORA_DISK_1: reading from backup piece +DATA1/CDB/BACKUPSET/2024_06_16/nnndf0_fulldbbackup_0.314.1171720897

channel ORA_DISK_1: piece handle=+DATA1/CDB/BACKUPSET/2024_06_16/nnndf0_fulldbbackup_0.314.1171720897 tag=FULLDBBACKUP

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:07

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 00011 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.292.1148481713

channel ORA_DISK_1: restoring datafile 00012 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.288.1148481713

channel ORA_DISK_1: restoring datafile 00013 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.293.1148481713

channel ORA_DISK_1: restoring datafile 00014 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.291.1148481745

channel ORA_DISK_1: restoring datafile 00015 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.285.1148481747

channel ORA_DISK_1: restoring datafile 00016 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.284.1148481749

channel ORA_DISK_1: reading from backup piece +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_06_16/nnndf0_fulldbbackup_0.313.1171720899

channel ORA_DISK_1: piece handle=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_06_16/nnndf0_fulldbbackup_0.313.1171720899 tag=FULLDBBACKUP

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:03

Finished restore at 16-JUN-24

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

4 4 CDB 2265125454 CURRENT 7326604 16-JUN-24

3 3 CDB 2265125454 ORPHAN 7326802 16-JUN-24

RMAN> reset database to incarnation 2;

database reset to incarnation 2

RMAN> recover database;

Starting recover at 16-JUN-24

using channel ORA_DISK_1

starting media recovery

media recovery failed

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of recover command at 06/16/2024 02:31:00

ORA-00283: recovery session canceled due to errors

RMAN-11003: failure during parse/execution of SQL statement: alter database recover

if needed start until cancel using backup controlfile

ORA-00283: recovery session canceled due to errors

ORA-19912: cannot recover to target incarnation 2

RMAN> exit

----------------------新的控制文件回不去的---------------------------

Recovery Manager complete.

[oracle@rac1 ~]$ s

SQL*Plus: Release 19.0.0.0.0 - Production on Sun Jun 16 02:31: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> recover database using backup controlfile;

ORA-00283: recovery session canceled due to errors

ORA-19912: cannot recover to target incarnation 2

SQL> exit

Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.20.0.0.0

[oracle@rac1 ~]$ rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Sun Jun 16 02:32:10 2024

Version 19.20.0.0.0

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

connected to target database: CDB (DBID=2265125454, not open)

RMAN> startup nomount force;

restore controlfile from autobackup;

alter database mount;

list incarnation;

restore database;

Oracle instance started

Total System Global Area 2382361320 bytes

Fixed Size 9167592 bytes

Variable Size 805306368 bytes

Database Buffers 1560281088 bytes

Redo Buffers 7606272 bytes

RMAN>

Starting restore at 16-JUN-24

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=789 instance=cdb1 device type=DISK

recovery area destination: +DATA1

database name (or database unique name) used for search: CDB

channel ORA_DISK_1: AUTOBACKUP +DATA1/CDB/AUTOBACKUP/2024_06_16/s_1171765303.307.1171722103 found in the recovery area

channel ORA_DISK_1: looking for AUTOBACKUP on day: 20240616

channel ORA_DISK_1: restoring control file from AUTOBACKUP +DATA1/CDB/AUTOBACKUP/2024_06_16/s_1171765303.307.1171722103

channel ORA_DISK_1: 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 16-JUN-24

RMAN>

released channel: ORA_DISK_1

Statement processed

RMAN>

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

4 4 CDB 2265125454 CURRENT 7326604 16-JUN-24

3 3 CDB 2265125454 ORPHAN 7326802 16-JUN-24

RMAN>

Starting restore at 16-JUN-24

Starting implicit crosscheck backup at 16-JUN-24

allocated channel: ORA_DISK_1

Crosschecked 7 objects

Finished implicit crosscheck backup at 16-JUN-24

Starting implicit crosscheck copy at 16-JUN-24

using channel ORA_DISK_1

Finished implicit crosscheck copy at 16-JUN-24

searching for all files in the recovery area

cataloging files...

cataloging done

List of Cataloged Files

=======================

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_16/s_1171765303.307.1171722103

using channel ORA_DISK_1

skipping datafile 1; already restored to file +DATA/CDB/DATAFILE/system.275.1148478571

skipping datafile 3; already restored to file +DATA/CDB/DATAFILE/sysaux.263.1148478647

skipping datafile 4; already restored to file +DATA/CDB/DATAFILE/undotbs1.264.1148478683

skipping datafile 7; already restored to file +DATA/CDB/DATAFILE/users.269.1148478683

skipping datafile 9; already restored to file +DATA/CDB/DATAFILE/undotbs2.268.1148480549

skipping datafile 10; already restored to file +DATA/CDB/DATAFILE/undotbs3.262.1148480551

skipping datafile 5; already restored to file +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/system.272.1148480251

skipping datafile 6; already restored to file +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/sysaux.271.1148480251

skipping datafile 8; already restored to file +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/undotbs1.267.1148480251

skipping datafile 11; already restored to file +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.292.1148481713

skipping datafile 12; already restored to file +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.288.1148481713

skipping datafile 13; already restored to file +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.293.1148481713

skipping datafile 14; already restored to file +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.291.1148481745

skipping datafile 15; already restored to file +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.285.1148481747

skipping datafile 16; already restored to file +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.284.1148481749

restore not done; all files read only, offline, excluded, or already restored

Finished restore at 16-JUN-24

--------------恢复过了,有没有resetlogs 不需要恢复--------------

RMAN> reset database to incarnation 2;

database reset to incarnation 2从新的controlfile恢复过了,不可能回到2再去restore datafile

RMAN> restore database;

Starting restore at 16-JUN-24

using channel ORA_DISK_1

skipping datafile 1; already restored to file +DATA/CDB/DATAFILE/system.275.1148478571

skipping datafile 3; already restored to file +DATA/CDB/DATAFILE/sysaux.263.1148478647

skipping datafile 4; already restored to file +DATA/CDB/DATAFILE/undotbs1.264.1148478683

skipping datafile 7; already restored to file +DATA/CDB/DATAFILE/users.269.1148478683

skipping datafile 9; already restored to file +DATA/CDB/DATAFILE/undotbs2.268.1148480549

skipping datafile 10; already restored to file +DATA/CDB/DATAFILE/undotbs3.262.1148480551

skipping datafile 5; already restored to file +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/system.272.1148480251

skipping datafile 6; already restored to file +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/sysaux.271.1148480251

skipping datafile 8; already restored to file +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/undotbs1.267.1148480251

skipping datafile 11; already restored to file +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.292.1148481713

skipping datafile 12; already restored to file +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.288.1148481713

skipping datafile 13; already restored to file +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.293.1148481713

skipping datafile 14; already restored to file +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.291.1148481745

skipping datafile 15; already restored to file +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.285.1148481747

skipping datafile 16; already restored to file +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.284.1148481749

restore not done; all files read only, offline, excluded, or already restored

Finished restore at 16-JUN-24

RMAN> startup nomount force;

Oracle instance started

Total System Global Area 2382361320 bytes

Fixed Size 9167592 bytes

Variable Size 805306368 bytes

Database Buffers 1560281088 bytes

Redo Buffers 7606272 bytes

RMAN> restore controlfile from '+DATA1/CDB/AUTOBACKUP/2024_06_16/s_1171764106.297.1171720907'; 从最早的里面恢复ctrl

Starting restore at 16-JUN-24

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=31 instance=cdb1 device type=DISK

channel ORA_DISK_1: restoring control file

channel ORA_DISK_1: 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 16-JUN-24

RMAN> alter database mount;

list incarnation;

restore database;

released channel: ORA_DISK_1

Statement processed

RMAN>

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 CURRENT 1920977 26-SEP-23

RMAN>

Starting restore at 16-JUN-24

Starting implicit crosscheck backup at 16-JUN-24

allocated channel: ORA_DISK_1

Crosschecked 5 objects

Finished implicit crosscheck backup at 16-JUN-24

Starting implicit crosscheck copy at 16-JUN-24

using channel ORA_DISK_1

Finished implicit crosscheck copy at 16-JUN-24

searching for all files in the recovery area

cataloging files...

cataloging done

List of Cataloged Files

=======================

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_16/s_1171764106.297.1171720907

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_16/s_1171764787.275.1171721587

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_16/s_1171765303.307.1171722103

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_123.295.1171720971

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_124.294.1171720975

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_125.292.1171720977

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_126.287.1171720981

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_16/thread_1_seq_127.280.1171721577

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_16/thread_1_seq_126.281.1171721577

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_16/thread_2_seq_87.296.1171721577

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_16/thread_2_seq_88.289.1171721577

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_16/thread_3_seq_69.288.1171721577

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_16/thread_3_seq_68.259.1171721577

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_16/thread_1_seq_1.306.1171722095

using channel ORA_DISK_1

skipping datafile 1; already restored to file +DATA/CDB/DATAFILE/system.275.1148478571

skipping datafile 3; already restored to file +DATA/CDB/DATAFILE/sysaux.263.1148478647

skipping datafile 4; already restored to file +DATA/CDB/DATAFILE/undotbs1.264.1148478683

skipping datafile 7; already restored to file +DATA/CDB/DATAFILE/users.269.1148478683

skipping datafile 9; already restored to file +DATA/CDB/DATAFILE/undotbs2.268.1148480549

skipping datafile 10; already restored to file +DATA/CDB/DATAFILE/undotbs3.262.1148480551

skipping datafile 5; already restored to file +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/system.272.1148480251

skipping datafile 6; already restored to file +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/sysaux.271.1148480251

skipping datafile 8; already restored to file +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/undotbs1.267.1148480251

skipping datafile 11; already restored to file +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.292.1148481713

skipping datafile 12; already restored to file +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.288.1148481713

skipping datafile 13; already restored to file +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.293.1148481713

skipping datafile 14; already restored to file +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.291.1148481745

skipping datafile 15; already restored to file +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.285.1148481747

skipping datafile 16; already restored to file +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.284.1148481749

restore not done; all files read only, offline, excluded, or already restored

Finished restore at 16-JUN-24

RMAN> list incarnation; --看过文件就会把新的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

4 4 CDB 2265125454 CURRENT 7326604 16-JUN-24

3 3 CDB 2265125454 ORPHAN 7326802 16-JUN-24

RMAN> startup nomount force;

Oracle instance started

Total System Global Area 2382361320 bytes

Fixed Size 9167592 bytes

Variable Size 805306368 bytes

Database Buffers 1560281088 bytes

Redo Buffers 7606272 bytes

RMAN> restore controlfile from--看过文件就会把新的incarnation 加上,确认

'+DATA1/CDB/AUTOBACKUP/2024_06_16/s_1171764106.297.1171720907';

Starting restore at 16-JUN-24

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=30 instance=cdb1 device type=DISK

channel ORA_DISK_1: restoring control file

channel ORA_DISK_1: 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 16-JUN-24

RMAN> alter database mount;

list incarnation;

restore database;

released channel: ORA_DISK_1

Statement processed

RMAN>

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 CURRENT 1920977 26-SEP-23

RMAN>

Starting restore at 16-JUN-24

Starting implicit crosscheck backup at 16-JUN-24

allocated channel: ORA_DISK_1

Crosschecked 5 objects

Finished implicit crosscheck backup at 16-JUN-24

Starting implicit crosscheck copy at 16-JUN-24

using channel ORA_DISK_1

Finished implicit crosscheck copy at 16-JUN-24

searching for all files in the recovery area

cataloging files...

cataloging done

List of Cataloged Files

=======================

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_16/s_1171764106.297.1171720907

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_16/s_1171764787.275.1171721587

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_16/s_1171765303.307.1171722103

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_123.295.1171720971

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_124.294.1171720975

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_125.292.1171720977

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_126.287.1171720981

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_16/thread_1_seq_127.280.1171721577

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_16/thread_1_seq_126.281.1171721577

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_16/thread_2_seq_87.296.1171721577

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_16/thread_2_seq_88.289.1171721577

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_16/thread_3_seq_69.288.1171721577

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_16/thread_3_seq_68.259.1171721577

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_16/thread_1_seq_1.306.1171722095

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 +DATA/CDB/DATAFILE/system.275.1148478571

channel ORA_DISK_1: restoring datafile 00003 to +DATA/CDB/DATAFILE/sysaux.263.1148478647

channel ORA_DISK_1: restoring datafile 00004 to +DATA/CDB/DATAFILE/undotbs1.264.1148478683

channel ORA_DISK_1: restoring datafile 00007 to +DATA/CDB/DATAFILE/users.269.1148478683

channel ORA_DISK_1: restoring datafile 00009 to +DATA/CDB/DATAFILE/undotbs2.268.1148480549

channel ORA_DISK_1: restoring datafile 00010 to +DATA/CDB/DATAFILE/undotbs3.262.1148480551

channel ORA_DISK_1: reading from backup piece +DATA1/CDB/BACKUPSET/2024_06_16/nnndf0_fulldbbackup_0.314.1171720897

channel ORA_DISK_1: piece handle=+DATA1/CDB/BACKUPSET/2024_06_16/nnndf0_fulldbbackup_0.314.1171720897 tag=FULLDBBACKUP

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:07

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 00011 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.292.1148481713

channel ORA_DISK_1: restoring datafile 00012 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.288.1148481713

channel ORA_DISK_1: restoring datafile 00013 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.293.1148481713

channel ORA_DISK_1: restoring datafile 00014 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.291.1148481745

channel ORA_DISK_1: restoring datafile 00015 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.285.1148481747

channel ORA_DISK_1: restoring datafile 00016 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.284.1148481749

channel ORA_DISK_1: reading from backup piece +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_06_16/nnndf0_fulldbbackup_0.313.1171720899

channel ORA_DISK_1: piece handle=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_06_16/nnndf0_fulldbbackup_0.313.1171720899 tag=FULLDBBACKUP

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:03

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 00005 to +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/system.272.1148480251

channel ORA_DISK_1: restoring datafile 00006 to +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/sysaux.271.1148480251

channel ORA_DISK_1: restoring datafile 00008 to +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/undotbs1.267.1148480251

channel ORA_DISK_1: reading from backup piece +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/BACKUPSET/2024_06_16/nnndf0_fulldbbackup_0.258.1171720903

channel ORA_DISK_1: piece handle=+DATA1/CDB/0633F844101D69CBE0636401A8C09D55/BACKUPSET/2024_06_16/nnndf0_fulldbbackup_0.258.1171720903 tag=FULLDBBACKUP

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:03

Finished restore at 16-JUN-24

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

4 4 CDB 2265125454 CURRENT 7326604 16-JUN-24

3 3 CDB 2265125454 ORPHAN 7326802 16-JUN-24---又加上了

RMAN> exit

Recovery Manager complete.

[oracle@rac1 ~]$ s

SQL*Plus: Release 19.0.0.0.0 - Production on Sun Jun 16 02:37:42 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> recover database using backup controlfile;

ORA-00279: change 7326509 generated at 06/16/2024 02:01:36 needed for thread 1

ORA-00289: suggestion :

+DATA1/CDB/ARCHIVELOG/2024_06_16/thread_1_seq_122.305.1171720905

ORA-00280: change 7326509 for thread 1 is in sequence #122

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

+DATA1/CDB/ARCHIVELOG/2024_06_16/thread_1_seq_122.305.1171720905

ORA-00279: change 7326531 generated at 06/15/2024 14:01:45 needed for thread 1

ORA-00289: suggestion :

+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_123.295.1171720971

ORA-00280: change 7326531 for thread 1 is in sequence #123

ORA-00278: log file

'+DATA1/CDB/ARCHIVELOG/2024_06_16/thread_1_seq_122.305.1171720905' no longer

needed for this recovery

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

cancel

Media recovery cancelled.

SQL> alter database open resetlogs;

Database altered.

SQL> exit

Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.20.0.0.0

[oracle@rac1 ~]$ rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Sun Jun 16 02:38:26 2024

Version 19.20.0.0.0

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

connected to target database: CDB (DBID=2265125454)

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

5 5 CDB 2265125454 CURRENT 7326532 16-JUN-24

4 4 CDB 2265125454 ORPHAN 7326604 16-JUN-24

3 3 CDB 2265125454 ORPHAN 7326802 16-JUN-24

RMAN> exit

Recovery Manager complete.

[oracle@rac1 ~]$ s

SQL*Plus: Release 19.0.0.0.0 - Production on Sun Jun 16 02:39:13 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> alter session set container=PDB;

Session altered.

SQL> select count(*) from abc;

select count(*) from abc

*

ERROR at line 1:

ORA-00942: table or view does not exis

----表还是没有

SQL> exit

Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.20.0.0.0

[oracle@rac1 ~]$ rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Sun Jun 16 02:40:13 2024

Version 19.20.0.0.0

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

connected to target database: CDB (DBID=2265125454)

RMAN> startup nomount force;

restore controlfile from autobackup;

alter database mount;

list incarnation;

restore database;

Oracle instance started

Total System Global Area 2382361320 bytes

Fixed Size 9167592 bytes

Variable Size 805306368 bytes

Database Buffers 1560281088 bytes

Redo Buffers 7606272 bytes

RMAN>

Starting restore at 16-JUN-24

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=791 instance=cdb1 device type=DISK

recovery area destination: +DATA1

database name (or database unique name) used for search: CDB

channel ORA_DISK_1: AUTOBACKUP +DATA1/CDB/AUTOBACKUP/2024_06_16/s_1171766300.273.1171723101 found in the recovery area

channel ORA_DISK_1: looking for AUTOBACKUP on day: 20240616

channel ORA_DISK_1: restoring control file from AUTOBACKUP +DATA1/CDB/AUTOBACKUP/2024_06_16/s_1171766300.273.1171723101

channel ORA_DISK_1: 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 16-JUN-24

RMAN>

released channel: ORA_DISK_1

Statement processed

RMAN>

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

5 5 CDB 2265125454 CURRENT 7326532 16-JUN-24

-------7326532 小于7326802但是incarnation又大于3,用最新的ctrl恢复不来的

4 4 CDB 2265125454 ORPHAN 7326604 16-JUN-24

3 3 CDB 2265125454 ORPHAN 7326802 16-JUN-24

RMAN>

Starting restore at 16-JUN-24

Starting implicit crosscheck backup at 16-JUN-24

allocated channel: ORA_DISK_1

Crosschecked 8 objects

Finished implicit crosscheck backup at 16-JUN-24

Starting implicit crosscheck copy at 16-JUN-24

using channel ORA_DISK_1

Finished implicit crosscheck copy at 16-JUN-24

searching for all files in the recovery area

cataloging files...

cataloging done

List of Cataloged Files

=======================
File Name: +DATA1/CDB/AUTOBACKUP/2024_06_16/s_1171766300.273.1171723101

using channel ORA_DISK_1

skipping datafile 5; already restored to file +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.293.1171723049

skipping datafile 6; already restored to file +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.286.1171723049

skipping datafile 8; already restored to file +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.267.1171723049

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 +DATA/CDB/DATAFILE/system.262.1171723039

channel ORA_DISK_1: restoring datafile 00003 to +DATA/CDB/DATAFILE/sysaux.268.1171723039

channel ORA_DISK_1: restoring datafile 00004 to +DATA/CDB/DATAFILE/undotbs1.269.1171723039

channel ORA_DISK_1: restoring datafile 00007 to +DATA/CDB/DATAFILE/users.275.1171723039

channel ORA_DISK_1: restoring datafile 00009 to +DATA/CDB/DATAFILE/undotbs2.264.1171723039

channel ORA_DISK_1: restoring datafile 00010 to +DATA/CDB/DATAFILE/undotbs3.263.1171723039

channel ORA_DISK_1: reading from backup piece +DATA1/CDB/BACKUPSET/2024_06_16/nnndf0_fulldbbackup_0.314.1171720897

channel ORA_DISK_1: piece handle=+DATA1/CDB/BACKUPSET/2024_06_16/nnndf0_fulldbbackup_0.314.1171720897 tag=FULLDBBACKUP

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:07

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 00011 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.265.1171723045

channel ORA_DISK_1: restoring datafile 00012 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.284.1171723045

channel ORA_DISK_1: restoring datafile 00013 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.285.1171723045

channel ORA_DISK_1: restoring datafile 00014 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.291.1171723045

channel ORA_DISK_1: restoring datafile 00015 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.288.1171723045

channel ORA_DISK_1: restoring datafile 00016 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.292.1171723045

channel ORA_DISK_1: reading from backup piece +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_06_16/nnndf0_fulldbbackup_0.313.1171720899

channel ORA_DISK_1: piece handle=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_06_16/nnndf0_fulldbbackup_0.313.1171720899 tag=FULLDBBACKUP

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:03

Finished restore at 16-JUN-24

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

5 5 CDB 2265125454 CURRENT 7326532 16-JUN-24

4 4 CDB 2265125454 ORPHAN 7326604 16-JUN-24

3 3 CDB 2265125454 ORPHAN 7326802 16-JUN-24

RMAN> exit

Recovery Manager complete.

[oracle@rac1 ~]$ s

SQL*Plus: Release 19.0.0.0.0 - Production on Sun Jun 16 02:41:13 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> recover database using backup controlfile;

ORA-00279: change 7326509 generated at 06/16/2024 02:01:36 needed for thread 1

ORA-00289: suggestion :

+DATA1/CDB/ARCHIVELOG/2024_06_16/thread_1_seq_122.305.1171720905

ORA-00280: change 7326509 for thread 1 is in sequence #122

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

auto

ORA-00279: change 7326532 generated at 06/16/2024 02:38:11 needed for thread 1

ORA-00289: suggestion : +DATA1

ORA-00280: change 7326532 for thread 1 is in sequence #1

ORA-00278: log file

'+DATA1/CDB/ARCHIVELOG/2024_06_16/thread_1_seq_122.305.1171720905' no longer

needed for this recovery

ORA-00308: cannot open archived log '+DATA1'

ORA-17503: ksfdopn:2 Failed to open file +DATA1

ORA-15045: ASM file name '+DATA1' is not in reference form

SQL> exit

Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.20.0.0.0

[oracle@rac1 ~]$ rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Sun Jun 16 02:41:58 2024

Version 19.20.0.0.0

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

connected to target database: CDB (DBID=2265125454, not open)

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

5 5 CDB 2265125454 CURRENT 7326532 16-JUN-24

4 4 CDB 2265125454 ORPHAN 7326604 16-JUN-24

3 3 CDB 2265125454 ORPHAN 7326802 16-JUN-24

RMAN> reset database to incarnation 3;

database reset to incarnation 3

RMAN> recover database;

Starting recover at 16-JUN-24

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=791 instance=cdb1 device type=DISK

starting media recovery

media recovery failed

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of recover command at 06/16/2024 02:42:29

ORA-00283: recovery session canceled due to errors

RMAN-11003: failure during parse/execution of SQL statement: alter database recover

if needed start until cancel using backup controlfile

ORA-00283: recovery session canceled due to errors

ORA-19909: datafile 1 belongs to an orphan incarnation

ORA-01110: data file 1: '+DATA/CDB/DATAFILE/system.262.1171723039'

RMAN> reset database to incarnation 4;

database reset to incarnation 4

RMAN> recover database;

Starting recover at 16-JUN-24

using channel ORA_DISK_1

starting media recovery

media recovery failed

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of recover command at 06/16/2024 02:42:46

ORA-00283: recovery session canceled due to errors

RMAN-11003: failure during parse/execution of SQL statement: alter database recover

if needed start until cancel using backup controlfile

ORA-00283: recovery session canceled due to errors

ORA-19909: datafile 1 belongs to an orphan incarnation

ORA-01110: data file 1: '+DATA/CDB/DATAFILE/system.262.1171723039'

RMAN> startup nomount force;

restore controlfile from autobackup;

alter database mount;

list incarnation;

restore database;

Oracle instance started

Total System Global Area 2382361320 bytes

Fixed Size 9167592 bytes

Variable Size 805306368 bytes

Database Buffers 1560281088 bytes

Redo Buffers 7606272 bytes

RMAN>

Starting restore at 16-JUN-24

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=792 instance=cdb1 device type=DISK

recovery area destination: +DATA1

database name (or database unique name) used for search: CDB

channel ORA_DISK_1: AUTOBACKUP +DATA1/CDB/AUTOBACKUP/2024_06_16/s_1171766300.273.1171723101 found in the recovery area

channel ORA_DISK_1: looking for AUTOBACKUP on day: 20240616

channel ORA_DISK_1: restoring control file from AUTOBACKUP +DATA1/CDB/AUTOBACKUP/2024_06_16/s_1171766300.273.1171723101

channel ORA_DISK_1: 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 16-JUN-24

RMAN>

released channel: ORA_DISK_1

Statement processed

RMAN>

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

5 5 CDB 2265125454 CURRENT 7326532 16-JUN-24

4 4 CDB 2265125454 ORPHAN 7326604 16-JUN-24

3 3 CDB 2265125454 ORPHAN 7326802 16-JUN-24

RMAN>

Starting restore at 16-JUN-24

Starting implicit crosscheck backup at 16-JUN-24

allocated channel: ORA_DISK_1

Crosschecked 8 objects

Finished implicit crosscheck backup at 16-JUN-24

Starting implicit crosscheck copy at 16-JUN-24

using channel ORA_DISK_1

Finished implicit crosscheck copy at 16-JUN-24

searching for all files in the recovery area

cataloging files...

cataloging done

List of Cataloged Files

=======================

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_16/s_1171766300.273.1171723101

using channel ORA_DISK_1

skipping datafile 5; already restored to file +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.293.1171723049

skipping datafile 6; already restored to file +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.286.1171723049

skipping datafile 8; already restored to file +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.267.1171723049

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 +DATA/CDB/DATAFILE/system.262.1171723039

channel ORA_DISK_1: restoring datafile 00003 to +DATA/CDB/DATAFILE/sysaux.268.1171723039

channel ORA_DISK_1: restoring datafile 00004 to +DATA/CDB/DATAFILE/undotbs1.269.1171723039

channel ORA_DISK_1: restoring datafile 00007 to +DATA/CDB/DATAFILE/users.275.1171723039

channel ORA_DISK_1: restoring datafile 00009 to +DATA/CDB/DATAFILE/undotbs2.264.1171723039

channel ORA_DISK_1: restoring datafile 00010 to +DATA/CDB/DATAFILE/undotbs3.263.1171723039

channel ORA_DISK_1: reading from backup piece +DATA1/CDB/BACKUPSET/2024_06_16/nnndf0_fulldbbackup_0.314.1171720897

channel ORA_DISK_1: piece handle=+DATA1/CDB/BACKUPSET/2024_06_16/nnndf0_fulldbbackup_0.314.1171720897 tag=FULLDBBACKUP

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:08

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 00011 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.265.1171723045

channel ORA_DISK_1: restoring datafile 00012 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.284.1171723045

channel ORA_DISK_1: restoring datafile 00013 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.285.1171723045

channel ORA_DISK_1: restoring datafile 00014 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.291.1171723045

channel ORA_DISK_1: restoring datafile 00015 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.288.1171723045

channel ORA_DISK_1: restoring datafile 00016 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.292.1171723045

channel ORA_DISK_1: reading from backup piece +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_06_16/nnndf0_fulldbbackup_0.313.1171720899

channel ORA_DISK_1: piece handle=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_06_16/nnndf0_fulldbbackup_0.313.1171720899 tag=FULLDBBACKUP

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:03

Finished restore at 16-JUN-24

RMAN> reset database to incarnation 3;

database reset to incarnation 3

RMAN> recover database;

Starting recover at 16-JUN-24

using channel ORA_DISK_1

starting media recovery

media recovery failed

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of recover command at 06/16/2024 02:43:40

ORA-00283: recovery session canceled due to errors

RMAN-11003: failure during parse/execution of SQL statement: alter database recover

if needed start until cancel using backup controlfile

ORA-00283: recovery session canceled due to errors

ORA-19912: cannot recover to target incarnation 3

RMAN> reset database to incarnation 4;

database reset to incarnation 4

RMAN> recover database;

Starting recover at 16-JUN-24

using channel ORA_DISK_1

starting media recovery

media recovery failed

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of recover command at 06/16/2024 02:43:54

ORA-00283: recovery session canceled due to errors

RMAN-11003: failure during parse/execution of SQL statement: alter database recover

if needed start until cancel using backup controlfile

ORA-00283: recovery session canceled due to errors
ORA-19912: cannot recover to target incarnation 4

RMAN>

RMAN>

RMAN>

RMAN> 只有旧的controlfile 才能选之前的incarnation

RMAN>

RMAN>

RMAN>

RMAN>

RMAN>

RMAN>

RMAN>

RMAN>

RMAN> startup nomount force;

####restore controlfile from autobackup;

restore controlfile from '+DATA1/CDB/AUTOBACKUP/2024_06_16/s_1171764106.297.1171720907';

alter database mount;

list incarnation;

restore database;

Oracle instance started

Total System Global Area 2382361320 bytes

Fixed Size 9167592 bytes

Variable Size 805306368 bytes

Database Buffers 1560281088 bytes

Redo Buffers 7606272 bytes

RMAN> 2>

Starting restore at 16-JUN-24

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=791 instance=cdb1 device type=DISK

channel ORA_DISK_1: restoring control file

channel ORA_DISK_1: restore complete, elapsed time: 00:00:05

output file name=+DATA/CDB/CONTROLFILE/current.303.1148478735

output file name=+DATA/CDB/CONTROLFILE/current.289.1148478735

Finished restore at 16-JUN-24

RMAN>

released channel: ORA_DISK_1

Statement processed

RMAN>

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 CURRENT 1920977 26-SEP-23

RMAN> restore database;

Starting restore at 16-JUN-24

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 +DATA/CDB/DATAFILE/system.275.1148478571

channel ORA_DISK_1: restoring datafile 00003 to +DATA/CDB/DATAFILE/sysaux.263.1148478647

channel ORA_DISK_1: restoring datafile 00004 to +DATA/CDB/DATAFILE/undotbs1.264.1148478683

channel ORA_DISK_1: restoring datafile 00007 to +DATA/CDB/DATAFILE/users.269.1148478683

channel ORA_DISK_1: restoring datafile 00009 to +DATA/CDB/DATAFILE/undotbs2.268.1148480549

channel ORA_DISK_1: restoring datafile 00010 to +DATA/CDB/DATAFILE/undotbs3.262.1148480551

channel ORA_DISK_1: reading from backup piece +DATA1/CDB/BACKUPSET/2024_06_16/nnndf0_fulldbbackup_0.314.1171720897

channel ORA_DISK_1: piece handle=+DATA1/CDB/BACKUPSET/2024_06_16/nnndf0_fulldbbackup_0.314.1171720897 tag=FULLDBBACKUP

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:03

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 00011 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.292.1148481713

channel ORA_DISK_1: restoring datafile 00012 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.288.1148481713

channel ORA_DISK_1: restoring datafile 00013 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.293.1148481713

channel ORA_DISK_1: restoring datafile 00014 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.291.1148481745

channel ORA_DISK_1: restoring datafile 00015 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.285.1148481747

channel ORA_DISK_1: restoring datafile 00016 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.284.1148481749

channel ORA_DISK_1: reading from backup piece +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_06_16/nnndf0_fulldbbackup_0.313.1171720899

channel ORA_DISK_1: piece handle=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_06_16/nnndf0_fulldbbackup_0.313.1171720899 tag=FULLDBBACKUP

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:07

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 00005 to +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/system.272.1148480251

channel ORA_DISK_1: restoring datafile 00006 to +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/sysaux.271.1148480251

channel ORA_DISK_1: restoring datafile 00008 to +DATA/CDB/86B637B62FE07A65E053F706E80A27CA/DATAFILE/undotbs1.267.1148480251

channel ORA_DISK_1: reading from backup piece +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/BACKUPSET/2024_06_16/nnndf0_fulldbbackup_0.258.1171720903

channel ORA_DISK_1: piece handle=+DATA1/CDB/0633F844101D69CBE0636401A8C09D55/BACKUPSET/2024_06_16/nnndf0_fulldbbackup_0.258.1171720903 tag=FULLDBBACKUP

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:03

Finished restore at 16-JUN-24

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
5 5 CDB 2265125454 CURRENT 7326532 16-JUN-24

4 4 CDB 2265125454 ORPHAN 7326604 16-JUN-24

3 3 CDB 2265125454 ORPHAN 7326802 16-JUN-24

RMAN> reset database to incarnation 3;

-----由于是Incarnations2恢复的controlfile(上一次检查是只有两个 1,2 incarnation),虽然检查完数据后发现current是5,但是可以切换

database reset to incarnation 3----3的编号更大,7326802,曾经去过的最远

RMAN> recover database;

Starting recover at 16-JUN-24

using channel ORA_DISK_1

starting media recovery

archived log for thread 1 with sequence 122 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_16/thread_1_seq_122.305.1171720905

archived log for thread 1 with sequence 123 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_123.295.1171720971

archived log for thread 1 with sequence 124 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_124.294.1171720975

archived log for thread 1 with sequence 125 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_125.292.1171720977

archived log for thread 1 with sequence 126 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_126.287.1171720981

archived log for thread 1 with sequence 127 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_16/thread_1_seq_127.280.1171721577

archived log for thread 1 with sequence 1 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_16/thread_1_seq_1.306.1171722095

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_16/thread_1_seq_122.305.1171720905 thread=1 sequence=122

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_123.295.1171720971 thread=1 sequence=123

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_124.294.1171720975 thread=1 sequence=124

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_125.292.1171720977 thread=1 sequence=125

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_126.287.1171720981 thread=1 sequence=126

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_16/thread_1_seq_127.280.1171721577 thread=1 sequence=127

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_16/thread_1_seq_1.306.1171722095 thread=1 sequence=1

media recovery complete, elapsed time: 00:00:03

Finished recover at 16-JUN-24

RMAN> exit

-----不连续,

----ASM情况

ASMCMD> cd +DATA1/CDB/ARCHIVELOG/2024_06_16/

ASMCMD> ls

thread_1_seq_1.306.1171722095

thread_1_seq_121.316.1171720895

thread_1_seq_122.305.1171720905

thread_1_seq_126.281.1171721577
thread_1_seq_127.280.1171721577

thread_2_seq_87.296.1171721577

thread_2_seq_88.289.1171721577

thread_3_seq_68.259.1171721577

thread_3_seq_69.288.1171721577

ASMCMD> ls +DATA1/CDB/ARCHIVELOG/2024_06_15/thread_1_seq_123.295.1171720971

thread_1_seq_123.295.1171720971

ASMCMD> cd +DATA1/CDB/ARCHIVELOG/2024_06_15

ASMCMD> ls
thread_1_seq_123.295.1171720971
thread_1_seq_124.294.1171720975
thread_1_seq_125.292.1171720977
thread_1_seq_126.287.1171720981

SQL> exit

Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.20.0.0.0

[oracle@rac1 ~]$ s

SQL*Plus: Release 19.0.0.0.0 - Production on Sun Jun 16 02:47:15 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> alter database open resetlogs;

Database altered.

SQL> alter session set container=PDB;

Session altered.

SQL> SQL> select count(*) from abc;

COUNT(*)


73082

SQL>

相关推荐
小白学大数据2 分钟前
JavaScript重定向对网络爬虫的影响及处理
开发语言·javascript·数据库·爬虫
time never ceases23 分钟前
使用docker方式进行Oracle数据库的物理迁移(helowin/oracle_11g)
数据库·docker·oracle
Frank牛蛙27 分钟前
1.每日SQL----2024/11/7
数据库·sql
Ciderw29 分钟前
块存储、文件存储和对象存储详细介绍
网络·数据库·nvme·对象存储·存储·块存储·文件存储
薛晓刚30 分钟前
数据库优化指南:如何将基本功能运用到极致?
数据库
stars_User33 分钟前
MySQL数据库面试题(下)
数据库·mysql
未来之窗软件服务1 小时前
sql速度优化多条合并为一条语句
数据库
山东布谷科技官方1 小时前
布谷直播源码部署服务器关于数据库配置的详细说明
运维·服务器·数据库·直播系统源码·直播源码·直播系统搭建·直播软件开发
易云码1 小时前
信息安全建设方案,网络安全等保测评方案,等保技术解决方案,等保总体实施方案(Word原件)
数据库·物联网·安全·web安全·低代码
newxtc2 小时前
【客观理性深入讨论国产中间件及数据库-科创基础软件】
数据库·中间件·国产数据库·国产中间件·科创