reset database to incarnation rman 恢复最早的全备方法

核心

reset database to incarnation 7;

restore database until time "to_date('2024-06-01 20:24:16', 'yyyy-mm-dd:hh24:mi:ss')" preview summary;

restore database until time "to_date('2024-06-01 22:24:16', 'yyyy-mm-dd:hh24:mi:ss')" preview summary;

recover database until time "to_date('2024-03-01 22:24:16', 'yyyy-mm-dd:hh24:mi:ss')" preview summary;

run {

set until time "to_date('2024-03-01 22:24:16', 'yyyy-mm-dd:hh24:mi:ss')";

restore database;

recover database;

alter database open resetlogs;

}

run {

set until time "to_date('2024-02-03:15:19:16', 'yyyy-mm-dd:hh24:mi:ss')";

allocate channel dev1 type disk;

shutdown abort;

startup nomount;

restore controlfile;

alter database mount;

restore database;

recover database;

alter database open resetlogs;

}

run {

set until time "to_date('2024-06-01 18:24:16', 'yyyy-mm-dd:hh24:mi:ss')";

restore database;

recover database;

alter database open resetlogs;

}

list incarnation of database;

list incarnation;

reset database to incarnation 16;

restore spfile from '+data1/CDB/AUTOBACKUP/2024_02_03/s_1160005013.321.1159958213';

restore spfile from '+data1/CDB/AUTOBACKUP/2024_02_03/s_1160005013.321.1159958213';

run {

startup nomount;

restore controlfile from '+data1/CDB/AUTOBACKUP/2024_02_03/s_1160005013.321.1159958213';

startup mount;

set until time "to_date('2024-06-01 18:24:16', 'yyyy-mm-dd:hh24:mi:ss')";

reset database to incarnation 2;

SET DBID

RUN {

SET CONTROLFILE AUTOBACKUP FORMAT

FOR DEVICE TYPE DISK TO '+data1/CDB/AUTOBACKUP/2024_02_03/_%F';

RESTORE SPFILE FROM AUTOBACKUP;

}

export NLS_DATE_FORMAT='yyyymmdd hh24:mi:ss';

RMAN> run {

set until time "to_date('2024-06-01 18:07:16', 'yyyy-mm-dd:hh24:mi:ss')";

restore controlfile;

}

run {

set until time "to_date('2024-02-03:15:19:16', 'yyyy-mm-dd:hh24:mi:ss')";

allocate channel dev1 type disk;

shutdown abort;

startup nomount;

restore controlfile;

}

copy current controlfile to '/home/oracle/control01.ctl';

SQL> alter database backup controlfile to trace;

Database altered.

SQL> select *from v$diag_info;

alter system set cluster_database=true scope=spfile sid='*';

/u01/app/oracle/diag/rdbms/cdb/cdb1/trace/cdb1_ora_26312.trc

[oracle@rac1 trace]$ vi cdb1_dia0_26031_base_1.trc

catalog backuppiece '+data1/CDB/BACKUPSET/2024_02_03/annnf0_TAG20240203T233633_0.260.1159958193';

catalog backuppiece '+data1/CDB/BACKUPSET/2024_02_03/annnf0_TAG20240203T233652_0.320.1159958213';

catalog backuppiece '+data1/CDB/BACKUPSET/2024_02_03/nnndf0_TAG20240203T233636_0.314.1159958197';

CATALOG START WITH '+data1'; # catalog allfiles from an ASM disk group

restore controlfile from '+data1/CDB/BACKUPSET/2024_02_03/annnf0_TAG20240203T233633_0.260.1159958193';

restore controlfile from '+data1/CDB/BACKUPSET/2024_02_03/annnf0_TAG20240203T233652_0.320.1159958213';

restore controlfile from '+data1/CDB/BACKUPSET/2024_02_03/nnndf0_TAG20240203T233636_0.314.1159958197';

DECLARE

devtype varchar2(256);

done boolean;

BEGIN

devtype:=sys.dbms_backup_restore.deviceAllocate(type=>'',ident=>'T1');

sys.dbms_backup_restore.restoreSetDatafile;

sys.dbms_backup_restore.restoreControlfileTo(cfname=>'/home/oracle/ctrl1V804.ctl');

sys.dbms_backup_restore.restoreBackupPiece(done=>done,handle=>'+data1/CDB/BACKUPSET/2024_02_03/nnndf0_TAG20240203T233636_0.314.1159958197', params=>null);

sys.dbms_backup_restore.deviceDeallocate;

END;

/

DECLARE

v_dev varchar2(50); /* 设备类型 */

v_done boolean; /* 恢复(restore)完成标志 */

type t_fileTable is table of varchar2(255) index by binary_integer;

v_fileTable t_fileTable; /* 备份片的名字 */

v_maxPieces number:=1; /* 备份片的个数 */

BEGIN

/*首先定义可以用的备份片与备份片的个数 */

v_fileTable(1):='fulldb_s15_p1';

v_fileTable(2):='fulldb_s15_p2';

v_fileTable(3):='fulldb_s15_p3';

v_fileTable(4):='fulldb_s15_p4';

v_maxPieces:=4;

/*分配设备类型,如果是磁带,则是sbt_tape,如果是磁盘,则是null*/

v_dev:=sys.dbms_backup_restore.deviceAllocate(type=>null, ident=>'t1');

sys.dbms_backup_restore.restoreSetDatafile;

/*要恢复的控制文件路径与文件名称,文件名称要求正确*/

sys.dbms_backup_restore.restoreControlfileTo(cfname=>'/home/oracle/ctrl1V804.ctl');

/*开始恢复*/

FOR i IN 1..v_maxPieces LOOP

sys.dbms_backup_restore.restoreBackupPiece(done=>v_done,

handle=>v_fileTable(i),

params=>null);

IF v_done THEN

GOTO all_done;

END IF;

END LOOP;

<<all_done>>

/* 释放设备 */

sys.dbms_backup_restore.deviceDeallocate;

END;

/

RMAN> restore controlfile from '+data1/CDB/BACKUPSET/2024_02_03/annnf0_TAG20240203T233652_0.320.1159958213';

ORA-19626: backup set type is archived log - can not be processed by this conversation

RMAN> restore controlfile from '+data1/CDB/BACKUPSET/2024_02_03/nnndf0_TAG20240203T233636_0.314.1159958197';

SQL> alter system set cluster_database=FALSE scope=spfile sid='*';

RMAN> catalog backuppiece '+data1/CDB/BACKUPSET/2024_02_03/annnf0_TAG20240203T233652_0.320.1159958213';

catalog backuppiece '+data1/CDB/BACKUPSET/2024_02_03/nnndf0_TAG20240203T233636_0.314.1159958197';channel default: cataloged backup piece

backup piece handle=+DATA1/CDB/BACKUPSET/2024_02_03/annnf0_tag20240203t233652_0.320.1159958213 RECID=2 STAMP=1170598799

RMAN>

channel default: cataloged backup piece

backup piece handle=+DATA1/CDB/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.314.1159958197 RECID=3 STAMP=1170598800

RMAN> list backupset of database;

RMAN> CATALOG START WITH '+data1';

RMAN> CREATE CONTROLFILE REUSE DATABASE "CDB" RESETLOGS ARCHIVELOG

2> MAXLOGFILES 192

3> MAXLOGMEMBERS 3

4> MAXDATAFILES 1024

5> MAXINSTANCES 32

6> MAXLOGHISTORY 292

7> LOGFILE

8> GROUP 1 (

9> '+DATA/CDB/ONLINELOG/group_1.260.1170496145',

10> '+DATA1/CDB/ONLINELOG/group_1.356.1170496145'

11> ) SIZE 50M BLOCKSIZE 512,

12> GROUP 2 (

13> '+DATA/CDB/ONLINELOG/group_2.270.1170496145',

14> '+DATA1/CDB/ONLINELOG/group_2.350.1170496145'

15> ) SIZE 50M BLOCKSIZE 512,

16> GROUP 3 (

17> '+DATA/CDB/ONLINELOG/group_3.352.1170496145',

18> '+DATA1/CDB/ONLINELOG/group_3.506.1170496145'

19> ) SIZE 50M BLOCKSIZE 512,

20> GROUP 4 (

21> '+DATA/CDB/ONLINELOG/group_4.367.1170496145',

22> '+DATA1/CDB/ONLINELOG/group_4.387.1170496145'

23> ) SIZE 50M BLOCKSIZE 512,

24> GROUP 5 (

25> '+DATA/CDB/ONLINELOG/group_5.372.1170496145',

26> '+DATA1/CDB/ONLINELOG/group_5.431.1170496147'

27> ) SIZE 50M BLOCKSIZE 512,

28> GROUP 6 (

29> '+DATA/CDB/ONLINELOG/group_6.304.1170496147',

30> '+DATA1/CDB/ONLINELOG/group_6.401.1170496147'

31> ) SIZE 50M BLOCKSIZE 512

32> -- STANDBY LOGFILE

33> DATAFILE

34> '+DATA/CDB/DATAFILE/system.291.1170495997',

35> '+DATA/CDB/DATAFILE/sysaux.344.1170495997',

36> '+DATA/CDB/DATAFILE/undotbs1.277.1170495997',

37> '+DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.292.1170496007',

38> '+DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.288.1170496007',

39> '+DATA/CDB/DATAFILE/users.366.1170495997',

40> '+DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.350.1170496007',

41> '+DATA/CDB/DATAFILE/undotbs2.360.1170495997',

42> '+DATA/CDB/DATAFILE/undotbs3.302.1170495997',

43> '+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.337.1170496003',

44> '+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.359.1170496003',

45> '+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.279.1170496003',

46> '+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.272.1170496003',

47> '+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.309.1170496003',

48> '+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.293.1170496003'

49> CHARACTER SET AL32UTF8

50> ;

Statement processed

RMAN> CATALOG START WITH '+data1';

RMAN> reset database to incarnation 1;

database reset to incarnation 1

RMAN> run {

2> set until time "to_date('2024-03-01 22:24:16', 'yyyy-mm-dd:hh24:mi:ss')";

3> restore database;

4> recover database;

5> alter database open resetlogs;

6> }

SQL> alter system set cluster_database=true scope=spfile sid='*';

restore database until time "to_date('2019-01-04:10:19:16', 'yyyy-mm-dd:hh24:mi:ss')" preview summary;

export NLS_DATE_FORMAT='yyyymmdd hh24:mi:ss';

RMAN> run {

set until time "to_date('2024-06-01 18:07:16', 'yyyy-mm-dd:hh24:mi:ss')";

restore controlfile;

}

run {

set until time "to_date('2024-02-03:15:19:16', 'yyyy-mm-dd:hh24:mi:ss')";

allocate channel dev1 type disk;

shutdown abort;

startup nomount;

restore controlfile;

}

run {

set until time "to_date('2024-02-03:15:19:16', 'yyyy-mm-dd:hh24:mi:ss')";

allocate channel dev1 type disk;

shutdown abort;

startup nomount;

restore controlfile;

alter database mount;

restore database;

recover database;

alter database open resetlogs;

}

run {

set until time "to_date('2024-06-01 18:24:16', 'yyyy-mm-dd:hh24:mi:ss')";

restore database;

recover database;

alter database open resetlogs;

}

list incarnation of database;

list incarnation;

reset database to incarnation 2;

restore spfile from '+data1/CDB/AUTOBACKUP/2024_02_03/s_1160005013.321.1159958213';

restore spfile from '+data1/CDB/AUTOBACKUP/2024_02_03/s_1160005013.321.1159958213';

run {

startup nomount;

restore controlfile from '+data1/CDB/AUTOBACKUP/2024_02_03/s_1160005013.321.1159958213';

startup mount;

set until time "to_date('2024-06-01 18:24:16', 'yyyy-mm-dd:hh24:mi:ss')";

reset database to incarnation 2;

run {

set until time "to_date('2024-06-01 18:24:16', 'yyyy-mm-dd:hh24:mi:ss')";

restore database;

recover database;

alter database open resetlogs;

}

SET DBID

RUN {

SET CONTROLFILE AUTOBACKUP FORMAT

FOR DEVICE TYPE DISK TO '+data1/CDB/AUTOBACKUP/2024_02_03/_%F';

RESTORE SPFILE FROM AUTOBACKUP;

}

---------- 基于时间点的恢复

RMAN> list incarnation of database;

List of Database Incarnations

DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time


1 1 CDB 2265125454 PARENT 1 20190417 00:55:59

2 2 CDB 2265125454 PARENT 1920977 20230926 01:52:18

3 3 CDB 2265125454 ORPHAN 7341211 20240526 16:15:06

5 5 CDB 2265125454 PARENT 7341211 20240601 17:08:26

4 4 CDB 2265125454 ORPHAN 7386359 20240526 17:32:32

6 6 CDB 2265125454 PARENT 7577543 20240601 17:51:39

7 7 CDB 2265125454 PARENT 7579485 20240601 17:56:11

8 8 CDB 2265125454 PARENT 7579486 20240601 18:02:46

9 9 CDB 2265125454 CURRENT 7579487 20240601 20:23:19

RMAN> run {

2> set until time "to_date('2024-06-01 18:07:16', 'yyyy-mm-dd:hh24:mi:ss')";

3> restore database;

4> recover database;

5> alter database open resetlogs;

6> }

executing command: SET until clause

Starting restore at 20240601 20:24:10

allocated channel: ORA_DISK_1

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

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

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

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

RMAN-03002: failure of restore command at 06/01/2024 20:24:10

RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time

------------超过了resetlogs时间

RMAN> list incarnation of database;

List of Database Incarnations

DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time


1 1 CDB 2265125454 PARENT 1 20190417 00:55:59

2 2 CDB 2265125454 PARENT 1920977 20230926 01:52:18

3 3 CDB 2265125454 ORPHAN 7341211 20240526 16:15:06

5 5 CDB 2265125454 PARENT 7341211 20240601 17:08:26

4 4 CDB 2265125454 ORPHAN 7386359 20240526 17:32:32

6 6 CDB 2265125454 PARENT 7577543 20240601 17:51:39

7 7 CDB 2265125454 PARENT 7579485 20240601 17:56:11

8 8 CDB 2265125454 PARENT 7579486 20240601 18:02:46

9 9 CDB 2265125454 CURRENT 7579487 20240601 20:23:19

run {

set until time "to_date('2024-06-01 20:24:16', 'yyyy-mm-dd:hh24:mi:ss')";

restore database;

recover database;

alter database open resetlogs;

}

executing command: SET until clause

Starting restore at 20240601 20:25:08

using channel ORA_DISK_1

skipping datafile 1; already restored to file +DATA/CDB/DATAFILE/system.350.1170479195

skipping datafile 10; already restored to file +DATA/CDB/DATAFILE/undotbs3.265.1170479195

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

skipping datafile 16; already restored to file +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.267.1170479209

restore not done; all files read only, offline, excluded, or already restored

Finished restore at 20240601 20:25:09

Starting recover at 20240601 20:25:09

using channel ORA_DISK_1

starting media recovery

archived log for thread 1 with sequence 117 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_117.379.1170481445

archived log for thread 1 with sequence 1 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_1.382.1170482171

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_117.379.1170481445 thread=1 sequence=117

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_90.422.1170479291 thread=2 sequence=90

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_68.751.1170479291 thread=3 sequence=68

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

Finished recover at 20240601 20:25:20

Statement processed

RMAN>

RMAN>

RMAN>

RMAN> exit

Recovery Manager complete.

[oracle@rac1 ~]$ s

SQL> select * from dual;

D

X

------------------如果超前恢复,需要恢复控制文件

RMAN> reset database to incarnation 8;

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

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

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

RMAN-03009: failure of reset database command on default channel at 06/01/2024 20:29:15

ORA-19910: can not change recovery target incarnation in control file

RMAN> reset database to incarnation 6;

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

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

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

RMAN-03009: failure of reset database command on default channel at 06/01/2024 20:29:28

ORA-19910: can not change recovery target incarnation in control file

RMAN> startup mount force;

Oracle instance started

database mounted

Total System Global Area 2382361320 bytes

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 20190417 00:55:59

2 2 CDB 2265125454 PARENT 1920977 20230926 01:52:18

3 3 CDB 2265125454 ORPHAN 7341211 20240526 16:15:06

5 5 CDB 2265125454 PARENT 7341211 20240601 17:08:26

4 4 CDB 2265125454 ORPHAN 7386359 20240526 17:32:32

6 6 CDB 2265125454 PARENT 7577543 20240601 17:51:39

7 7 CDB 2265125454 PARENT 7579485 20240601 17:56:11

8 8 CDB 2265125454 PARENT 7579486 20240601 18:02:46

9 9 CDB 2265125454 PARENT 7579487 20240601 20:23:19

10 10 CDB 2265125454 CURRENT 7581612 20240601 20:25:20

RMAN> reset database to incarnation 8;

database reset to incarnation 8

RMAN> run {

2> set until time "to_date('2024-06-01 18:24:16', 'yyyy-mm-dd:hh24:mi:ss')";

3> restore database;

4> recover database;

5> alter database open resetlogs;

6> }

executing command: SET until clause

Starting restore at 20240601 20:31:35

allocated channel: ORA_DISK_1

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

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

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

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

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: reading from backup piece +DATA1/CDB/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.314.1159958197

channel ORA_DISK_1: piece handle=+DATA1/CDB/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.314.1159958197 tag=TAG20240203T233636

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: reading from backup piece +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.315.1159958205

Starting recover at 20240601 20:32:08

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/01/2024 20:32:09

ORA-00283: recovery session canceled due to errors

RMAN-11003: failure during parse/execution of SQL statement: alter database recover

if needed start until time '2024/06/01 18:24:16'

ORA-00283: recovery session canceled due to errors
ORA-19912: cannot recover to target incarnation 8

RMAN>

-----恢复控制文件

RMAN> run {

2> set until time "to_date('2024-06-01 18:07:16', 'yyyy-mm-dd:hh24:mi:ss')";

3> restore controlfile;

4> }

executing command: SET until clause

Starting restore at 20240601 20:37:28

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

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

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

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

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

RMAN-03002: failure of restore command at 06/01/2024 20:37:29

ORA-01507: database not mounted

RMAN> SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '+data1/CDB/AUTOBACKUP/2024_02_03/%F';

executing command: SET CONTROLFILE AUTOBACKUP FORMAT

RMAN> restore controlfile;

Starting restore at 20240601 20:49:18

using channel ORA_DISK_1

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

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

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

RMAN-03002: failure of restore command at 06/01/2024 20:49:18

RMAN-06563: control file or SPFILE must be restored using FROM AUTOBACKUP

RMAN> restore controlfile from autobackup;

Starting restore at 20240601 20:49:31

using channel ORA_DISK_1

recovery area destination: +DATA1

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

channel ORA_DISK_1: AUTOBACKUP +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170534343.468.1170491145 found in the recovery area

AUTOBACKUP search with format "+data1/CDB/AUTOBACKUP/2024_02_03/%F" not attempted because DBID was not set

channel ORA_DISK_1: restoring control file from AUTOBACKUP +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170534343.468.1170491145

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 20240601 20:49:38

RMAN> set dbid=1148478735;

executing command: SET DBID

RMAN> restore controlfile from autobackup;

Starting restore at 20240601 20:50:24

using channel ORA_DISK_1

recovery area destination: +DATA1

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

channel ORA_DISK_1: AUTOBACKUP +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170534343.468.1170491145 found in the recovery area

channel ORA_DISK_1: looking for AUTOBACKUP on day: 20240601

channel ORA_DISK_1: restoring control file from AUTOBACKUP +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170534343.468.1170491145

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 20240601 20:50:25

RMAN>


RMAN> set dbid=1148478735;--设置错误也可以? 没有= ?

executing command: SET DBID

RMAN> restore controlfile from autobackup;

Starting restore at 20240601 20:50:24

using channel ORA_DISK_1

recovery area destination: +DATA1

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

channel ORA_DISK_1: AUTOBACKUP +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170534343.468.1170491145 found in the recovery area

channel ORA_DISK_1: looking for AUTOBACKUP on day: 20240601

channel ORA_DISK_1: restoring control file from AUTOBACKUP +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170534343.468.1170491145

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 20240601 20:50:25

RMAN> list incarnation of database;

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

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

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

RMAN-03002: failure of list command at 06/01/2024 20:51:01

ORA-01507: database not mounted

RMAN> alter database mount;

released channel: ORA_DISK_1

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

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

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

RMAN-03002: failure of sql statement command at 06/01/2024 20:51:15

RMAN-06189: current DBID 1148478735 does not match target mounted database (2265125454)

RMAN> list incarnation of database;

List of Database Incarnations

DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time


1 1 CDB 2265125454 PARENT 1 20190417 00:55:59

2 2 CDB 2265125454 PARENT 1920977 20230926 01:52:18

3 3 CDB 2265125454 ORPHAN 7341211 20240526 16:15:06

5 5 CDB 2265125454 PARENT 7341211 20240601 17:08:26

4 4 CDB 2265125454 ORPHAN 7386359 20240526 17:32:32

6 6 CDB 2265125454 PARENT 7577543 20240601 17:51:39

7 7 CDB 2265125454 PARENT 7579485 20240601 17:56:11

8 8 CDB 2265125454 PARENT 7579486 20240601 18:02:46

9 9 CDB 2265125454 PARENT 7579487 20240601 20:23:19

10 10 CDB 2265125454 CURRENT 7581612 20240601 20:25:20

RMAN> set dbid=2265125454;

executing command: SET DBID

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

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

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

RMAN-03002: failure of set command at 06/01/2024 20:51:36

RMAN-06188: cannot use command when connected to a mounted target database

RMAN> shutdown abort

Oracle instance shut down

RMAN> set dbid=2265125454;

executing command: SET DBID

RMAN> startup mount;

connected to target database (not started)

Oracle instance started

database mounted

Total System Global Area 2382361320 bytes

Fixed Size 9167592 bytes

Variable Size 1224736768 bytes

Database Buffers 1140850688 bytes

Redo Buffers 7606272 bytes

RMAN> list incarnation of database;

List of Database Incarnations

DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time


1 1 CDB 2265125454 PARENT 1 20190417 00:55:59

2 2 CDB 2265125454 PARENT 1920977 20230926 01:52:18

3 3 CDB 2265125454 ORPHAN 7341211 20240526 16:15:06

5 5 CDB 2265125454 PARENT 7341211 20240601 17:08:26

4 4 CDB 2265125454 ORPHAN 7386359 20240526 17:32:32

6 6 CDB 2265125454 PARENT 7577543 20240601 17:51:39

7 7 CDB 2265125454 PARENT 7579485 20240601 17:56:11

8 8 CDB 2265125454 PARENT 7579486 20240601 18:02:46

9 9 CDB 2265125454 PARENT 7579487 20240601 20:23:19

10 10 CDB 2265125454 CURRENT 7581612 20240601 20:25:20

RMAN>

----应该错了, restore controlfile from autobackup; 后应该看不到新的incarnation

RMAN> shutdown abort

Oracle instance shut down

RMAN> startup nomount;

connected to target database (not started)

Oracle instance started

Total System Global Area 2382361320 bytes

Fixed Size 9167592 bytes

Variable Size 1224736768 bytes

Database Buffers 1140850688 bytes

Redo Buffers 7606272 bytes

RMAN> restore controlfile from '+data1/CDB/AUTOBACKUP/2024_02_03/s_1160005013.321.1159958213';

Starting restore at 20240601 20:53:40

allocated channel: ORA_DISK_1

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

channel ORA_DISK_1: restoring control file

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

output file name=+DATA/CDB/CONTROLFILE/current.303.1148478735

output file name=+DATA/CDB/CONTROLFILE/current.289.1148478735

Finished restore at 20240601 20:53:42

RMAN> alter database mount;

released channel: ORA_DISK_1

Statement processed

RMAN> list incarnation of database;

List of Database Incarnations

DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time


1 1 CDB 2265125454 PARENT 1 20190417 00:55:59

2 2 CDB 2265125454 CURRENT 1920977 20230926 01:52:18

RMAN>

RMAN> run {

2> set until time "to_date('2024-06-01 18:24:16', 'yyyy-mm-dd:hh24:mi:ss')";

3> restore database;

4> recover database;

5> alter database open resetlogs;

6> }

executing command: SET until clause

Starting restore at 20240601 20:54:41

Starting implicit crosscheck backup at 20240601 20:54:41

allocated channel: ORA_DISK_1

Crosschecked 5 objects

Finished implicit crosscheck backup at 20240601 20:54:41

Starting implicit crosscheck copy at 20240601 20:54:41

using channel ORA_DISK_1

Finished implicit crosscheck copy at 20240601 20:54:41

searching for all files in the recovery area

cataloging files...

cataloging done

List of Cataloged Files

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

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_90.422.1170479291

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_1.428.1170479311

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_68.751.1170479291

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_1.274.1170479311

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_1.504.1170479465

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_2.470.1170480437

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_2.447.1170480437

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_3.403.1170480437

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_2.398.1170480439

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_3.391.1170481337

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_117.379.1170481445

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_3.497.1170481899

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_2.421.1170481901

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_3.419.1170481901

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_2.413.1170481901

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_3.417.1170481901

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_2.401.1170481901

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_1.382.1170482171

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_1.367.1170482567

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_1.439.1170490999

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_1.441.1170491121

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170522520.750.1170479321

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170525123.402.1170481925

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170525380.374.1170482181

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170525776.362.1170482577

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170534209.440.1170491011

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170534343.468.1170491145

File Name: +DATA1/CDB/AUTOBACKUP/2024_05_26/s_1170000915.746.1169957715

File Name: +DATA1/CDB/AUTOBACKUP/2024_05_26/s_1170005562.412.1169962363

File Name: +DATA1/CDB/AUTOBACKUP/2024_04_20/s_1166779737.317.1166779737

File Name: +DATA1/CDB/AUTOBACKUP/2024_02_03/s_1160005013.321.1159958213

using channel ORA_DISK_1

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

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

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

RMAN-03002: failure of restore command at 06/01/2024 20:54:42

RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time

-----默认用了最新的,所以时间超前了

RMAN> list incarnation of database;

List of Database Incarnations

DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time


1 1 CDB 2265125454 PARENT 1 20190417 00:55:59

2 2 CDB 2265125454 PARENT 1920977 20230926 01:52:18

3 3 CDB 2265125454 PARENT 7341211 20240601 17:08:26

9 9 CDB 2265125454 ORPHAN 7341211 20240526 16:15:06

10 10 CDB 2265125454 ORPHAN 7386359 20240526 17:32:32

4 4 CDB 2265125454 PARENT 7577543 20240601 17:51:39

5 5 CDB 2265125454 PARENT 7579485 20240601 17:56:11

6 6 CDB 2265125454 PARENT 7579486 20240601 18:02:46

7 7 CDB 2265125454 PARENT 7579487 20240601 20:23:19

8 8 CDB 2265125454 CURRENT 7581612 20240601 20:25:20

RMAN> reset database to incarnation 3;

-----这个时间恢复不了,因为17:08:26-8:24:16 resetlogs多次了

database reset to incarnation 3

RMAN> run {

2> set until time "to_date('2024-06-01 18:24:16', 'yyyy-mm-dd:hh24:mi:ss')";

3> restore database;

4> recover database;

5> alter database open resetlogs;

6> }

executing command: SET until clause

Starting restore at 20240601 20:56:46

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.294.1170492947

channel ORA_DISK_1: restoring datafile 00003 to +DATA/CDB/DATAFILE/sysaux.259.1170492947

channel ORA_DISK_1: restoring datafile 00004 to +DATA/CDB/DATAFILE/undotbs1.260.1170492947

channel ORA_DISK_1: restoring datafile 00007 to +DATA/CDB/DATAFILE/users.302.1170492947

channel ORA_DISK_1: restoring datafile 00009 to +DATA/CDB/DATAFILE/undotbs2.270.1170492947

channel ORA_DISK_1: restoring datafile 00010 to +DATA/CDB/DATAFILE/undotbs3.301.1170492947

channel ORA_DISK_1: reading from backup piece +DATA1/CDB/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.314.1159958197

channel ORA_DISK_1: piece handle=+DATA1/CDB/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.314.1159958197 tag=TAG20240203T233636

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_02_03/nnndf0_tag20240203t233636_0.315.1159958205

channel ORA_DISK_1: piece handle=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.315.1159958205 tag=TAG20240203T233636

channel ORA_DISK_1: restored backup piece 1

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

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_02_03/nnndf0_tag20240203t233636_0.316.1159958207

channel ORA_DISK_1: piece handle=+DATA1/CDB/0633F844101D69CBE0636401A8C09D55/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.316.1159958207 tag=TAG20240203T233636

channel ORA_DISK_1: restored backup piece 1

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

Finished restore at 20240601 20:57:11

Starting recover at 20240601 20:57:11

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/01/2024 20:57:12

ORA-00283: recovery session canceled due to errors

RMAN-11003: failure during parse/execution of SQL statement: alter database recover

if needed start until time '2024/06/01 18:24:16' using backup controlfile

ORA-00283: recovery session canceled due to errors

ORA-19912: cannot recover to target incarnation 3

RMAN> exit

Recovery Manager complete.

[oracle@rac1 ~]$ s

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Jun 1 20:58:25 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 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 Sat Jun 1 20:58:50 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 of database;

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 20190417 00:55:59

2 2 CDB 2265125454 PARENT 1920977 20230926 01:52:18

3 3 CDB 2265125454 CURRENT 7341211 20240601 17:08:26

9 9 CDB 2265125454 ORPHAN 7341211 20240526 16:15:06

10 10 CDB 2265125454 ORPHAN 7386359 20240526 17:32:32

4 4 CDB 2265125454 ORPHAN 7577543 20240601 17:51:39

5 5 CDB 2265125454 ORPHAN 7579485 20240601 17:56:11

6 6 CDB 2265125454 ORPHAN 7579486 20240601 18:02:46

7 7 CDB 2265125454 ORPHAN 7579487 20240601 20:23:19

8 8 CDB 2265125454 ORPHAN 7581612 20240601 20:25:20

RMAN> reset database to incarnation 2;

database reset to incarnation 2

RMAN> run {

2> set until time "to_date('2024-06-01 18:24:16', 'yyyy-mm-dd:hh24:mi:ss')";

3> restore database;

4> recover database;

5> alter database open resetlogs;

6> }

executing command: SET until clause

Starting restore at 20240601 20:59:45

allocated channel: ORA_DISK_1

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

skipping datafile 1; already restored to file +DATA/CDB/DATAFILE/system.267.1170493007

skipping datafile 3; already restored to file +DATA/CDB/DATAFILE/sysaux.271.1170493007

skipping datafile 4; already restored to file +DATA/CDB/DATAFILE/undotbs1.272.1170493007

skipping datafile 7; already restored to file +DATA/CDB/DATAFILE/users.360.1170493007

skipping datafile 9; already restored to file +DATA/CDB/DATAFILE/undotbs2.279.1170493007

skipping datafile 10; already restored to file +DATA/CDB/DATAFILE/undotbs3.359.1170493007

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

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

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

skipping datafile 11; already restored to file +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.262.1170493013

skipping datafile 12; already restored to file +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.288.1170493013

skipping datafile 13; already restored to file +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.292.1170493013

skipping datafile 14; already restored to file +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.293.1170493015

skipping datafile 15; already restored to file +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.275.1170493015

skipping datafile 16; already restored to file +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.302.1170493015

restore not done; all files read only, offline, excluded, or already restored

Finished restore at 20240601 20:59:45

Starting recover at 20240601 20:59:45

using channel ORA_DISK_1

starting media recovery

archived log for thread 1 with sequence 117 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_117.379.1170481445

archived log for thread 2 with sequence 90 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_90.422.1170479291

archived log for thread 3 with sequence 68 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_68.751.1170479291

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_117.379.1170481445 thread=1 sequence=117

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_90.422.1170479291 thread=2 sequence=90

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_68.751.1170479291 thread=3 sequence=68

unable to find archived log

archived log thread=1 sequence=118

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

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

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

RMAN-03002: failure of recover command at 06/01/2024 20:59:47

RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 118 and starting SCN of 7341210

RMAN> alter database open resetlogs;

Statement processed

RMAN>

-----恢复成功,此时应该不是incarnation 2了,

----完整恢复-----

RMAN> shutdown abort

Oracle instance shut down

RMAN> run {

2> startup nomount;

3> restore controlfile from '+data1/CDB/AUTOBACKUP/2024_02_03/s_1160005013.321.1159958213';

4> startup mount;

5> set until time "to_date('2024-06-01 18:24:16', 'yyyy-mm-dd:hh24:mi:ss')";

6> reset database to incarnation 2;

7> set until time "to_date('2024-06-01 18:24:16', 'yyyy-mm-dd:hh24:mi:ss')";

8> restore database;

9> recover database;

10> alter database open resetlogs;

11> }

connected to target database (not started)

Oracle instance started

Total System Global Area 2382361320 bytes

Fixed Size 9167592 bytes

Variable Size 1224736768 bytes

Database Buffers 1140850688 bytes

Redo Buffers 7606272 bytes

Starting restore at 20240601 21:08:27

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:06

output file name=+DATA/CDB/CONTROLFILE/current.303.1148478735

output file name=+DATA/CDB/CONTROLFILE/current.289.1148478735

Finished restore at 20240601 21:08:33

database is already started

database mounted

released channel: ORA_DISK_1

executing command: SET until clause

Starting implicit crosscheck backup at 20240601 21:08:38

allocated channel: ORA_DISK_1

Crosschecked 5 objects

Finished implicit crosscheck backup at 20240601 21:08:38

Starting implicit crosscheck copy at 20240601 21:08:38

using channel ORA_DISK_1

Finished implicit crosscheck copy at 20240601 21:08:38

searching for all files in the recovery area

cataloging files...

cataloging done

List of Cataloged Files

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

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_90.422.1170479291

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_1.428.1170479311

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_68.751.1170479291

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_1.274.1170479311

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_1.504.1170479465

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_2.470.1170480437

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_2.447.1170480437

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_3.403.1170480437

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_2.398.1170480439

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_3.391.1170481337

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_117.379.1170481445

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_3.497.1170481899

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_2.421.1170481901

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_3.419.1170481901

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_2.413.1170481901

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_3.417.1170481901

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_2.401.1170481901

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_1.382.1170482171

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_1.367.1170482567

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_1.439.1170490999

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_1.441.1170491121

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_1.505.1170493203

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_1.506.1170493203

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_1.532.1170493305

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_2.536.1170493305

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_3.537.1170493305

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_4.540.1170493305

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_2.323.1170493307

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170522520.750.1170479321

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170525123.402.1170481925

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170525380.374.1170482181

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170525776.362.1170482577

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170534209.440.1170491011

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170534343.468.1170491145

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170536408.507.1170493209

File Name: +DATA1/CDB/AUTOBACKUP/2024_05_26/s_1170000915.746.1169957715

File Name: +DATA1/CDB/AUTOBACKUP/2024_05_26/s_1170005562.412.1169962363

File Name: +DATA1/CDB/AUTOBACKUP/2024_04_20/s_1166779737.317.1166779737

File Name: +DATA1/CDB/AUTOBACKUP/2024_02_03/s_1160005013.321.1159958213

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

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

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

RMAN-03002: failure of reset database command at 06/01/2024 21:08:39

RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time

RMAN>

RMAN> reset database to incarnation 2;

database reset to incarnation 2

RMAN> run {

2> set until time "to_date('2024-06-01 18:24:16', 'yyyy-mm-dd:hh24:mi:ss')";

3> restore database;

4> recover database;

5> alter database open resetlogs;

6> }

executing command: SET until clause

Starting restore at 20240601 21:09:27

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_02_03/nnndf0_tag20240203t233636_0.314.1159958197

channel ORA_DISK_1: piece handle=+DATA1/CDB/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.314.1159958197 tag=TAG20240203T233636

channel ORA_DISK_1: restored backup piece 1

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

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_02_03/nnndf0_tag20240203t233636_0.315.1159958205

channel ORA_DISK_1: piece handle=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.315.1159958205 tag=TAG20240203T233636

channel ORA_DISK_1: restored backup piece 1

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

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_02_03/nnndf0_tag20240203t233636_0.316.1159958207

channel ORA_DISK_1: piece handle=+DATA1/CDB/0633F844101D69CBE0636401A8C09D55/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.316.1159958207 tag=TAG20240203T233636

channel ORA_DISK_1: restored backup piece 1

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

Finished restore at 20240601 21:10:12

Starting recover at 20240601 21:10:13

using channel ORA_DISK_1

starting media recovery

archived log for thread 1 with sequence 117 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_117.379.1170481445

archived log for thread 2 with sequence 90 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_90.422.1170479291

archived log for thread 3 with sequence 68 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_68.751.1170479291

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_117.379.1170481445 thread=1 sequence=117

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_90.422.1170479291 thread=2 sequence=90

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_68.751.1170479291 thread=3 sequence=68

unable to find archived log

archived log thread=1 sequence=118

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

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

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

RMAN-03002: failure of recover command at 06/01/2024 21:10:14

RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 118 and starting SCN of 7341210

RMAN>

RMAN>

RMAN> alter database open resetlogs;

Statement processed

RMAN>

RMAN> list backup of database summary;

List of Backups

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

Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag


15 B F A DISK 20240203 23:36:41 1 1 NO TAG20240203T233636

16 B F A DISK 20240203 23:36:45 1 1 NO TAG20240203T233636

17 B F A DISK 20240203 23:36:48 1 1 NO TAG20240203T233636

---------------恢复到FULL BACKUP 备份之前也是不可能的

RMAN> shutdown abort

RMAN> startup nomount;

connected to target database (not started)

Oracle instance started

Total System Global Area 2382361320 bytes

Fixed Size 9167592 bytes

Variable Size 1224736768 bytes

Database Buffers 1140850688 bytes

Redo Buffers 7606272 bytes

RMAN> restore controlfile from '+data1/CDB/AUTOBACKUP/2024_02_03/s_1160005013.321.1159958213';

Starting restore at 20240601 21:22:46

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 20240601 21:22:47

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 20190417 00:55:59

2 2 CDB 2265125454 CURRENT 1920977 20230926 01:52:18

RMAN>

RMAN>

RMAN>

RMAN>

RMAN>

RMAN>

RMAN> run {

set until time "to_date('2024-02-05 15:19:16', 'yyyy-mm-dd:hh24:mi:ss')";

restore database;

recover database;

alter database open resetlogs;

}

executing command: SET until clause

Starting restore at 20240601 21:23:35

Starting implicit crosscheck backup at 20240601 21:23:35

allocated channel: ORA_DISK_1

Crosschecked 5 objects

Finished implicit crosscheck backup at 20240601 21:23:36

Starting implicit crosscheck copy at 20240601 21:23:36

using channel ORA_DISK_1

Finished implicit crosscheck copy at 20240601 21:23:36

searching for all files in the recovery area

cataloging files...

cataloging done

List of Cataloged Files

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

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_90.422.1170479291

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_1.428.1170479311

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_68.751.1170479291

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_1.274.1170479311

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_1.504.1170479465

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_2.470.1170480437

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_2.447.1170480437

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_3.403.1170480437

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_2.398.1170480439

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_3.391.1170481337

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_117.379.1170481445

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_3.497.1170481899

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_2.421.1170481901

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_3.419.1170481901

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_2.413.1170481901

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_3.417.1170481901

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_2.401.1170481901

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_1.382.1170482171

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_1.367.1170482567

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_1.439.1170490999

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_1.441.1170491121

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_1.505.1170493203

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_1.506.1170493203

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_1.532.1170493305

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_2.536.1170493305

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_3.537.1170493305

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_4.540.1170493305

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_2.323.1170493307

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_1.350.1170493837

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_1.356.1170493837

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170522520.750.1170479321

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170525123.402.1170481925

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170525380.374.1170482181

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170525776.362.1170482577

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170534209.440.1170491011

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170534343.468.1170491145

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170536408.507.1170493209

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170537043.371.1170493843

File Name: +DATA1/CDB/AUTOBACKUP/2024_05_26/s_1170000915.746.1169957715

File Name: +DATA1/CDB/AUTOBACKUP/2024_05_26/s_1170005562.412.1169962363

File Name: +DATA1/CDB/AUTOBACKUP/2024_04_20/s_1166779737.317.1166779737

File Name: +DATA1/CDB/AUTOBACKUP/2024_02_03/s_1160005013.321.1159958213

using channel ORA_DISK_1

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

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

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

RMAN-03002: failure of restore command at 06/01/2024 21:23:37

RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time

RMAN>

RMAN>

RMAN> list incarnation;

List of Database Incarnations

DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time


1 1 CDB 2265125454 PARENT 1 20190417 00:55:59

2 2 CDB 2265125454 PARENT 1920977 20230926 01:52:18

3 3 CDB 2265125454 ORPHAN 7341211 20240601 17:08:26

9 9 CDB 2265125454 CURRENT 7341211 20240601 21:10:31

11 11 CDB 2265125454 ORPHAN 7341211 20240526 16:15:06

8 8 CDB 2265125454 ORPHAN 7341211 20240601 20:59:57

12 12 CDB 2265125454 ORPHAN 7386359 20240526 17:32:32

4 4 CDB 2265125454 ORPHAN 7577543 20240601 17:51:39

5 5 CDB 2265125454 ORPHAN 7579485 20240601 17:56:11

6 6 CDB 2265125454 ORPHAN 7579486 20240601 18:02:46

7 7 CDB 2265125454 ORPHAN 7579487 20240601 20:23:19

10 10 CDB 2265125454 ORPHAN 7581612 20240601 20:25:20

RMAN> reset database to incarnation 2;

database reset to incarnation 2

RMAN> run {

2> set until time "to_date('2024-02-01 15:19:16', 'yyyy-mm-dd:hh24:mi:ss')";

3> restore database;

4> recover database;

5> alter database open resetlogs;

6> }

executing command: SET until clause

Starting restore at 20240601 21:24:52

using channel ORA_DISK_1

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

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

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

RMAN-03002: failure of restore command at 06/01/2024 21:24:53

RMAN-06026: some targets not found - aborting restore

RMAN-06023: no backup or copy of datafile 16 found to restore

RMAN-06023: no backup or copy of datafile 15 found to restore

RMAN-06023: no backup or copy of datafile 14 found to restore

RMAN-06023: no backup or copy of datafile 13 found to restore

RMAN-06023: no backup or copy of datafile 12 found to restore

RMAN-06023: no backup or copy of datafile 11 found to restore

RMAN-06023: no backup or copy of datafile 7 found to restore

RMAN-06023: no backup or copy of datafile 4 found to restore

RMAN-06023: no backup or copy of datafile 3 found to restore

RMAN-06023: no backup or copy of datafile 1 found to restore

RMAN> run {

2> set until time "to_date('2024-02-03 15:19:16', 'yyyy-mm-dd:hh24:mi:ss')";

3> restore database;

4> recover database;

5> alter database open resetlogs;

6> }

executing command: SET until clause

Starting restore at 20240601 21:25:03

using channel ORA_DISK_1

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

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

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

RMAN-03002: failure of restore command at 06/01/2024 21:25:03

RMAN-06026: some targets not found - aborting restore

RMAN-06023: no backup or copy of datafile 16 found to restore

RMAN-06023: no backup or copy of datafile 15 found to restore

RMAN-06023: no backup or copy of datafile 14 found to restore

RMAN-06023: no backup or copy of datafile 13 found to restore

RMAN-06023: no backup or copy of datafile 12 found to restore

RMAN-06023: no backup or copy of datafile 11 found to restore

RMAN-06023: no backup or copy of datafile 7 found to restore

RMAN-06023: no backup or copy of datafile 4 found to restore

RMAN-06023: no backup or copy of datafile 3 found to restore

RMAN-06023: no backup or copy of datafile 1 found to restore

reset database to incarnation 15;

list incarnation;

RMAN> run {

set until time "to_date('2024-05-28 15:19:16', 'yyyy-mm-dd:hh24:mi:ss')";

restore database;

recover database;

alter database open resetlogs;

}

executing command: SET until clause

Starting restore at 20240601 21:25:10

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_02_03/nnndf0_tag20240203t233636_0.314.1159958197

channel ORA_DISK_1: piece handle=+DATA1/CDB/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.314.1159958197 tag=TAG20240203T233636

channel ORA_DISK_1: restored backup piece 1

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

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_02_03/nnndf0_tag20240203t233636_0.315.1159958205

channel ORA_DISK_1: piece handle=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.315.1159958205 tag=TAG20240203T233636

channel ORA_DISK_1: restored backup piece 1

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

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_02_03/nnndf0_tag20240203t233636_0.316.1159958207

channel ORA_DISK_1: piece handle=+DATA1/CDB/0633F844101D69CBE0636401A8C09D55/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.316.1159958207 tag=TAG20240203T233636

channel ORA_DISK_1: restored backup piece 1

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

Finished restore at 20240601 21:25:44

Starting recover at 20240601 21:25:44

using channel ORA_DISK_1

starting media recovery

archived log for thread 1 with sequence 117 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_117.379.1170481445

archived log for thread 2 with sequence 90 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_90.422.1170479291

archived log for thread 3 with sequence 68 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_68.751.1170479291

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_117.379.1170481445 thread=1 sequence=117

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_90.422.1170479291 thread=2 sequence=90

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_68.751.1170479291 thread=3 sequence=68

unable to find archived log

archived log thread=1 sequence=118

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

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

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

RMAN-03002: failure of recover command at 06/01/2024 21:25:46

RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 118 and starting SCN of 7341210

RMAN>

RMAN>

RMAN> alter database open resetlogs;

Statement processed

RMAN>

list incarnation;

reset database to incarnation 2;

restore controlfile from '+data1/CDB/AUTOBACKUP/2024_02_03/s_1160005013.321.1159958213';

shutdown abort;

startup nomount;

restore controlfile;

alter database mount;

list incarnation;

run {

set until time "to_date('2024-02-04 15:19:16', 'yyyy-mm-dd:hh24:mi:ss')";

restore database;

recover database;

alter database open resetlogs;

}

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 1 21:41:53 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> run {

2> set until time "to_date('2024-05-04 15:19:16', 'yyyy-mm-dd:hh24:mi:ss')";

3> restore database;

4> recover database;

5> alter database open resetlogs;

6> }

executing command: SET until clause

Starting restore at 20240601 21:42:04

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

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

skipping datafile 1; already restored to file +DATA/CDB/DATAFILE/system.270.1170495315

skipping datafile 3; already restored to file +DATA/CDB/DATAFILE/sysaux.260.1170495315

skipping datafile 4; already restored to file +DATA/CDB/DATAFILE/undotbs1.350.1170495315

skipping datafile 7; already restored to file +DATA/CDB/DATAFILE/users.293.1170495315

skipping datafile 9; already restored to file +DATA/CDB/DATAFILE/undotbs2.288.1170495315

skipping datafile 10; already restored to file +DATA/CDB/DATAFILE/undotbs3.292.1170495315

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

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

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

skipping datafile 11; already restored to file +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.366.1170495329

skipping datafile 12; already restored to file +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.302.1170495331

skipping datafile 13; already restored to file +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.360.1170495331

skipping datafile 14; already restored to file +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.277.1170495331

skipping datafile 15; already restored to file +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.344.1170495331

skipping datafile 16; already restored to file +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.291.1170495331

restore not done; all files read only, offline, excluded, or already restored

Finished restore at 20240601 21:42:05

Starting recover at 20240601 21:42:05

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/01/2024 21:42:05

ORA-00283: recovery session canceled due to errors

RMAN-11003: failure during parse/execution of SQL statement: alter database recover

if needed start until time '2024/05/04 15:19:16' using backup controlfile

ORA-00283: recovery session canceled due to errors

ORA-19912: cannot recover to target incarnation 2

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 20190417 00:55:59

2 2 CDB 2265125454 CURRENT 1920977 20230926 01:52:18

12 12 CDB 2265125454 ORPHAN 7341211 20240526 16:15:06

11 11 CDB 2265125454 ORPHAN 7341211 20240601 21:10:31

14 14 CDB 2265125454 ORPHAN 7341211 20240601 21:36:27

4 4 CDB 2265125454 ORPHAN 7341211 20240601 17:08:26

3 3 CDB 2265125454 ORPHAN 7341211 20240601 21:26:03

10 10 CDB 2265125454 ORPHAN 7341211 20240601 20:59:57

13 13 CDB 2265125454 ORPHAN 7386359 20240526 17:32:32

5 5 CDB 2265125454 ORPHAN 7577543 20240601 17:51:39

6 6 CDB 2265125454 ORPHAN 7579485 20240601 17:56:11

7 7 CDB 2265125454 ORPHAN 7579486 20240601 18:02:46

8 8 CDB 2265125454 ORPHAN 7579487 20240601 20:23:19

9 9 CDB 2265125454 ORPHAN 7581612 20240601 20:25:20

RMAN> reset database to incarnation 13;

database reset to incarnation 13

RMAN> run {

2> set until time "to_date('2024-05-04 15:19:16', 'yyyy-mm-dd:hh24:mi:ss')";

3> restore database;

4> recover database;

5> alter database open resetlogs;

6> }

executing command: SET until clause

Starting restore at 20240601 21:42:35

using channel ORA_DISK_1

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

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

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

RMAN-03002: failure of restore command at 06/01/2024 21:42:35

RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time

RMAN> run {

2> set until time "to_date('2024-05-14 15:19:16', 'yyyy-mm-dd:hh24:mi:ss')";

3> restore database;

4> recover database;

5> alter database open resetlogs;

6> }

executing command: SET until clause

Starting restore at 20240601 21:42:48

using channel ORA_DISK_1

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

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

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

RMAN-03002: failure of restore command at 06/01/2024 21:42:48

RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time

RMAN> run {

2> set until time "to_date('2024-05-28 15:19:16', 'yyyy-mm-dd:hh24:mi:ss')";

3> restore database;

4> recover database;

5> alter database open resetlogs;

6> }

executing command: SET until clause

Starting restore at 20240601 21:43:10

using channel ORA_DISK_1

skipping datafile 1; already restored to file +DATA/CDB/DATAFILE/system.270.1170495315

skipping datafile 3; already restored to file +DATA/CDB/DATAFILE/sysaux.260.1170495315

skipping datafile 4; already restored to file +DATA/CDB/DATAFILE/undotbs1.350.1170495315

skipping datafile 7; already restored to file +DATA/CDB/DATAFILE/users.293.1170495315

skipping datafile 9; already restored to file +DATA/CDB/DATAFILE/undotbs2.288.1170495315

skipping datafile 10; already restored to file +DATA/CDB/DATAFILE/undotbs3.292.1170495315

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

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

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

skipping datafile 11; already restored to file +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.366.1170495329

skipping datafile 12; already restored to file +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.302.1170495331

skipping datafile 13; already restored to file +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.360.1170495331

skipping datafile 14; already restored to file +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.277.1170495331

skipping datafile 15; already restored to file +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.344.1170495331

skipping datafile 16; already restored to file +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.291.1170495331

restore not done; all files read only, offline, excluded, or already restored

Finished restore at 20240601 21:43:10

Starting recover at 20240601 21:43:10

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/01/2024 21:43:11

ORA-00283: recovery session canceled due to errors

RMAN-11003: failure during parse/execution of SQL statement: alter database recover

if needed start until time '2024/05/28 15:19:16' using backup controlfile

ORA-00283: recovery session canceled due to errors

ORA-19912: cannot recover to target incarnation 13

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 20190417 00:55:59

2 2 CDB 2265125454 PARENT 1920977 20230926 01:52:18

12 12 CDB 2265125454 PARENT 7341211 20240526 16:15:06

11 11 CDB 2265125454 ORPHAN 7341211 20240601 21:10:31

14 14 CDB 2265125454 ORPHAN 7341211 20240601 21:36:27

4 4 CDB 2265125454 ORPHAN 7341211 20240601 17:08:26

3 3 CDB 2265125454 ORPHAN 7341211 20240601 21:26:03

10 10 CDB 2265125454 ORPHAN 7341211 20240601 20:59:57

13 13 CDB 2265125454 CURRENT 7386359 20240526 17:32:32

5 5 CDB 2265125454 ORPHAN 7577543 20240601 17:51:39

6 6 CDB 2265125454 ORPHAN 7579485 20240601 17:56:11

7 7 CDB 2265125454 ORPHAN 7579486 20240601 18:02:46

8 8 CDB 2265125454 ORPHAN 7579487 20240601 20:23:19

9 9 CDB 2265125454 ORPHAN 7581612 20240601 20:25:20

RMAN> reset database to incarnation 14;

database reset to incarnation 14

RMAN> recover database;

Starting recover at 20240601 21:43:58

using channel ORA_DISK_1

starting media recovery

archived log for thread 2 with sequence 90 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_90.387.1170495345

archived log for thread 3 with sequence 68 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_68.350.1170495345

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

archived log for thread 2 with sequence 1 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_1.506.1170495393

archived log for thread 3 with sequence 1 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_1.505.1170495393

channel ORA_DISK_1: starting archived log restore to default destination

channel ORA_DISK_1: restoring archived log

archived log thread=1 sequence=117

channel ORA_DISK_1: reading from backup piece +DATA1/CDB/BACKUPSET/2024_02_03/annnf0_tag20240203t233652_0.320.1159958213

channel ORA_DISK_1: piece handle=+DATA1/CDB/BACKUPSET/2024_02_03/annnf0_tag20240203t233652_0.320.1159958213 tag=TAG20240203T233652

channel ORA_DISK_1: restored backup piece 1

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

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_117.356.1170495839 thread=1 sequence=117

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_90.387.1170495345 thread=2 sequence=90

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_68.350.1170495345 thread=3 sequence=68

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

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_1.505.1170495393 thread=3 sequence=1

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_1.506.1170495393 thread=2 sequence=1

Finished recover at 20240601 21:44:02

RMAN> alter database open;

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

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

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

RMAN-03002: failure of sql statement command at 06/01/2024 21:44:24

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

RMAN> alter database open resetlogs;

Statement processed

RMAN> shutdown abort

Oracle instance shut down

RMAN> startup nomount;

connected to target database (not started)

Oracle instance started

Total System Global Area 2382361320 bytes

Fixed Size 9167592 bytes

Variable Size 1224736768 bytes

Database Buffers 1140850688 bytes

Redo Buffers 7606272 bytes

RMAN> restore controlfile from '+data1/CDB/AUTOBACKUP/2024_02_03/s_1160005013.321.1159958213';

Starting restore at 20240601 21:45:49

allocated channel: ORA_DISK_1

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

channel ORA_DISK_1: restoring control file

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

output file name=+DATA/CDB/CONTROLFILE/current.303.1148478735

output file name=+DATA/CDB/CONTROLFILE/current.289.1148478735

Finished restore at 20240601 21:45:52

RMAN> restore database;

Starting restore at 20240601 21:46:01

using channel ORA_DISK_1

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

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

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

RMAN-03002: failure of restore command at 06/01/2024 21:46:01

ORA-01507: database not mounted

RMAN> alter database mount;

restore database;

released channel: ORA_DISK_1

Statement processed

RMAN>

Starting restore at 20240601 21:46:11

Starting implicit crosscheck backup at 20240601 21:46:11

allocated channel: ORA_DISK_1

Crosschecked 5 objects

Finished implicit crosscheck backup at 20240601 21:46:11

Starting implicit crosscheck copy at 20240601 21:46:11

using channel ORA_DISK_1

Finished implicit crosscheck copy at 20240601 21:46:11

searching for all files in the recovery area

cataloging files...

cataloging done

List of Cataloged Files

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

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170522520.750.1170479321

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170525123.402.1170481925

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170525380.374.1170482181

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170525776.362.1170482577

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170534209.440.1170491011

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170534343.468.1170491145

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170536408.507.1170493209

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170537043.371.1170493843

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170537975.436.1170494775

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170538607.441.1170495409

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170539080.382.1170495881

File Name: +DATA1/CDB/AUTOBACKUP/2024_05_26/s_1170000915.746.1169957715

File Name: +DATA1/CDB/AUTOBACKUP/2024_05_26/s_1170005562.412.1169962363

File Name: +DATA1/CDB/AUTOBACKUP/2024_04_20/s_1166779737.317.1166779737

File Name: +DATA1/CDB/AUTOBACKUP/2024_02_03/s_1160005013.321.1159958213

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_02_03/nnndf0_tag20240203t233636_0.314.1159958197

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

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

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

RMAN-03002: failure of restore command at 06/01/2024 21:46:14

ORA-19870: error while restoring backup piece +DATA1/CDB/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.314.1159958197

ORA-19504: failed to create file "+DATA"

ORA-17502: ksfdcre:4 Failed to create file +DATA

ORA-15041: diskgroup "DATA" space exhausted

RMAN> restore database;

Starting restore at 20240601 21:46:36

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_02_03/nnndf0_tag20240203t233636_0.314.1159958197

channel ORA_DISK_1: piece handle=+DATA1/CDB/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.314.1159958197 tag=TAG20240203T233636

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_02_03/nnndf0_tag20240203t233636_0.315.1159958205

channel ORA_DISK_1: piece handle=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.315.1159958205 tag=TAG20240203T233636

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_02_03/nnndf0_tag20240203t233636_0.316.1159958207

channel ORA_DISK_1: piece handle=+DATA1/CDB/0633F844101D69CBE0636401A8C09D55/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.316.1159958207 tag=TAG20240203T233636

channel ORA_DISK_1: restored backup piece 1

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

Finished restore at 20240601 21:46:49

RMAN> recover database

2> ;

Starting recover at 20240601 21:47:04

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/01/2024 21:47:06

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 13

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 20190417 00:55:59

2 2 CDB 2265125454 PARENT 1920977 20230926 01:52:18

3 3 CDB 2265125454 ORPHAN 7341211 20240601 17:08:26

14 14 CDB 2265125454 ORPHAN 7341211 20240526 16:15:06

12 12 CDB 2265125454 PARENT 7341211 20240601 21:36:27

11 11 CDB 2265125454 ORPHAN 7341211 20240601 21:26:03

10 10 CDB 2265125454 ORPHAN 7341211 20240601 21:10:31

9 9 CDB 2265125454 ORPHAN 7341211 20240601 20:59:57

13 13 CDB 2265125454 CURRENT 7350651 20240601 21:44:32

15 15 CDB 2265125454 ORPHAN 7386359 20240526 17:32:32

4 4 CDB 2265125454 ORPHAN 7577543 20240601 17:51:39

5 5 CDB 2265125454 ORPHAN 7579485 20240601 17:56:11

6 6 CDB 2265125454 ORPHAN 7579486 20240601 18:02:46

7 7 CDB 2265125454 ORPHAN 7579487 20240601 20:23:19

8 8 CDB 2265125454 ORPHAN 7581612 20240601 20:25:20

RMAN> reset database to incarnation 15;

database reset to incarnation 15

RMAN> recover database;

Starting recover at 20240601 21:48:14

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/01/2024 21:48:16

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 15

RMAN> reset database to incarnation 2;

database reset to incarnation 2

RMAN> recover database;

Starting recover at 20240601 21:48:44

using channel ORA_DISK_1

starting media recovery

channel ORA_DISK_1: starting archived log restore to default destination

channel ORA_DISK_1: restoring archived log

archived log thread=2 sequence=90

channel ORA_DISK_1: restoring archived log

archived log thread=1 sequence=117

channel ORA_DISK_1: restoring archived log

archived log thread=3 sequence=68

channel ORA_DISK_1: reading from backup piece +DATA1/CDB/BACKUPSET/2024_02_03/annnf0_tag20240203t233652_0.320.1159958213

channel ORA_DISK_1: piece handle=+DATA1/CDB/BACKUPSET/2024_02_03/annnf0_tag20240203t233652_0.320.1159958213 tag=TAG20240203T233652

channel ORA_DISK_1: restored backup piece 1

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

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_117.356.1170496125 thread=1 sequence=117

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_90.424.1170496125 thread=2 sequence=90

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_68.505.1170496125 thread=3 sequence=68

channel default: deleting archived log(s)

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_117.356.1170496125 RECID=227 STAMP=1170539325

unable to find archived log

archived log thread=1 sequence=118

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

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

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

RMAN-03002: failure of recover command at 06/01/2024 21:48:47

RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 118 and starting SCN of 7341210

RMAN> alter database open resetlogs;

Statement processed

RMAN>


[oracle@rac1 ~]$ export NLS_DATE_FORMAT='yyyymmdd hh24:mi:ss';

[oracle@rac1 ~]$

[oracle@rac1 ~]$ rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Sun Jun 2 12:22:05 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 of database;

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 20190417 00:55:59

2 2 CDB 2265125454 PARENT 1920977 20230926 01:52:18

10 10 CDB 2265125454 ORPHAN 7341211 20240601 21:10:31
16 16 CDB 2265125454 CURRENT 7341211 20240601 21:49:05

3 3 CDB 2265125454 ORPHAN 7341211 20240601 17:08:26

14 14 CDB 2265125454 ORPHAN 7341211 20240526 16:15:06

12 12 CDB 2265125454 ORPHAN 7341211 20240601 21:36:27

11 11 CDB 2265125454 ORPHAN 7341211 20240601 21:26:03

9 9 CDB 2265125454 ORPHAN 7341211 20240601 20:59:57

13 13 CDB 2265125454 ORPHAN 7350651 20240601 21:44:32

15 15 CDB 2265125454 ORPHAN 7386359 20240526 17:32:32

4 4 CDB 2265125454 ORPHAN 7577543 20240601 17:51:39

5 5 CDB 2265125454 ORPHAN 7579485 20240601 17:56:11

6 6 CDB 2265125454 ORPHAN 7579486 20240601 18:02:46

7 7 CDB 2265125454 ORPHAN 7579487 20240601 20:23:19

8 8 CDB 2265125454 ORPHAN 7581612 20240601 20:25:20

RMAN> startup mount force

Oracle instance started

database mounted

Total System Global Area 2382361320 bytes

Fixed Size 9167592 bytes

Variable Size 1224736768 bytes

Database Buffers 1140850688 bytes

Redo Buffers 7606272 bytes

RMAN> run {

2> set until time "to_date('2024-06-01 20:24:16', 'yyyy-mm-dd:hh24:mi:ss')";

3> restore database;

4> recover database;

5> alter database open resetlogs;

6> }

executing command: SET until clause

Starting restore at 20240602 12:22:52

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

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

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

RMAN-03002: failure of restore command at 06/02/2024 12:22:52

RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time

---太早

RMAN> restore database until time "to_date('2024-06-01 22:24:16', 'yyyy-mm-dd:hh24:mi:ss')" preview summary;---测试可以

Starting restore at 20240602 12:23:56

using channel ORA_DISK_1

List of Backups

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

Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag


15 B F A DISK 20240203 23:36:41 1 1 NO TAG20240203T233636

43 B F A DISK 20240601 23:23:52 1 1 NO TAG20240601T232326

41 B F A DISK 20240601 23:23:27 1 1 NO TAG20240601T232326

16 B F A DISK 20240203 23:36:45 1 1 NO TAG20240203T233636

42 B F A DISK 20240601 23:23:34 1 1 NO TAG20240601T232326

List of Backups

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

Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag


18 B A A DISK 20240203 23:36:52 1 1 NO TAG20240203T233652

List of Archived Log Copies for database with db_unique_name CDB

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

Key Thrd Seq S Low Time


226 2 90 A 20240203 10:36:31

Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_90.424.1170496125

228 3 68 A 20240203 10:36:32

242 3 4 A 20240601 10:41:12

Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_4.474.1170500337

recovery will be done up to SCN 7786767

Media recovery start SCN is 7341188
Recovery must be done beyond SCN 7786767 to clear datafile fuzziness

Finished restore at 20240602 12:23:57

RMAN> recover database until time "to_date('2024-06-01 22:24:16', 'yyyy-mm-dd:hh24:mi:ss')" preview summary;---测试recover 需要先恢复!!!

Starting recover at 20240602 12:24:16

using channel ORA_DISK_1

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

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

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

RMAN-03002: failure of recover command at 06/02/2024 12:24:17

RMAN-06555: datafile 1 must be restored from backup created before 20240601 22:24:16

RMAN> restore database until time "to_date('2024-06-01 20:24:16', 'yyyy-mm-dd:hh24:mi:ss')" preview summary;---太早

Starting restore at 20240602 12:24:39

using channel ORA_DISK_1

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

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

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

RMAN-03002: failure of restore command at 06/02/2024 12:24:39

RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time

RMAN> list incarnation of database;

List of Database Incarnations

DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time


1 1 CDB 2265125454 PARENT 1 20190417 00:55:59

2 2 CDB 2265125454 PARENT 1920977 20230926 01:52:18

10 10 CDB 2265125454 ORPHAN 7341211 20240601 21:10:31

16 16 CDB 2265125454 CURRENT 7341211 20240601 21:49:05

3 3 CDB 2265125454 ORPHAN 7341211 20240601 17:08:26

14 14 CDB 2265125454 ORPHAN 7341211 20240526 16:15:06

12 12 CDB 2265125454 ORPHAN 7341211 20240601 21:36:27

11 11 CDB 2265125454 ORPHAN 7341211 20240601 21:26:03

9 9 CDB 2265125454 ORPHAN 7341211 20240601 20:59:57

13 13 CDB 2265125454 ORPHAN 7350651 20240601 21:44:32

15 15 CDB 2265125454 ORPHAN 7386359 20240526 17:32:32

4 4 CDB 2265125454 ORPHAN 7577543 20240601 17:51:39

5 5 CDB 2265125454 ORPHAN 7579485 20240601 17:56:11

6 6 CDB 2265125454 ORPHAN 7579486 20240601 18:02:46

7 7 CDB 2265125454 ORPHAN 7579487 20240601 20:23:19

8 8 CDB 2265125454 ORPHAN 7581612 20240601 20:25:20

RMAN> reset database to incarnation 7;--------这段时间测试太多,不好操作。!!!

database reset to incarnation 7

RMAN> restore database until time "to_date('2024-06-01 20:24:16', 'yyyy-mm-dd:hh24:mi:ss')" preview summary;

Starting restore at 20240602 12:25:19

using channel ORA_DISK_1

datafile 9 will be created automatically during restore operation

datafile 10 will be created automatically during restore operation

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

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

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

RMAN-03002: failure of restore command at 06/02/2024 12:25:19

RMAN-06023: no backup or copy of datafile 1 found to restore

RMAN> reset database to incarnation 2;

database reset to incarnation 2

RMAN> restore database until time "to_date('2024-06-01 20:24:16', 'yyyy-mm-dd:hh24:mi:ss')" preview summary;

Starting restore at 20240602 12:25:40

using channel ORA_DISK_1

List of Backups

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

Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag


15 B F A DISK 20240203 23:36:41 1 1 NO TAG20240203T233636

43 B F A DISK 20240601 23:23:52 1 1 NO TAG20240601T232326

16 B F A DISK 20240203 23:36:45 1 1 NO TAG20240203T233636

List of Backups

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

Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag


18 B A A DISK 20240203 23:36:52 1 1 NO TAG20240203T233652

List of Archived Log Copies for database with db_unique_name CDB

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

Key Thrd Seq S Low Time


226 2 90 A 20240203 10:36:31

Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_90.424.1170496125

228 3 68 A 20240203 10:36:32

Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_68.505.1170496125

recovery will be done up to SCN 7341196

Media recovery start SCN is 7341188

Recovery must be done beyond SCN 7341196 to clear datafile fuzziness

Finished restore at 20240602 12:25:40

RMAN> restore database until time "to_date('2024-06-01 20:24:16', 'yyyy-mm-dd:hh24:mi:ss')";

Starting restore at 20240602 12:26:00

flashing back control file to SCN 7341196

Oracle error from target database:
ORA-38729: Not enough flashback database log data to do FLASHBACK.

using channel ORA_DISK_1

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

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

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

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.291.1170495997

channel ORA_DISK_1: restoring datafile 00003 to +DATA/CDB/DATAFILE/sysaux.344.1170495997

channel ORA_DISK_1: restoring datafile 00004 to +DATA/CDB/DATAFILE/undotbs1.277.1170495997

channel ORA_DISK_1: restoring datafile 00007 to +DATA/CDB/DATAFILE/users.366.1170495997

channel ORA_DISK_1: restoring datafile 00009 to +DATA/CDB/DATAFILE/undotbs2.360.1170495997

channel ORA_DISK_1: restoring datafile 00010 to +DATA/CDB/DATAFILE/undotbs3.302.1170495997

channel ORA_DISK_1: reading from backup piece +DATA1/CDB/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.314.1159958197

channel ORA_DISK_1: piece handle=+DATA1/CDB/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.314.1159958197 tag=TAG20240203T233636

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.337.1170496003

channel ORA_DISK_1: restoring datafile 00012 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.359.1170496003

channel ORA_DISK_1: restoring datafile 00013 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.279.1170496003

channel ORA_DISK_1: restoring datafile 00014 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.272.1170496003

channel ORA_DISK_1: restoring datafile 00015 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.309.1170496003

channel ORA_DISK_1: restoring datafile 00016 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.293.1170496003

channel ORA_DISK_1: reading from backup piece +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.315.1159958205

channel ORA_DISK_1: piece handle=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.315.1159958205 tag=TAG20240203T233636

channel ORA_DISK_1: restored backup piece 1

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

Finished restore at 20240602 12:26:10

RMAN> recover database until time "to_date('2024-06-01 20:24:16', 'yyyy-mm-dd:hh24:mi:ss')"

2> ;

Starting recover at 20240602 12:26:30

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/02/2024 12:26:31

ORA-00283: recovery session canceled due to errors

RMAN-11003: failure during parse/execution of SQL statement: alter database recover

if needed start until time '2024/06/01 20:24:16'

ORA-00283: recovery session canceled due to errors

ORA-38872: Cannot perform backup control file recovery if Flashback Database is enabled.

RMAN> alter DATAbase flashback off;

Statement processed

RMAN> recover database until time "to_date('2024-06-01 20:24:16', 'yyyy-mm-dd:hh24:mi:ss')"

2> ;

Starting recover at 20240602 12:27:02

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/02/2024 12:27:03

ORA-00283: recovery session canceled due to errors

RMAN-11003: failure during parse/execution of SQL statement: alter database recover

if needed start until time '2024/06/01 20:24:16'

ORA-00283: recovery session canceled due to errors

ORA-19912: cannot recover to target incarnation 2

RMAN> list incarnation of database;

List of Database Incarnations

DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time


1 1 CDB 2265125454 PARENT 1 20190417 00:55:59

2 2 CDB 2265125454 CURRENT 1920977 20230926 01:52:18

10 10 CDB 2265125454 ORPHAN 7341211 20240601 21:10:31

16 16 CDB 2265125454 ORPHAN 7341211 20240601 21:49:05

3 3 CDB 2265125454 ORPHAN 7341211 20240601 17:08:26

14 14 CDB 2265125454 ORPHAN 7341211 20240526 16:15:06

12 12 CDB 2265125454 ORPHAN 7341211 20240601 21:36:27

11 11 CDB 2265125454 ORPHAN 7341211 20240601 21:26:03

9 9 CDB 2265125454 ORPHAN 7341211 20240601 20:59:57

13 13 CDB 2265125454 ORPHAN 7350651 20240601 21:44:32

15 15 CDB 2265125454 ORPHAN 7386359 20240526 17:32:32

4 4 CDB 2265125454 ORPHAN 7577543 20240601 17:51:39

5 5 CDB 2265125454 ORPHAN 7579485 20240601 17:56:11

6 6 CDB 2265125454 ORPHAN 7579486 20240601 18:02:46

7 7 CDB 2265125454 ORPHAN 7579487 20240601 20:23:19

8 8 CDB 2265125454 ORPHAN 7581612 20240601 20:25:20

RMAN> reset database to incarnation 5;

database reset to incarnation 5

RMAN> recover database until time "to_date('2024-06-01 20:24:16', 'yyyy-mm-dd:hh24:mi:ss')";

Starting recover at 20240602 12:28:15

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/02/2024 12:28:16

ORA-00283: recovery session canceled due to errors

RMAN-11003: failure during parse/execution of SQL statement: alter database recover

if needed start until time '2024/06/01 20:24:16' using backup controlfile

ORA-00283: recovery session canceled due to errors

ORA-19912: cannot recover to target incarnation 5

RMAN> reset database to incarnation 6;

database reset to incarnation 6

RMAN> recover database until time "to_date('2024-06-01 20:24:16', 'yyyy-mm-dd:hh24:mi:ss')";

Starting recover at 20240602 12:28:44

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/02/2024 12:28:45

ORA-00283: recovery session canceled due to errors

RMAN-11003: failure during parse/execution of SQL statement: alter database recover

if needed start until time '2024/06/01 20:24:16' using backup controlfile

ORA-00283: recovery session canceled due to errors

ORA-19912: cannot recover to target incarnation 6

RMAN> reset database to incarnation 9;

database reset to incarnation 9

RMAN> recover database until scn 7341220;

Starting recover at 20240602 12:32:02

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/02/2024 12:32:02

ORA-00283: recovery session canceled due to errors

RMAN-11003: failure during parse/execution of SQL statement: alter database recover

if needed start until change 7341220 using backup controlfile

ORA-00283: recovery session canceled due to errors

ORA-19912: cannot recover to target incarnation 9

RMAN> reset database to incarnation 2;

database reset to incarnation 2

RMAN> recover database until time "to_date('2024-03-01 22:24:16', 'yyyy-mm-dd:hh24:mi:ss')";

Starting recover at 20240602 12:32:48

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/02/2024 12:32:49

ORA-00283: recovery session canceled due to errors

RMAN-11003: failure during parse/execution of SQL statement: alter database recover

if needed start until time '2024/03/01 22:24:16' using backup controlfile

ORA-00283: recovery session canceled due to errors

ORA-19912: cannot recover to target incarnation 2

------------------全部恢复不了

----------restore controlfile 后 reset database to incarnation 所有之前的可以restore不能recover

RMAN> restore controlfile from '+data1/CDB/AUTOBACKUP/2024_02_03/s_1160005013.321.1159958213';

Starting restore at 20240602 12:33:59
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=794 instance=cdb1 device type=DISK

channel ORA_DISK_1: no AUTOBACKUP in 7 days found
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 06/02/2024 12:33:59
RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece

-------昨天不小心delete backup of controlfile,导致control file失败,这个命令以后不许执行,还好立即做了备份。

RMAN> restore controlfile from '+data1/CDB/AUTOBACKUP/2024_06_01/s_1170543934.412.1170501767';

Starting restore at 20240602 12:35:16
using channel ORA_DISK_1

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 20240602 12:35:17

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 CURRENT 1 20190417 00:55:59
2 2 CDB 2265125454 ORPHAN 1920977 20230926 01:52:18
10 10 CDB 2265125454 ORPHAN 7341211 20240601 21:10:31
16 16 CDB 2265125454 ORPHAN 7341211 20240601 21:49:05
3 3 CDB 2265125454 ORPHAN 7341211 20240601 17:08:26
14 14 CDB 2265125454 ORPHAN 7341211 20240526 16:15:06
12 12 CDB 2265125454 ORPHAN 7341211 20240601 21:36:27
11 11 CDB 2265125454 ORPHAN 7341211 20240601 21:26:03
9 9 CDB 2265125454 ORPHAN 7341211 20240601 20:59:57
13 13 CDB 2265125454 ORPHAN 7350651 20240601 21:44:32
15 15 CDB 2265125454 ORPHAN 7386359 20240526 17:32:32
4 4 CDB 2265125454 ORPHAN 7577543 20240601 17:51:39
5 5 CDB 2265125454 ORPHAN 7579485 20240601 17:56:11
6 6 CDB 2265125454 ORPHAN 7579486 20240601 18:02:46
7 7 CDB 2265125454 ORPHAN 7579487 20240601 20:23:19
8 8 CDB 2265125454 ORPHAN 7581612 20240601 20:25:20

RMAN> restore database ;

Starting restore at 20240602 12:35:52
Starting implicit crosscheck backup at 20240602 12:35:52
allocated channel: ORA_DISK_1
Crosschecked 8 objects
Finished implicit crosscheck backup at 20240602 12:35:53

Starting implicit crosscheck copy at 20240602 12:35:53
using channel ORA_DISK_1
Finished implicit crosscheck copy at 20240602 12:35:53

searching for all files in the recovery area
cataloging files...
cataloging done

List of Cataloged Files

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_02/thread_1_seq_10.750.1170548473
File Name: +DATA1/CDB/ARCHIVELOG/2024_06_02/thread_1_seq_11.484.1170548519
File Name: +DATA1/CDB/ARCHIVELOG/2024_06_02/thread_1_seq_12.496.1170548549
File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_7.468.1170501865
File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_8.440.1170501953
File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_9.402.1170502147
File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170543934.412.1170501767
File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170543934.507.1170501837
File Name: +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/BACKUPSET/2024_06_01/nnndf0_tag20240601t232326_0.371.1170501821
File Name: +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_06_01/nnndf0_tag20240601t232326_0.436.1170501815
File Name: +DATA1/CDB/BACKUPSET/2024_06_01/annnf0_tag20240601t232324_0.746.1170501805
File Name: +DATA1/CDB/BACKUPSET/2024_06_01/annnf0_tag20240601t232324_0.382.1170501805
File Name: +DATA1/CDB/BACKUPSET/2024_06_01/nnndf0_tag20240601t232326_0.441.1170501807

using channel ORA_DISK_1

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 06/02/2024 12:35:53
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 16 found to restore
RMAN-06023: no backup or copy of datafile 15 found to restore
RMAN-06023: no backup or copy of datafile 14 found to restore
RMAN-06023: no backup or copy of datafile 13 found to restore
RMAN-06023: no backup or copy of datafile 12 found to restore
RMAN-06023: no backup or copy of datafile 11 found to restore
RMAN-06023: no backup or copy of datafile 7 found to restore
RMAN-06023: no backup or copy of datafile 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore

RMAN> reset database to incarnation 16;

database reset to incarnation 16

RMAN> restore database;

Starting restore at 20240602 12:36:15
using channel ORA_DISK_1

skipping datafile 5; already restored to file +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.292.1170496007
skipping datafile 6; already restored to file +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.288.1170496007
skipping datafile 8; already restored to file +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.350.1170496007
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.291.1170495997
channel ORA_DISK_1: restoring datafile 00003 to +DATA/CDB/DATAFILE/sysaux.344.1170495997
channel ORA_DISK_1: restoring datafile 00004 to +DATA/CDB/DATAFILE/undotbs1.277.1170495997
channel ORA_DISK_1: restoring datafile 00007 to +DATA/CDB/DATAFILE/users.366.1170495997
channel ORA_DISK_1: restoring datafile 00009 to +DATA/CDB/DATAFILE/undotbs2.360.1170495997
channel ORA_DISK_1: restoring datafile 00010 to +DATA/CDB/DATAFILE/undotbs3.302.1170495997
channel ORA_DISK_1: reading from backup piece +DATA1/CDB/BACKUPSET/2024_06_01/nnndf0_tag20240601t232326_0.441.1170501807
channel ORA_DISK_1: piece handle=+DATA1/CDB/BACKUPSET/2024_06_01/nnndf0_tag20240601t232326_0.441.1170501807 tag=TAG20240601T232326
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.337.1170496003
channel ORA_DISK_1: restoring datafile 00012 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.359.1170496003
channel ORA_DISK_1: restoring datafile 00013 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.279.1170496003
channel ORA_DISK_1: restoring datafile 00014 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.272.1170496003
channel ORA_DISK_1: restoring datafile 00015 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.309.1170496003
channel ORA_DISK_1: restoring datafile 00016 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.293.1170496003
channel ORA_DISK_1: reading from backup piece +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_06_01/nnndf0_tag20240601t232326_0.436.1170501815
channel ORA_DISK_1: piece handle=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_06_01/nnndf0_tag20240601t232326_0.436.1170501815 tag=TAG20240601T232326
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
Finished restore at 20240602 12:36:25

RMAN> recover database;

Starting recover at 20240602 12:36:33
using channel ORA_DISK_1

starting media recovery

archived log for thread 1 with sequence 7 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_7.468.1170501865
archived log for thread 1 with sequence 8 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_8.440.1170501953
archived log for thread 1 with sequence 9 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_9.402.1170502147
archived log for thread 1 with sequence 10 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_02/thread_1_seq_10.750.1170548473
archived log for thread 1 with sequence 11 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_02/thread_1_seq_11.484.1170548519
archived log for thread 1 with sequence 12 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_02/thread_1_seq_12.496.1170548549
archived log for thread 1 with sequence 13 is already on disk as file +DATA/CDB/ONLINELOG/group_1.260.1170496145
archived log for thread 2 with sequence 5 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_5.480.1170500443
archived log for thread 3 with sequence 4 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_4.474.1170500337
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_7.468.1170501865 thread=1 sequence=7
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_5.480.1170500443 thread=2 sequence=5
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_4.474.1170500337 thread=3 sequence=4
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_8.440.1170501953 thread=1 sequence=8
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_9.402.1170502147 thread=1 sequence=9
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_02/thread_1_seq_10.750.1170548473 thread=1 sequence=10
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_02/thread_1_seq_11.484.1170548519 thread=1 sequence=11
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_02/thread_1_seq_12.496.1170548549 thread=1 sequence=12
archived log file name=+DATA/CDB/ONLINELOG/group_1.260.1170496145 thread=1 sequence=13
media recovery complete, elapsed time: 00:00:04
Finished recover at 20240602 12:36:38

RMAN> alter database open;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of sql statement command at 06/02/2024 12:36:44
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open

RMAN> alter database open resetlogs;

Statement processed

-------之前的能不能recover 呢?

RMAN> startup mount force;

Oracle instance started
database mounted

Total System Global Area 2382361320 bytes

Fixed Size 9167592 bytes
Variable Size 1224736768 bytes
Database Buffers 1140850688 bytes
Redo Buffers 7606272 bytes

RMAN> restore database until time "to_date('2024-06-01 20:24:16', 'yyyy-mm-dd:hh24:mi:ss')" preview summary;

Starting restore at 20240602 12:51:44
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=791 instance=cdb1 device type=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 06/02/2024 12:51:45
RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time

-----通过改变incarnation 可以拿到最早的backup,但是不能recover

RMAN> reset database to incarnation 2;

database reset to incarnation 2

RMAN> restore database until time "to_date('2024-06-01 20:24:16', 'yyyy-mm-dd:hh24:mi:ss')" preview summary;

Starting restore at 20240602 12:52:02
using channel ORA_DISK_1

List of Backups

Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag


15 B F A DISK 20240203 23:36:41 1 1 NO TAG20240203T233636
40 B F A DISK 20240602 12:35:53 1 1 NO TAG20240601T232326
16 B F A DISK 20240203 23:36:45 1 1 NO TAG20240203T233636

List of Backups

Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag


18 B A A DISK 20240203 23:36:52 1 1 NO TAG20240203T233652
List of Archived Log Copies for database with db_unique_name CDB

Key Thrd Seq S Low Time


226 2 90 A 20240203 10:36:31
Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_90.424.1170496125

228 3 68 A 20240203 10:36:32
Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_68.505.1170496125

recovery will be done up to SCN 7341196
Media recovery start SCN is 7341188
Recovery must be done beyond SCN 7341196 to clear datafile fuzziness
Finished restore at 20240602 12:52:02

RMAN> restore database until time "to_date('2024-06-01 20:24:16', 'yyyy-mm-dd:hh24:mi:ss')";

Starting restore at 20240602 12:52:10
flashing back control file to SCN 7341196
Oracle error from target database:
ORA-38729: Not enough flashback database log data to do FLASHBACK.

using channel ORA_DISK_1

skipping datafile 5; already restored to file +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.292.1170496007
skipping datafile 6; already restored to file +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.288.1170496007
skipping datafile 8; already restored to file +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.350.1170496007
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.291.1170495997
channel ORA_DISK_1: restoring datafile 00003 to +DATA/CDB/DATAFILE/sysaux.344.1170495997
channel ORA_DISK_1: restoring datafile 00004 to +DATA/CDB/DATAFILE/undotbs1.277.1170495997
channel ORA_DISK_1: restoring datafile 00007 to +DATA/CDB/DATAFILE/users.366.1170495997
channel ORA_DISK_1: restoring datafile 00009 to +DATA/CDB/DATAFILE/undotbs2.360.1170495997
channel ORA_DISK_1: restoring datafile 00010 to +DATA/CDB/DATAFILE/undotbs3.302.1170495997
channel ORA_DISK_1: reading from backup piece +DATA1/CDB/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.314.1159958197
channel ORA_DISK_1: piece handle=+DATA1/CDB/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.314.1159958197 tag=TAG20240203T233636
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.337.1170496003
channel ORA_DISK_1: restoring datafile 00012 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.359.1170496003
channel ORA_DISK_1: restoring datafile 00013 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.279.1170496003
channel ORA_DISK_1: restoring datafile 00014 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.272.1170496003
channel ORA_DISK_1: restoring datafile 00015 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.309.1170496003
channel ORA_DISK_1: restoring datafile 00016 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.293.1170496003
channel ORA_DISK_1: reading from backup piece +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.315.1159958205
channel ORA_DISK_1: piece handle=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.315.1159958205 tag=TAG20240203T233636
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
Finished restore at 20240602 12:52:21

RMAN> recover database until time "to_date('2024-06-01 20:24:16', 'yyyy-mm-dd:hh24:mi:ss')";

Starting recover at 20240602 12:52:35
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/02/2024 12:52:37
ORA-00283: recovery session canceled due to errors
RMAN-11003: failure during parse/execution of SQL statement: alter database recover
if needed start until time '2024/06/01 20:24:16'
ORA-00283: recovery session canceled due to errors
ORA-38872: Cannot perform backup control file recovery if Flashback Database is enabled.

RMAN> alter database flashback off;

Statement processed

RMAN> recover database until time "to_date('2024-06-01 20:24:16', 'yyyy-mm-dd:hh24:mi:ss')";

Starting recover at 20240602 12:52:51
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/02/2024 12:52:52
ORA-00283: recovery session canceled due to errors
RMAN-11003: failure during parse/execution of SQL statement: alter database recover
if needed start until time '2024/06/01 20:24:16'
ORA-00283: recovery session canceled due to errors
ORA-19912: cannot recover to target incarnation 2

RMAN> recover database;

Starting recover at 20240602 12:52:58
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/02/2024 12:52:59
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> 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 20190417 00:55:59
2 2 CDB 2265125454 CURRENT 1920977 20230926 01:52:18
3 3 CDB 2265125454 ORPHAN 7341211 20240601 17:08:26
9 9 CDB 2265125454 ORPHAN 7341211 20240601 20:59:57
16 16 CDB 2265125454 ORPHAN 7341211 20240601 21:49:05
14 14 CDB 2265125454 ORPHAN 7341211 20240526 16:15:06
12 12 CDB 2265125454 ORPHAN 7341211 20240601 21:36:27
11 11 CDB 2265125454 ORPHAN 7341211 20240601 21:26:03
10 10 CDB 2265125454 ORPHAN 7341211 20240601 21:10:31
13 13 CDB 2265125454 ORPHAN 7350651 20240601 21:44:32
15 15 CDB 2265125454 ORPHAN 7386359 20240526 17:32:32
4 4 CDB 2265125454 ORPHAN 7577543 20240601 17:51:39
5 5 CDB 2265125454 ORPHAN 7579485 20240601 17:56:11
6 6 CDB 2265125454 ORPHAN 7579486 20240601 18:02:46
7 7 CDB 2265125454 ORPHAN 7579487 20240601 20:23:19
8 8 CDB 2265125454 ORPHAN 7581612 20240601 20:25:20
17 17 CDB 2265125454 ORPHAN 8347838 20240602 12:36:49

RMAN> reset database to incarnation 3;

database reset to incarnation 3

RMAN> recover database;

Starting recover at 20240602 12:54:30
using channel ORA_DISK_1

starting media recovery
media recovery failed

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 20240602 12:55:14.

.

.

.

.

RMAN> reset database to incarnation 12;

database reset to incarnation 12

RMAN> recover database;

Starting recover at 20240602 12:56:28
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/02/2024 12:56:28
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 12

RMAN> reset database to incarnation 12;

database reset to incarnation 12

RMAN> reset database to incarnation 13
2> ;

database reset to incarnation 13

RMAN> reset database to incarnation 14;

database reset to incarnation 14

RMAN> reset database to incarnation 15;

database reset to incarnation 15

RMAN> recover database;

RMAN> reset database to incarnation 16;

database reset to incarnation 16

RMAN> recover database;

Starting recover at 20240602 12:57:06
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/02/2024 12:57:06
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 16

RMAN> reset database to incarnation 17;

database reset to incarnation 17

RMAN> recover database;

Starting recover at 20240602 12:57:14
using channel ORA_DISK_1

starting media recovery

archived log for thread 2 with sequence 90 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_90.424.1170496125
archived log for thread 3 with sequence 68 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_68.505.1170496125
archived log for thread 1 with sequence 1 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_1.421.1170496877
archived log for thread 1 with sequence 2 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_2.379.1170497033
archived log for thread 1 with sequence 3 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_3.504.1170499227
archived log for thread 1 with sequence 4 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_4.428.1170499227
archived log for thread 1 with sequence 5 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_5.422.1170499229
archived log for thread 1 with sequence 6 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_6.438.1170499229
archived log for thread 1 with sequence 7 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_7.468.1170501865
archived log for thread 1 with sequence 8 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_8.440.1170501953
archived log for thread 1 with sequence 9 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_9.402.1170502147
archived log for thread 1 with sequence 10 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_02/thread_1_seq_10.750.1170548473
archived log for thread 1 with sequence 11 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_02/thread_1_seq_11.484.1170548519
archived log for thread 1 with sequence 12 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_02/thread_1_seq_12.483.1170549409
archived log for thread 1 with sequence 13 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_02/thread_1_seq_13.485.1170549409
archived log for thread 2 with sequence 1 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_1.413.1170496153
archived log for thread 2 with sequence 2 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_2.447.1170499227
archived log for thread 2 with sequence 3 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_3.274.1170499227
archived log for thread 2 with sequence 4 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_02/thread_2_seq_4.362.1170549411
archived log for thread 2 with sequence 5 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_02/thread_2_seq_5.374.1170549409
archived log for thread 3 with sequence 1 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_1.417.1170496153
archived log for thread 3 with sequence 2 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_2.470.1170499073
archived log for thread 3 with sequence 3 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_02/thread_3_seq_3.466.1170549411
archived log for thread 3 with sequence 4 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_02/thread_3_seq_4.460.1170549411
archived log for thread 1 with sequence 1 is already on disk as file +DATA/CDB/ONLINELOG/group_1.260.1170496145
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=117
channel ORA_DISK_1: reading from backup piece +DATA1/CDB/BACKUPSET/2024_02_03/annnf0_tag20240203t233652_0.320.1159958213
channel ORA_DISK_1: piece handle=+DATA1/CDB/BACKUPSET/2024_02_03/annnf0_tag20240203t233652_0.320.1159958213 tag=TAG20240203T233652
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_02/thread_1_seq_117.501.1170550635 thread=1 sequence=117
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_90.424.1170496125 thread=2 sequence=90
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_68.505.1170496125 thread=3 sequence=68
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_1.421.1170496877 thread=1 sequence=1
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_1.417.1170496153 thread=3 sequence=1
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_1.413.1170496153 thread=2 sequence=1
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_2.379.1170497033 thread=1 sequence=2
channel default: deleting archived log(s)
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_02/thread_1_seq_117.501.1170550635 RECID=460 STAMP=1170593835
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_3.504.1170499227 thread=1 sequence=3
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_2.447.1170499227 thread=2 sequence=2
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_2.470.1170499073 thread=3 sequence=2
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_02/thread_3_seq_3.466.1170549411 thread=3 sequence=3
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_3.274.1170499227 thread=2 sequence=3
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_4.428.1170499227 thread=1 sequence=4
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_5.422.1170499229 thread=1 sequence=5
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_02/thread_2_seq_4.362.1170549411 thread=2 sequence=4
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_6.438.1170499229 thread=1 sequence=6
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_02/thread_2_seq_5.374.1170549409 thread=2 sequence=5
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_02/thread_3_seq_4.460.1170549411 thread=3 sequence=4
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_7.468.1170501865 thread=1 sequence=7
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_8.440.1170501953 thread=1 sequence=8
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_9.402.1170502147 thread=1 sequence=9
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_02/thread_1_seq_10.750.1170548473 thread=1 sequence=10
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_02/thread_1_seq_11.484.1170548519 thread=1 sequence=11
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_02/thread_1_seq_12.483.1170549409 thread=1 sequence=12
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_02/thread_1_seq_13.485.1170549409 thread=1 sequence=13
archived log file name=+DATA/CDB/ONLINELOG/group_1.260.1170496145 thread=1 sequence=1
media recovery complete, elapsed time: 00:00:11
Finished recover at 20240602 12:57:27

RMAN> alter database open;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of sql statement command at 06/02/2024 12:57:36
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open

RMAN> alter database open resetlogs;

Statement processed

RMAN>

------由于控制文件丢失,明明有2月3号的全备,但是恢复不了,怎么办--------------------

-----重建controlfile

SQL> alter database backup controlfile to trace;

Database altered.

SQL> select *from v$diag_info;

alter system set cluster_database=true scope=spfile sid='*';

/u01/app/oracle/diag/rdbms/cdb/cdb1/trace/cdb1_ora_26312.trc

[oracle@rac1 trace]$ vi cdb1_dia0_26031_base_1.trc

[oracle@rac1 trace]$ vi cdb1_ora_26312.trc

[oracle@rac1 trace]$ cat cdb1_ora_26312.trc

Trace file /u01/app/oracle/diag/rdbms/cdb/cdb1/trace/cdb1_ora_26312.trc

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.20.0.0.0

Build label: RDBMS_19.20.0.0.0DBRU_LINUX.X64_230621

ORACLE_HOME: /u01/app/oracle/product/19.0.0/db_1

System name: Linux

Node name: rac1

Release: 5.4.17-2011.6.2.el7uek.x86_64

Version: #2 SMP Thu Sep 3 14:09:14 PDT 2020

Machine: x86_64

Instance name: cdb1

Redo thread mounted by this instance: 1

Oracle process number: 61

Unix process pid: 26312, image: oracle@rac1 (TNS V1-V3)

*** 2024-06-02T13:46:13.921268+08:00 (CDB$ROOT(1))

*** SESSION ID:(793.64070) 2024-06-02T13:46:13.921336+08:00

*** CLIENT ID:() 2024-06-02T13:46:13.921345+08:00

*** SERVICE NAME:() 2024-06-02T13:46:13.921349+08:00

*** MODULE NAME:(sqlplus@rac1 (TNS V1-V3)) 2024-06-02T13:46:13.921352+08:00

*** ACTION NAME:() 2024-06-02T13:46:13.921356+08:00

*** CLIENT DRIVER:(SQL*PLUS) 2024-06-02T13:46:13.921359+08:00

*** CONTAINER ID:(1) 2024-06-02T13:46:13.921363+08:00

Received ORADEBUG command (#1) 'CLEANUP_KFK_FD' from process '26314'

*** 2024-06-02T13:46:13.921458+08:00 (CDB$ROOT(1))

Finished processing ORADEBUG command (#1) 'CLEANUP_KFK_FD'

*** 2024-06-02T13:46:28.012179+08:00 (CDB$ROOT(1))

-- The following are current System-scope REDO Log Archival related

-- parameters and can be included in the database initialization file.

--

-- LOG_ARCHIVE_DEST=''

-- LOG_ARCHIVE_DUPLEX_DEST=''

--

-- LOG_ARCHIVE_FORMAT=%t_%s_%r.dbf

--

-- DB_UNIQUE_NAME="cdb"

--

-- LOG_ARCHIVE_CONFIG='SEND, RECEIVE, NODG_CONFIG'

-- LOG_ARCHIVE_MAX_PROCESSES=4

-- STANDBY_FILE_MANAGEMENT=MANUAL

-- FAL_CLIENT=''

-- FAL_SERVER=''

--

-- LOG_ARCHIVE_DEST_1='LOCATION=USE_DB_RECOVERY_FILE_DEST'

-- LOG_ARCHIVE_DEST_1='MANDATORY REOPEN=300 NODELAY'

-- LOG_ARCHIVE_DEST_1='ARCH NOAFFIRM NOVERIFY SYNC'

-- LOG_ARCHIVE_DEST_1='NOREGISTER'

-- LOG_ARCHIVE_DEST_1='NOALTERNATE'

-- LOG_ARCHIVE_DEST_1='NODEPENDENCY'

-- LOG_ARCHIVE_DEST_1='NOMAX_FAILURE NOQUOTA_SIZE NOQUOTA_USED NODB_UNIQUE_NAME'

-- LOG_ARCHIVE_DEST_1='VALID_FOR=(PRIMARY_ROLE,ONLINE_LOGFILES)'

-- LOG_ARCHIVE_DEST_STATE_1=ENABLE

--

-- Below are two sets of SQL statements, each of which creates a new

-- control file and uses it to open the database. The first set opens

-- the database with the NORESETLOGS option and should be used only if

-- the current versions of all online logs are available. The second

-- set opens the database with the RESETLOGS option and should be used

-- if online logs are unavailable.

-- The appropriate set of statements can be copied from the trace into

-- a script file, edited as necessary, and executed when there is a

-- need to re-create the control file.

--

-- Set #1. NORESETLOGS case

--

-- The following commands will create a new control file and use it

-- to open the database.

-- Data used by Recovery Manager will be lost.

-- Additional logs may be required for media recovery of offline

-- Use this only if the current versions of all online logs are

-- available.

-- After mounting the created controlfile, the following SQL

-- statement will place the database in the appropriate

-- protection mode:

-- ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCE

STARTUP NOMOUNT

CREATE CONTROLFILE REUSE DATABASE "CDB" NORESETLOGS ARCHIVELOG

MAXLOGFILES 192

MAXLOGMEMBERS 3

MAXDATAFILES 1024

MAXINSTANCES 32

MAXLOGHISTORY 292

LOGFILE

GROUP 1 (

'+DATA/CDB/ONLINELOG/group_1.260.1170496145',

'+DATA1/CDB/ONLINELOG/group_1.356.1170496145'

) SIZE 50M BLOCKSIZE 512,

GROUP 2 (

'+DATA/CDB/ONLINELOG/group_2.270.1170496145',

'+DATA1/CDB/ONLINELOG/group_2.350.1170496145'

) SIZE 50M BLOCKSIZE 512,

GROUP 3 (

'+DATA/CDB/ONLINELOG/group_3.352.1170496145',

'+DATA1/CDB/ONLINELOG/group_3.506.1170496145'

) SIZE 50M BLOCKSIZE 512,

GROUP 4 (

'+DATA/CDB/ONLINELOG/group_4.367.1170496145',

'+DATA1/CDB/ONLINELOG/group_4.387.1170496145'

) SIZE 50M BLOCKSIZE 512,

GROUP 5 (

'+DATA/CDB/ONLINELOG/group_5.372.1170496145',

'+DATA1/CDB/ONLINELOG/group_5.431.1170496147'

) SIZE 50M BLOCKSIZE 512,

GROUP 6 (

'+DATA/CDB/ONLINELOG/group_6.304.1170496147',

'+DATA1/CDB/ONLINELOG/group_6.401.1170496147'

) SIZE 50M BLOCKSIZE 512

-- STANDBY LOGFILE

DATAFILE

'+DATA/CDB/DATAFILE/system.291.1170495997',

'+DATA/CDB/DATAFILE/sysaux.344.1170495997',

'+DATA/CDB/DATAFILE/undotbs1.277.1170495997',

'+DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.292.1170496007',

'+DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.288.1170496007',

'+DATA/CDB/DATAFILE/users.366.1170495997',

'+DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.350.1170496007',

'+DATA/CDB/DATAFILE/undotbs2.360.1170495997',

'+DATA/CDB/DATAFILE/undotbs3.302.1170495997',

'+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.337.1170496003',

'+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.359.1170496003',

'+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.279.1170496003',

'+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.272.1170496003',

'+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.309.1170496003',

'+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.293.1170496003'

CHARACTER SET AL32UTF8

;

-- Commands to re-create incarnation table

-- Below log names MUST be changed to existing filenames on

-- disk. Any one log file from each branch can be used to

-- re-create incarnation records.

-- ALTER DATABASE REGISTER LOGFILE '+DATA1';

-- ALTER DATABASE REGISTER LOGFILE '+DATA1';

-- ALTER DATABASE REGISTER LOGFILE '+DATA1';

-- ALTER DATABASE REGISTER LOGFILE '+DATA1';

-- ALTER DATABASE REGISTER LOGFILE '+DATA1';

-- ALTER DATABASE REGISTER LOGFILE '+DATA1';

-- ALTER DATABASE REGISTER LOGFILE '+DATA1';

-- ALTER DATABASE REGISTER LOGFILE '+DATA1';

-- ALTER DATABASE REGISTER LOGFILE '+DATA1';

-- ALTER DATABASE REGISTER LOGFILE '+DATA1';

-- ALTER DATABASE REGISTER LOGFILE '+DATA1';

-- ALTER DATABASE REGISTER LOGFILE '+DATA1';

-- ALTER DATABASE REGISTER LOGFILE '+DATA1';

-- ALTER DATABASE REGISTER LOGFILE '+DATA1';

-- ALTER DATABASE REGISTER LOGFILE '+DATA1';

-- ALTER DATABASE REGISTER LOGFILE '+DATA1';

-- ALTER DATABASE REGISTER LOGFILE '+DATA1';

-- ALTER DATABASE REGISTER LOGFILE '+DATA1';

-- Recovery is required if any of the datafiles are restored backups,

-- or if the last shutdown was not normal or immediate.

RECOVER DATABASE

-- All logs need archiving and a log switch is needed.

ALTER SYSTEM ARCHIVE LOG ALL;

-- Database can now be opened normally.

ALTER DATABASE OPEN;

-- Open all the PDBs.

ALTER PLUGGABLE DATABASE ALL OPEN;

-- Commands to add tempfiles to temporary tablespaces.

-- Online tempfiles have complete space information.

-- Other tempfiles may require adjustment.

ALTER TABLESPACE TEMP ADD TEMPFILE '+DATA/CDB/TEMPFILE/temp.273.1148478745' REUSE;

ALTER SESSION SET CONTAINER = "PDB$SEED";

ALTER TABLESPACE TEMP ADD TEMPFILE '+DATA/CDB/0633F844101D69CBE0636401A8C09D55/TEMPFILE/temp.313.1170496155' REUSE;

ALTER SESSION SET CONTAINER = "PDB";

ALTER TABLESPACE TEMP ADD TEMPFILE '+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/TEMPFILE/temp.315.1170496155' REUSE;

ALTER SESSION SET CONTAINER = "CDB$ROOT";

-- End of tempfile additions.

--

-- Set #2. RESETLOGS case

--

-- The following commands will create a new control file and use it

-- to open the database.

-- Data used by Recovery Manager will be lost.

-- The contents of online logs will be lost and all backups will

-- be invalidated. Use this only if online logs are damaged.

-- After mounting the created controlfile, the following SQL

-- statement will place the database in the appropriate

-- protection mode:

-- ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCE

STARTUP NOMOUNT

CREATE CONTROLFILE REUSE DATABASE "CDB" RESETLOGS ARCHIVELOG

MAXLOGFILES 192

MAXLOGMEMBERS 3

MAXDATAFILES 1024

MAXINSTANCES 32

MAXLOGHISTORY 292

LOGFILE

GROUP 1 (

'+DATA/CDB/ONLINELOG/group_1.260.1170496145',

'+DATA1/CDB/ONLINELOG/group_1.356.1170496145'

) SIZE 50M BLOCKSIZE 512,

GROUP 2 (

'+DATA/CDB/ONLINELOG/group_2.270.1170496145',

'+DATA1/CDB/ONLINELOG/group_2.350.1170496145'

) SIZE 50M BLOCKSIZE 512

-- STANDBY LOGFILE

DATAFILE

'+DATA/CDB/DATAFILE/system.291.1170495997',

'+DATA/CDB/DATAFILE/sysaux.344.1170495997',

'+DATA/CDB/DATAFILE/undotbs1.277.1170495997',

'+DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.292.1170496007',

'+DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.288.1170496007',

'+DATA/CDB/DATAFILE/users.366.1170495997',

'+DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.350.1170496007',

'+DATA/CDB/DATAFILE/undotbs2.360.1170495997',

'+DATA/CDB/DATAFILE/undotbs3.302.1170495997',

'+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.337.1170496003',

'+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.359.1170496003',

'+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.279.1170496003',

'+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.272.1170496003',

'+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.309.1170496003',

'+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.293.1170496003'

CHARACTER SET AL32UTF8

;

-- Commands to re-create incarnation table

-- Below log names MUST be changed to existing filenames on

-- disk. Any one log file from each branch can be used to

-- re-create incarnation records.

-- ALTER DATABASE REGISTER LOGFILE '+DATA1';

-- ALTER DATABASE REGISTER LOGFILE '+DATA1';

-- ALTER DATABASE REGISTER LOGFILE '+DATA1';

-- ALTER DATABASE REGISTER LOGFILE '+DATA1';

-- ALTER DATABASE REGISTER LOGFILE '+DATA1';

-- ALTER DATABASE REGISTER LOGFILE '+DATA1';

-- ALTER DATABASE REGISTER LOGFILE '+DATA1';

-- ALTER DATABASE REGISTER LOGFILE '+DATA1';

-- ALTER DATABASE REGISTER LOGFILE '+DATA1';

-- ALTER DATABASE REGISTER LOGFILE '+DATA1';

-- ALTER DATABASE REGISTER LOGFILE '+DATA1';

-- ALTER DATABASE REGISTER LOGFILE '+DATA1';

-- ALTER DATABASE REGISTER LOGFILE '+DATA1';

-- ALTER DATABASE REGISTER LOGFILE '+DATA1';

-- ALTER DATABASE REGISTER LOGFILE '+DATA1';

-- ALTER DATABASE REGISTER LOGFILE '+DATA1';

-- ALTER DATABASE REGISTER LOGFILE '+DATA1';

-- ALTER DATABASE REGISTER LOGFILE '+DATA1';

-- Recovery is required if any of the datafiles are restored backups,

-- or if the last shutdown was not normal or immediate.

RECOVER DATABASE USING BACKUP CONTROLFILE

-- Create log files for threads other than thread one.

ALTER DATABASE ADD LOGFILE THREAD 2

GROUP 3 (

'+DATA/CDB/ONLINELOG/group_3.352.1170496145',

'+DATA1/CDB/ONLINELOG/group_3.506.1170496145'

) SIZE 50M BLOCKSIZE 512 REUSE,

GROUP 4 (

'+DATA/CDB/ONLINELOG/group_4.367.1170496145',

'+DATA1/CDB/ONLINELOG/group_4.387.1170496145'

) SIZE 50M BLOCKSIZE 512 REUSE;

ALTER DATABASE ADD LOGFILE THREAD 3

GROUP 5 (

'+DATA/CDB/ONLINELOG/group_5.372.1170496145',

'+DATA1/CDB/ONLINELOG/group_5.431.1170496147'

) SIZE 50M BLOCKSIZE 512 REUSE,

GROUP 6 (

'+DATA/CDB/ONLINELOG/group_6.304.1170496147',

'+DATA1/CDB/ONLINELOG/group_6.401.1170496147'

) SIZE 50M BLOCKSIZE 512 REUSE;

-- Database can now be opened zeroing the online logs.

ALTER DATABASE OPEN RESETLOGS;

-- Open all the PDBs.

ALTER PLUGGABLE DATABASE ALL OPEN;

-- Commands to add tempfiles to temporary tablespaces.

-- Online tempfiles have complete space information.

-- Other tempfiles may require adjustment.

ALTER TABLESPACE TEMP ADD TEMPFILE '+DATA/CDB/TEMPFILE/temp.273.1148478745' REUSE;

ALTER SESSION SET CONTAINER = "PDB$SEED";

ALTER TABLESPACE TEMP ADD TEMPFILE '+DATA/CDB/0633F844101D69CBE0636401A8C09D55/TEMPFILE/temp.313.1170496155' REUSE;

ALTER SESSION SET CONTAINER = "PDB";

ALTER TABLESPACE TEMP ADD TEMPFILE '+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/TEMPFILE/temp.315.1170496155' REUSE;

ALTER SESSION SET CONTAINER = "CDB$ROOT";

-- End of tempfile additions.

--

[oracle@rac1 trace]$

RMAN> restore controlfile from '+data1/CDB/BACKUPSET/2024_02_03/annnf0_TAG20240203T233633_0.260.1159958193';

Starting restore at 20240602 13:16:00

allocated channel: ORA_DISK_1

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

channel ORA_DISK_1: restoring control file

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

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

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

RMAN-03002: failure of restore command at 06/02/2024 13:16:01

ORA-19870: error while restoring backup piece +DATA1/CDB/BACKUPSET/2024_02_03/annnf0_tag20240203t233633_0.260.1159958193

ORA-19626: backup set type is archived log - can not be processed by this conversation

RMAN> restore controlfile from '+data1/CDB/BACKUPSET/2024_02_03/annnf0_TAG20240203T233652_0.320.1159958213';

Starting restore at 20240602 13:16:13

using channel ORA_DISK_1

channel ORA_DISK_1: restoring control file

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

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

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

RMAN-03002: failure of restore command at 06/02/2024 13:16:14

ORA-19870: error while restoring backup piece +DATA1/CDB/BACKUPSET/2024_02_03/annnf0_tag20240203t233652_0.320.1159958213

ORA-19626: backup set type is archived log - can not be processed by this conversation

RMAN> restore controlfile from '+data1/CDB/BACKUPSET/2024_02_03/nnndf0_TAG20240203T233636_0.314.1159958197';

Starting restore at 20240602 13:16:22

using channel ORA_DISK_1

channel ORA_DISK_1: restoring control file

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

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

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

RMAN-03002: failure of restore command at 06/02/2024 13:16:23

ORA-19697: standby control file not found in backup set

SQL> CREATE CONTROLFILE REUSE DATABASE "CDB" NORESETLOGS ARCHIVELOG

2 MAXLOGFILES 192

3 MAXLOGMEMBERS 3

4 MAXDATAFILES 1024

5 MAXINSTANCES 32

6 MAXLOGHISTORY 292

7 LOGFILE

8 GROUP 1 (

9 '+DATA/CDB/ONLINELOG/group_1.260.1170496145',

10 '+DATA1/CDB/ONLINELOG/group_1.356.1170496145'

11 ) SIZE 50M BLOCKSIZE 512,

12 GROUP 2 (

13 '+DATA/CDB/ONLINELOG/group_2.270.1170496145',

14 '+DATA1/CDB/ONLINELOG/group_2.350.1170496145'

15 ) SIZE 50M BLOCKSIZE 512,

16 GROUP 3 (

17 '+DATA/CDB/ONLINELOG/group_3.352.1170496145',

18 '+DATA1/CDB/ONLINELOG/group_3.506.1170496145'

19 ) SIZE 50M BLOCKSIZE 512,

20 GROUP 4 (

21 '+DATA/CDB/ONLINELOG/group_4.367.1170496145',

22 '+DATA1/CDB/ONLINELOG/group_4.387.1170496145'

23 ) SIZE 50M BLOCKSIZE 512,

24 GROUP 5 (

25 '+DATA/CDB/ONLINELOG/group_5.372.1170496145',

26 '+DATA1/CDB/ONLINELOG/group_5.431.1170496147'

27 ) SIZE 50M BLOCKSIZE 512,

28 GROUP 6 (

29 '+DATA/CDB/ONLINELOG/group_6.304.1170496147',

30 '+DATA1/CDB/ONLINELOG/group_6.401.1170496147'

31 ) SIZE 50M BLOCKSIZE 512

32 -- STANDBY LOGFILE

33 DATAFILE

34 '+DATA/CDB/DATAFILE/system.291.1170495997',

35 '+DATA/CDB/DATAFILE/sysaux.344.1170495997',

36 '+DATA/CDB/DATAFILE/undotbs1.277.1170495997',

37 '+DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.292.1170496007',

38 '+DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.288.1170496007',

39 '+DATA/CDB/DATAFILE/users.366.1170495997',

40 '+DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.350.1170496007',

41 '+DATA/CDB/DATAFILE/undotbs2.360.1170495997',

42 '+DATA/CDB/DATAFILE/undotbs3.302.1170495997',

43 '+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.337.1170496003',

44 '+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.359.1170496003',

45 '+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.279.1170496003',

46 '+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.272.1170496003',

47 '+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.309.1170496003',

48 '+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.293.1170496003'

49 CHARACTER SET AL32UTF8

50 ;

CREATE CONTROLFILE REUSE DATABASE "CDB" NORESETLOGS ARCHIVELOG

*

ERROR at line 1:

ORA-01503: CREATE CONTROLFILE failed

ORA-12720: operation requires database is in EXCLUSIVE mode

SQL> alter database mount exclusive;

Database altered.

SQL>

49 CHARACTER SET AL32UTF8

50 ;

CREATE CONTROLFILE REUSE DATABASE "CDB" NORESETLOGS ARCHIVELOG

*

ERROR at line 1:

ORA-01503: CREATE CONTROLFILE failed

ORA-01100: database already mounted

SQL> startup nomount exclusive force;

ORACLE instance started.

Total System Global Area 2382361320 bytes

Fixed Size 9167592 bytes

Variable Size 1224736768 bytes

Database Buffers 1140850688 bytes

Redo Buffers 7606272 bytes

SQL> CREATE CONTROLFILE REUSE DATABASE "CDB" NORESETLOGS ARCHIVELOG

CREATE CONTROLFILE REUSE DATABASE "CDB" NORESETLOGS ARCHIVELOG

*

ERROR at line 1:

ORA-01503: CREATE CONTROLFILE failed

ORA-12720: operation requires database is in EXCLUSIVE mode

SQL> alter database nomount exclusive;

alter database nomount exclusive

*

ERROR at line 1:

ORA-02231: missing or invalid option to ALTER DATABASE

SQL> alter system set cluster_database=FALSE scope=spfile sid='*';

System altered.

SQL> CREATE CONTROLFILE REUSE DATABASE "CDB" NORESETLOGS ARCHIVELOG

2 MAXLOGFILES 192

3 MAXLOGMEMBERS 3

4 MAXDATAFILES 1024

5 MAXINSTANCES 32

6 MAXLOGHISTORY 292

48 '+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.293.1170496003'

49 CHARACTER SET AL32UTF8

50 ;

CREATE CONTROLFILE REUSE DATABASE "CDB" NORESETLOGS ARCHIVELOG

*

ERROR at line 1:

ORA-01503: CREATE CONTROLFILE failed

ORA-12720: operation requires database is in EXCLUSIVE mode

SQL> startup nomount force;
ORACLE instance started.

Total System Global Area 2382361320 bytes

Fixed Size 9167592 bytes

Variable Size 1224736768 bytes

Database Buffers 1140850688 bytes

Redo Buffers 7606272 bytes

SQL> CREATE CONTROLFILE REUSE DATABASE "CDB" NORESETLOGS ARCHIVELOG

2 MAXLOGFILES 192

3 MAXLOGMEMBERS 3

4 MAXDATAFILES 1024

5 MAXINSTANCES 32

6 MAXLOGHISTORY 292

7 LOGFILE

8 GROUP 1 (

9 '+DATA/CDB/ONLINELOG/group_1.260.1170496145',

10 '+DATA1/CDB/ONLINELOG/group_1.356.1170496145'

11 ) SIZE 50M BLOCKSIZE 512,

12 GROUP 2 (

13 '+DATA/CDB/ONLINELOG/group_2.270.1170496145',

14 '+DATA1/CDB/ONLINELOG/group_2.350.1170496145'

15 ) SIZE 50M BLOCKSIZE 512,

16 GROUP 3 (

17 '+DATA/CDB/ONLINELOG/group_3.352.1170496145',

18 '+DATA1/CDB/ONLINELOG/group_3.506.1170496145'

19 ) SIZE 50M BLOCKSIZE 512,

20 GROUP 4 (

21 '+DATA/CDB/ONLINELOG/group_4.367.1170496145',

22 '+DATA1/CDB/ONLINELOG/group_4.387.1170496145'

23 ) SIZE 50M BLOCKSIZE 512,

24 GROUP 5 (

25 '+DATA/CDB/ONLINELOG/group_5.372.1170496145',

26 '+DATA1/CDB/ONLINELOG/group_5.431.1170496147'

27 ) SIZE 50M BLOCKSIZE 512,

28 GROUP 6 (

29 '+DATA/CDB/ONLINELOG/group_6.304.1170496147',

30 '+DATA1/CDB/ONLINELOG/group_6.401.1170496147'

31 ) SIZE 50M BLOCKSIZE 512

32 -- STANDBY LOGFILE

33 DATAFILE

34 '+DATA/CDB/DATAFILE/system.291.1170495997',

35 '+DATA/CDB/DATAFILE/sysaux.344.1170495997',

36 '+DATA/CDB/DATAFILE/undotbs1.277.1170495997',

37 '+DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.292.1170496007',

38 '+DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.288.1170496007',

39 '+DATA/CDB/DATAFILE/users.366.1170495997',

40 '+DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.350.1170496007',

41 '+DATA/CDB/DATAFILE/undotbs2.360.1170495997',

42 '+DATA/CDB/DATAFILE/undotbs3.302.1170495997',

43 '+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.337.1170496003',

44 '+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.359.1170496003',

45 '+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.279.1170496003',

46 '+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.272.1170496003',

47 '+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.309.1170496003',

48 '+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.293.1170496003'

49 CHARACTER SET AL32UTF8

50 ;

CREATE CONTROLFILE REUSE DATABASE "CDB" NORESETLOGS ARCHIVELOG

*

ERROR at line 1:

ORA-01503: CREATE CONTROLFILE failed
ORA-01189: file is from a different RESETLOGS than previous files
ORA-01517: log member: '+DATA/CDB/ONLINELOG/group_1.260.1170496145'

ERROR at line 1:

ORA-01503: CREATE CONTROLFILE failed

ORA-01565: error in identifying file

'+DATA/CDB/ONLINELOG/group_1.260.1170496145'

ORA-17503: ksfdopn:2 Failed to open file

+DATA/CDB/ONLINELOG/group_1.260.1170496145
ORA-15012: ASM file '+DATA/CDB/ONLINELOG/group_1.260.1170496145' does not exist

SQL>

SQL> CREATE CONTROLFILE REUSE DATABASE "CDB" RESETLOGS ARCHIVELOG

2 MAXLOGFILES 192

3 MAXLOGMEMBERS 3

4 MAXDATAFILES 1024

5 MAXINSTANCES 32

6 MAXLOGHISTORY 292

7 LOGFILE

8 GROUP 1 (

9 '+DATA/CDB/ONLINELOG/group_1.260.1170496145',

10 '+DATA1/CDB/ONLINELOG/group_1.356.1170496145'

11 ) SIZE 50M BLOCKSIZE 512,

12 GROUP 2 (

13 '+DATA/CDB/ONLINELOG/group_2.270.1170496145',

14 '+DATA1/CDB/ONLINELOG/group_2.350.1170496145'

15 ) SIZE 50M BLOCKSIZE 512,

16 GROUP 3 (

17 '+DATA/CDB/ONLINELOG/group_3.352.1170496145',

18 '+DATA1/CDB/ONLINELOG/group_3.506.1170496145'

19 ) SIZE 50M BLOCKSIZE 512,

20 GROUP 4 (

21 '+DATA/CDB/ONLINELOG/group_4.367.1170496145',

22 '+DATA1/CDB/ONLINELOG/group_4.387.1170496145'

23 ) SIZE 50M BLOCKSIZE 512,

24 GROUP 5 (

25 '+DATA/CDB/ONLINELOG/group_5.372.1170496145',

26 '+DATA1/CDB/ONLINELOG/group_5.431.1170496147'

27 ) SIZE 50M BLOCKSIZE 512,

28 GROUP 6 (

29 '+DATA/CDB/ONLINELOG/group_6.304.1170496147',

30 '+DATA1/CDB/ONLINELOG/group_6.401.1170496147'

31 ) SIZE 50M BLOCKSIZE 512

32 -- STANDBY LOGFILE

33 DATAFILE

34 '+DATA/CDB/DATAFILE/system.291.1170495997',

35 '+DATA/CDB/DATAFILE/sysaux.344.1170495997',

36 '+DATA/CDB/DATAFILE/undotbs1.277.1170495997',

37 '+DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.292.1170496007',

38 '+DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.288.1170496007',

39 '+DATA/CDB/DATAFILE/users.366.1170495997',

40 '+DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.350.1170496007',

41 '+DATA/CDB/DATAFILE/undotbs2.360.1170495997',

42 '+DATA/CDB/DATAFILE/undotbs3.302.1170495997',

43 '+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.337.1170496003',

44 '+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.359.1170496003',

45 '+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.279.1170496003',

46 '+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.272.1170496003',

47 '+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.309.1170496003',

48 '+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.293.1170496003'

49 CHARACTER SET AL32UTF8

50 ;

Control file created.

SQL>

SQL>

SQL>

SQL>

SQL>

SQL>

SQL>

SQL>

SQL>

SQL>

SQL> alter database mount;

alter database mount

*

ERROR at line 1:

ORA-01100: database already mounted

SQL> exit

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

Version 19.20.0.0.0

[oracle@rac1 trace]$ rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Sun Jun 2 14:13:49 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 of database;

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 1920977 26-SEP-23

2 2 CDB 2265125454 CURRENT 7341211 01-JUN-24

RMAN> catalog backuppiece '+data1/CDB/BACKUPSET/2024_02_03/annnf0_TAG20240203T233633_0.260.1159958193';

channel default: cataloged backup piece

backup piece handle=+DATA1/CDB/BACKUPSET/2024_02_03/annnf0_tag20240203t233633_0.260.1159958193 RECID=1 STAMP=1170598742

RMAN> catalog backuppiece '+data1/CDB/BACKUPSET/2024_02_03/';

ORA-19870: error while restoring backup piece +DATA1/CDB/BACKUPSET/2024_02_03/

ORA-19505: failed to identify file "+DATA1/CDB/BACKUPSET/2024_02_03/"

ORA-17503: ksfdopn:2 Failed to open file +DATA1/CDB/BACKUPSET/2024_02_03/

ORA-15113: alias name '2024_02_03' refers to a directory

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

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

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

RMAN-03002: failure of catalog command at 06/02/2024 14:19:16

RMAN-06209: List of failed objects

RMAN-06211: ==========================

RMAN-06212: Object Type Filename/Handle

RMAN-06213: --------------- ---------------------------------------------------

RMAN-06214: Backup Piece +DATA1/CDB/BACKUPSET/2024_02_03/

RMAN> catalog backup '+data1/CDB/BACKUPSET/2024_02_03/';

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

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

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

RMAN-00558: error encountered while parsing input commands

RMAN-01009: syntax error: found "single-quoted-string": expecting one of: "controlfile"

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

RMAN> catalog backuppiece '+data1/CDB/BACKUPSET/2024_02_03/annnf0_TAG20240203T233652_0.320.1159958213';

catalog backuppiece '+data1/CDB/BACKUPSET/2024_02_03/nnndf0_TAG20240203T233636_0.314.1159958197';channel default: cataloged backup piece

backup piece handle=+DATA1/CDB/BACKUPSET/2024_02_03/annnf0_tag20240203t233652_0.320.1159958213 RECID=2 STAMP=1170598799

RMAN>

channel default: cataloged backup piece

backup piece handle=+DATA1/CDB/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.314.1159958197 RECID=3 STAMP=1170598800

RMAN> list backupset of database;

List of Backup Sets

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

BS Key Type LV Size Device Type Elapsed Time Completion Time


3 Full 1.70G DISK 00:00:05 03-FEB-24

BP Key: 3 Status: AVAILABLE Compressed: NO Tag: TAG20240203T233636

Piece Name: +DATA1/CDB/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.314.1159958197

List of Datafiles in backup set 3

File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name


1 Full 7341188 03-FEB-24 NO +DATA/CDB/DATAFILE/system.291.1170495997

3 Full 7341188 03-FEB-24 NO +DATA/CDB/DATAFILE/sysaux.344.1170495997

4 Full 7341188 03-FEB-24 NO +DATA/CDB/DATAFILE/undotbs1.277.1170495997

7 Full 7341188 03-FEB-24 NO +DATA/CDB/DATAFILE/users.366.1170495997

9 Full 7341188 03-FEB-24 NO +DATA/CDB/DATAFILE/undotbs2.360.1170495997

10 Full 7341188 03-FEB-24 NO +DATA/CDB/DATAFILE/undotbs3.302.1170495997

RMAN> CATALOG START WITH '+data1';

searching for all files that match the pattern +data1

List of Files Unknown to the Database

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

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_02/thread_1_seq_10.750.1170548473

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_02/thread_1_seq_11.484.1170548519

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_02/thread_1_seq_12.496.1170548549

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_02/thread_1_seq_13.485.1170549409

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_02/thread_1_seq_12.483.1170549409

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_02/thread_2_seq_5.374.1170549409

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_02/thread_2_seq_4.362.1170549411

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_02/thread_3_seq_3.466.1170549411

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_02/thread_3_seq_4.460.1170549411

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_02/thread_1_seq_1.501.1170550665

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_90.424.1170496125

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_1.417.1170496153

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_68.505.1170496125

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_1.413.1170496153

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_1.421.1170496877

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_2.379.1170497033

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_2.447.1170499227

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_2.470.1170499073

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_3.504.1170499227

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_3.274.1170499227

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_3.751.1170499227

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_4.428.1170499227

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_5.422.1170499229

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_6.438.1170499229

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_4.448.1170499231

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_4.474.1170500337

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_5.480.1170500443

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_7.468.1170501865

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_8.440.1170501953

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_9.402.1170502147

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_02/s_1170592622.403.1170549423

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_02/s_1170593882.535.1170550683

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_02/s_1170594745.398.1170552193

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170543934.412.1170501767

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170543934.507.1170501837

File Name: +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/BACKUPSET/2024_06_01/nnndf0_tag20240601t232220_0.317.1170501751

File Name: +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/BACKUPSET/2024_06_01/nnndf0_tag20240601t232326_0.371.1170501821

File Name: +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.316.1159958207

File Name: +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_06_01/nnndf0_tag20240601t232220_0.321.1170501743

File Name: +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_06_01/nnndf0_tag20240601t232326_0.436.1170501815

File Name: +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.315.1159958205

File Name: +DATA1/CDB/BACKUPSET/2024_06_01/nnndf0_tag20240601t232220_0.419.1170501741

File Name: +DATA1/CDB/BACKUPSET/2024_06_01/annnf0_tag20240601t232324_0.746.1170501805

File Name: +DATA1/CDB/BACKUPSET/2024_06_01/annnf0_tag20240601t232324_0.382.1170501805

File Name: +DATA1/CDB/BACKUPSET/2024_06_01/nnndf0_tag20240601t232326_0.441.1170501807

Do you really want to catalog the above files (enter YES or NO)? YES

cataloging files...

cataloging done

List of Cataloged Files

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

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_02/thread_1_seq_10.750.1170548473

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_02/thread_1_seq_11.484.1170548519

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_02/thread_1_seq_12.496.1170548549

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_02/thread_1_seq_13.485.1170549409

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_02/thread_1_seq_12.483.1170549409

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_02/thread_2_seq_5.374.1170549409

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_02/thread_2_seq_4.362.1170549411

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_02/thread_3_seq_3.466.1170549411

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_02/thread_3_seq_4.460.1170549411

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_02/thread_1_seq_1.501.1170550665

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_90.424.1170496125

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_1.417.1170496153

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_68.505.1170496125

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_1.413.1170496153

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_1.421.1170496877

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_2.379.1170497033

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_2.447.1170499227

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_2.470.1170499073

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_3.504.1170499227

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_3.274.1170499227

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_3.751.1170499227

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_4.428.1170499227

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_5.422.1170499229

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_6.438.1170499229

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_4.448.1170499231

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_4.474.1170500337

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_5.480.1170500443

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_7.468.1170501865

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_8.440.1170501953

File Name: +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_1_seq_9.402.1170502147

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_02/s_1170592622.403.1170549423

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_02/s_1170593882.535.1170550683

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_02/s_1170594745.398.1170552193

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170543934.412.1170501767

File Name: +DATA1/CDB/AUTOBACKUP/2024_06_01/s_1170543934.507.1170501837

File Name: +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/BACKUPSET/2024_06_01/nnndf0_tag20240601t232220_0.317.1170501751

File Name: +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/BACKUPSET/2024_06_01/nnndf0_tag20240601t232326_0.371.1170501821

File Name: +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.316.1159958207

File Name: +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_06_01/nnndf0_tag20240601t232220_0.321.1170501743

File Name: +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_06_01/nnndf0_tag20240601t232326_0.436.1170501815

File Name: +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.315.1159958205

File Name: +DATA1/CDB/BACKUPSET/2024_06_01/nnndf0_tag20240601t232220_0.419.1170501741

File Name: +DATA1/CDB/BACKUPSET/2024_06_01/annnf0_tag20240601t232324_0.746.1170501805

File Name: +DATA1/CDB/BACKUPSET/2024_06_01/annnf0_tag20240601t232324_0.382.1170501805

File Name: +DATA1/CDB/BACKUPSET/2024_06_01/nnndf0_tag20240601t232326_0.441.1170501807

RMAN> list backupset of database;

List of Backup Sets

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

BS Key Type LV Size Device Type Elapsed Time Completion Time


3 Full 1.70G DISK 00:00:05 03-FEB-24

BP Key: 3 Status: AVAILABLE Compressed: NO Tag: TAG20240203T233636

Piece Name: +DATA1/CDB/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.314.1159958197

List of Datafiles in backup set 3

File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name


1 Full 7341188 03-FEB-24 NO +DATA/CDB/DATAFILE/system.291.1170495997

3 Full 7341188 03-FEB-24 NO +DATA/CDB/DATAFILE/sysaux.344.1170495997

4 Full 7341188 03-FEB-24 NO +DATA/CDB/DATAFILE/undotbs1.277.1170495997

7 Full 7341188 03-FEB-24 NO +DATA/CDB/DATAFILE/users.366.1170495997

9 Full 7341188 03-FEB-24 NO +DATA/CDB/DATAFILE/undotbs2.360.1170495997

10 Full 7341188 03-FEB-24 NO +DATA/CDB/DATAFILE/undotbs3.302.1170495997

BS Key Type LV Size Device Type Elapsed Time Completion Time


9 Full 1019.80M DISK 00:00:11 01-JUN-24

BP Key: 9 Status: AVAILABLE Compressed: NO Tag: TAG20240601T232220

Piece Name: +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/BACKUPSET/2024_06_01/nnndf0_tag20240601t232220_0.317.1170501751

List of Datafiles in backup set 9

Container ID: 2, PDB Name: PDB$SEED

File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name


5 Full 5317292 27-SEP-23 NO +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.292.1170496007

6 Full 5317292 27-SEP-23 NO +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.288.1170496007

8 Full 5317292 27-SEP-23 NO +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.350.1170496007

BS Key Type LV Size Device Type Elapsed Time Completion Time


10 Full 1019.80M DISK 00:00:11 01-JUN-24

BP Key: 10 Status: AVAILABLE Compressed: NO Tag: TAG20240601T232326

Piece Name: +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/BACKUPSET/2024_06_01/nnndf0_tag20240601t232326_0.371.1170501821

List of Datafiles in backup set 10

Container ID: 2, PDB Name: PDB$SEED

File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name


5 Full 5317292 27-SEP-23 NO +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.292.1170496007

6 Full 5317292 27-SEP-23 NO +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.288.1170496007

8 Full 5317292 27-SEP-23 NO +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.350.1170496007

BS Key Type LV Size Device Type Elapsed Time Completion Time


11 Full 1019.80M DISK 00:00:01 03-FEB-24

BP Key: 11 Status: AVAILABLE Compressed: NO Tag: TAG20240203T233636

Piece Name: +DATA1/CDB/0633F844101D69CBE0636401A8C09D55/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.316.1159958207

List of Datafiles in backup set 11

Container ID: 2, PDB Name: PDB$SEED

File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name


5 Full 5317292 27-SEP-23 NO +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.292.1170496007

6 Full 5317292 27-SEP-23 NO +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.288.1170496007

8 Full 5317292 27-SEP-23 NO +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.350.1170496007

BS Key Type LV Size Device Type Elapsed Time Completion Time


12 Full 1.02G DISK 00:00:05 01-JUN-24

BP Key: 12 Status: AVAILABLE Compressed: NO Tag: TAG20240601T232220

Piece Name: +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_06_01/nnndf0_tag20240601t232220_0.321.1170501743

List of Datafiles in backup set 12

Container ID: 3, PDB Name: _###UNKNOWN_PDB#_3

File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name


11 Full 7786767 01-JUN-24 NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.337.1170496003

12 Full 7786767 01-JUN-24 NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.359.1170496003

13 Full 7786767 01-JUN-24 NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.279.1170496003

14 Full 7786767 01-JUN-24 7808049 NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.272.1170496003

15 Full 7786767 01-JUN-24 7810880 NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.309.1170496003

16 Full 7786767 01-JUN-24 NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.293.1170496003

BS Key Type LV Size Device Type Elapsed Time Completion Time


13 Full 1.02G DISK 00:00:03 01-JUN-24

BP Key: 13 Status: AVAILABLE Compressed: NO Tag: TAG20240601T232326

Piece Name: +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_06_01/nnndf0_tag20240601t232326_0.436.1170501815

List of Datafiles in backup set 13

Container ID: 3, PDB Name: _###UNKNOWN_PDB#_3

File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name


11 Full 7786767 01-JUN-24 NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.337.1170496003

12 Full 7786767 01-JUN-24 NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.359.1170496003

13 Full 7786767 01-JUN-24 NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.279.1170496003

14 Full 7786767 01-JUN-24 7808049 NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.272.1170496003

15 Full 7786767 01-JUN-24 7810880 NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.309.1170496003

16 Full 7786767 01-JUN-24 NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.293.1170496003

BS Key Type LV Size Device Type Elapsed Time Completion Time


14 Full 1.02G DISK 00:00:01 03-FEB-24

BP Key: 14 Status: AVAILABLE Compressed: NO Tag: TAG20240203T233636

Piece Name: +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.315.1159958205

List of Datafiles in backup set 14

Container ID: 3, PDB Name: _###UNKNOWN_PDB#_3

File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name


11 Full 7341196 03-FEB-24 NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.337.1170496003

12 Full 7341196 03-FEB-24 NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.359.1170496003

13 Full 7341196 03-FEB-24 NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.279.1170496003

14 Full 7341196 03-FEB-24 NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.272.1170496003

15 Full 7341196 03-FEB-24 NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.309.1170496003

16 Full 7341196 03-FEB-24 NO +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.293.1170496003

BS Key Type LV Size Device Type Elapsed Time Completion Time


15 Full 1.71G DISK 00:00:03 01-JUN-24

BP Key: 15 Status: AVAILABLE Compressed: NO Tag: TAG20240601T232220

Piece Name: +DATA1/CDB/BACKUPSET/2024_06_01/nnndf0_tag20240601t232220_0.419.1170501741

List of Datafiles in backup set 15

File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name


1 Full 7786767 01-JUN-24 7811061 NO +DATA/CDB/DATAFILE/system.291.1170495997

3 Full 7786767 01-JUN-24 7811159 NO +DATA/CDB/DATAFILE/sysaux.344.1170495997

4 Full 7786767 01-JUN-24 7811161 NO +DATA/CDB/DATAFILE/undotbs1.277.1170495997

7 Full 7786767 01-JUN-24 NO +DATA/CDB/DATAFILE/users.366.1170495997

9 Full 7786767 01-JUN-24 7810843 NO +DATA/CDB/DATAFILE/undotbs2.360.1170495997

10 Full 7786767 01-JUN-24 7808091 NO +DATA/CDB/DATAFILE/undotbs3.302.1170495997

BS Key Type LV Size Device Type Elapsed Time Completion Time


18 Full 1.71G DISK 00:00:04 01-JUN-24

BP Key: 18 Status: AVAILABLE Compressed: NO Tag: TAG20240601T232326

Piece Name: +DATA1/CDB/BACKUPSET/2024_06_01/nnndf0_tag20240601t232326_0.441.1170501807

List of Datafiles in backup set 18

File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name


1 Full 7786767 01-JUN-24 7811061 NO +DATA/CDB/DATAFILE/system.291.1170495997

3 Full 7786767 01-JUN-24 7811159 NO +DATA/CDB/DATAFILE/sysaux.344.1170495997

4 Full 7786767 01-JUN-24 7811161 NO +DATA/CDB/DATAFILE/undotbs1.277.1170495997

7 Full 7786767 01-JUN-24 NO +DATA/CDB/DATAFILE/users.366.1170495997

9 Full 7786767 01-JUN-24 7810843 NO +DATA/CDB/DATAFILE/undotbs2.360.1170495997

10 Full 7786767 01-JUN-24 7808091 NO +DATA/CDB/DATAFILE/undotbs3.302.1170495997

RMAN> list incarnation of database;

List of Database Incarnations

DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time


1 1 CDB 2265125454 PARENT 1920977 26-SEP-23

2 2 CDB 2265125454 PARENT 7341211 01-JUN-24

3 3 CDB 2265125454 PARENT 8347838 02-JUN-24

4 4 CDB 2265125454 CURRENT 8352318 02-JUN-24

RMAN> run {

2> set until time "to_date('2024-03-01 22:24:16', 'yyyy-mm-dd:hh24:mi:ss')";

3> restore database;

4> recover database;

5> alter database open resetlogs;

6> }

executing command: SET until clause

Starting restore at 02-JUN-24

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=786 device type=DISK

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

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

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

RMAN-03002: failure of restore command at 06/02/2024 14:25:40
RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time

RMAN> reset database to incarnation 1;

database reset to incarnation 1

RMAN> run {

2> set until time "to_date('2024-03-01 22:24:16', 'yyyy-mm-dd:hh24:mi:ss')";

3> restore database;

4> recover database;

5> alter database open resetlogs;

6> }

executing command: SET until clause

Starting restore at 02-JUN-24

using channel ORA_DISK_1

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

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

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

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.291.1170495997

channel ORA_DISK_1: restoring datafile 00003 to +DATA/CDB/DATAFILE/sysaux.344.1170495997

channel ORA_DISK_1: restoring datafile 00004 to +DATA/CDB/DATAFILE/undotbs1.277.1170495997

channel ORA_DISK_1: restoring datafile 00007 to +DATA/CDB/DATAFILE/users.366.1170495997

channel ORA_DISK_1: restoring datafile 00009 to +DATA/CDB/DATAFILE/undotbs2.360.1170495997

channel ORA_DISK_1: restoring datafile 00010 to +DATA/CDB/DATAFILE/undotbs3.302.1170495997

channel ORA_DISK_1: reading from backup piece +DATA1/CDB/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.314.1159958197

channel ORA_DISK_1: piece handle=+DATA1/CDB/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.314.1159958197 tag=TAG20240203T233636

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.337.1170496003

channel ORA_DISK_1: restoring datafile 00012 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.359.1170496003

channel ORA_DISK_1: restoring datafile 00013 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.279.1170496003

channel ORA_DISK_1: restoring datafile 00014 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.272.1170496003

channel ORA_DISK_1: restoring datafile 00015 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.309.1170496003

channel ORA_DISK_1: restoring datafile 00016 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.293.1170496003

channel ORA_DISK_1: reading from backup piece +DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.315.1159958205

channel ORA_DISK_1: piece handle=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_02_03/nnndf0_tag20240203t233636_0.315.1159958205 tag=TAG20240203T233636

channel ORA_DISK_1: restored backup piece 1

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

Finished restore at 02-JUN-24

Starting recover at 02-JUN-24

using channel ORA_DISK_1

starting media recovery

archived log for thread 2 with sequence 90 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_90.424.1170496125

archived log for thread 3 with sequence 68 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_68.505.1170496125

channel ORA_DISK_1: starting archived log restore to default destination

channel ORA_DISK_1: restoring archived log

archived log thread=1 sequence=117

channel ORA_DISK_1: reading from backup piece +DATA1/CDB/BACKUPSET/2024_02_03/annnf0_tag20240203t233652_0.320.1159958213

channel ORA_DISK_1: piece handle=+DATA1/CDB/BACKUPSET/2024_02_03/annnf0_tag20240203t233652_0.320.1159958213 tag=TAG20240203T233652

channel ORA_DISK_1: restored backup piece 1

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

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_02/thread_1_seq_117.401.1170555985 thread=1 sequence=117

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_2_seq_90.424.1170496125 thread=2 sequence=90

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_01/thread_3_seq_68.505.1170496125 thread=3 sequence=68

channel default: deleting archived log(s)

archived log file name=+DATA1/CDB/ARCHIVELOG/2024_06_02/thread_1_seq_117.401.1170555985 RECID=31 STAMP=1170599185

unable to find archived log

archived log thread=1 sequence=118

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

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

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

RMAN-03002: failure of recover command at 06/02/2024 14:26:26
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 118 and starting SCN of 7341210

RMAN> alter databsae open resetlogs;

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

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

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

RMAN-03002: failure of sql statement command at 06/02/2024 14:26:39

ORA-00940: invalid ALTER command

RMAN> alter database open resetlogs;

Statement processed

[oracle@rac1 ~]$ export NLS_DATE_FORMAT='yyyymmdd hh24:mi:ss';

[oracle@rac1 ~]$ rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Sun Jun 2 15:06:28 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 backup of archivelog all;

using target database control file instead of recovery catalog

List of Backup Sets

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

BS Key Size Device Type Elapsed Time Completion Time


11 597.72M DISK 00:00:01 20240203 23:36:34

BP Key: 11 Status: AVAILABLE Compressed: NO Tag: TAG20240203T233633

Piece Name: +DATA1/CDB/BACKUPSET/2024_02_03/annnf0_tag20240203t233633_0.260.1159958193

List of Archived Logs in backup set 11

Thrd Seq Low SCN Low Time Next SCN Next Time


1 99 5636553 20230927 00:17:47 5770215 20231230 10:26:39

1 100 5770215 20231230 10:26:39 5775073 20231230 10:27:47

1 101 5775073 20231230 10:27:47 5882032 20231230 10:29:11

1 102 5882032 20231230 10:29:11 5882034 20231230 10:29:11

1 103 5890308 20231230 10:30:56 5999175 20231230 11:15:42

1 104 5999175 20231230 11:15:42 5999343 20231230 11:15:43

1 105 6001430 20231230 11:16:53 6028408 20231230 11:43:14

1 106 6028408 20231230 11:43:14 6252160 20231230 12:24:27

1 107 6252160 20231230 12:24:27 6252165 20231230 12:24:27

1 108 6454652 20231230 12:56:14 6568425 20231230 12:58:19

1 109 6568425 20231230 12:58:19 6568427 20231230 12:58:19

1 110 6670534 20231230 13:05:32 6994974 20231230 13:32:51

1 111 6994974 20231230 13:32:51 6994978 20231230 13:32:52

1 112 6994978 20231230 13:32:52 6994980 20231230 13:32:52

1 113 6994980 20231230 13:32:52 6995111 20231230 13:32:55

1 114 6996934 20231230 13:33:43 7117094 20231230 13:48:36

1 115 7117094 20231230 13:48:36 7117096 20231230 13:48:36

1 116 7325905 20240203 10:28:58 7341169 20240203 10:36:31

2 76 5663796 20230927 01:00:03 5770214 20231230 10:26:39

2 77 5770214 20231230 10:26:39 5770393 20231230 10:26:42

2 78 5882097 20231230 10:29:12 5999176 20231230 11:15:43

2 79 5999176 20231230 11:15:43 6131823 20231230 12:09:58

2 80 6131823 20231230 12:09:58 6131825 20231230 12:09:58

2 81 6132748 20231230 12:10:21 6352336 20231230 12:25:14

2 82 6352336 20231230 12:25:14 6352338 20231230 12:25:14

2 83 6454653 20231230 12:56:14 6668633 20231230 13:04:40

2 84 6668633 20231230 13:04:40 6894895 20231230 13:30:45

2 85 6894895 20231230 13:30:45 6894897 20231230 13:30:45

2 86 6996933 20231230 13:33:43 7117187 20231230 13:48:36

2 87 7117187 20231230 13:48:36 7217500 20231230 13:49:14

2 88 7217500 20231230 13:49:14 7217502 20231230 13:49:14

2 89 7325906 20240203 10:28:57 7341166 20240203 10:36:31

3 52 5645090 20230927 00:18:35 5770214 20231230 10:26:39

3 53 5770214 20231230 10:26:39 5770395 20231230 10:26:42

3 54 5778723 20231230 10:28:03 5999175 20231230 11:15:43

3 55 5999175 20231230 11:15:43 5999345 20231230 11:15:43

3 56 6001431 20231230 11:16:52 6131820 20231230 12:09:58

3 57 6131820 20231230 12:09:58 6131822 20231230 12:09:58

3 58 6140225 20231230 12:11:05 6452416 20231230 12:54:49

3 59 6452416 20231230 12:54:49 6568547 20231230 12:58:21

3 60 6568547 20231230 12:58:21 6668632 20231230 13:04:40

3 61 6668632 20231230 13:04:40 6668780 20231230 13:04:41

3 62 6670533 20231230 13:05:32 6794773 20231230 13:30:42

3 63 6794773 20231230 13:30:42 6794775 20231230 13:30:42

3 64 6994975 20231230 13:32:52 6995138 20231230 13:32:56

3 65 6995138 20231230 13:32:56 7117214 20231230 13:48:38

3 66 7117214 20231230 13:48:38 7317560 20240203 10:27:56

3 67 7317560 20240203 10:27:56 7341173 20240203 10:36:32

BS Key Size Device Type Elapsed Time Completion Time


13 9.00K DISK 00:00:00 20240203 23:36:52

BP Key: 13 Status: AVAILABLE Compressed: NO Tag: TAG20240203T233652

Piece Name: +DATA1/CDB/BACKUPSET/2024_02_03/annnf0_tag20240203t233652_0.320.1159958213

List of Archived Logs in backup set 13

Thrd Seq Low SCN Low Time Next SCN Next Time


1 117 7341169 20240203 10:36:31 7341210 20240203 10:36:50
2 90 7341166 20240203 10:36:31 7341218 20240203 10:36:52
3 68 7341173 20240203 10:36:32 7341214 20240203 10:36:50

2月的恢复成功。

相关推荐
兔老大RabbitMQ2 小时前
mysql之比较两个表的数据
数据库·mysql·算法·oracle·哈希算法
VNGRY2 小时前
MySQL-数据库管理:优化、安全、合规与迁移的全面解析
数据库·mysql
C or Cpp2 小时前
nodejs sqlite模块
数据库·sqlite
TangAcrab2 小时前
sql 清空表,并清空自增 id
数据库·sql·清空数据库表·清空自增id
InterestingFigure3 小时前
redis的时延监控
数据库·redis·缓存
搬砖写代码3 小时前
MySQL数据库文件在Linux下存放位置
linux·数据库·mysql
用你的胜利博我一笑吧4 小时前
移动校园(4):数据处理(sql server数据库)
数据库
PGCCC4 小时前
介绍 pg_later:受 Snowflake 启发的 Postgres 异步查询#postgresql认证
数据库·postgresql
zengson_g4 小时前
如何确保 PostgreSQL 在高并发写操作场景下的数据完整性?
数据库·postgresql
Ggggggtm5 小时前
Redis常用命令——Set、Zset篇
数据库·redis·缓存