ORA-01152

APPLIES TO

Oracle Database - Enterprise Edition - version 11.2.0.4.0

SYMPTOMS

Open resetlogs has an error with ORA-01152: file 1 was not restored from a sufficiently old backup

RMAN> alter database open resetlogs;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 03/05/2013 14:34:37
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/oracle/u01/app/oracle/oradata/orcl/system01.dbf'

CAUSE

This is because the SCN recorded in the controlfile is inconsistent with that in the datafile. The SCN of the restored controlfile is smaller than that recorded in the datafile.

  1. Using archive log or redo log to recover database.
  2. Using built-in parameter _allow_resetlogs_corruption to skip the consistency check, but an ORA-00600[2662] error may occur.
~]$ oerr ora 1152
01152, 00000, "file %s was not restored from a sufficiently old backup "
// *Cause: An incomplete recovery session was started, but an insufficient
// number of logs were applied to make the database consistent. This
// file is still in the future of the last log applied. The most
// likely cause of this error is forgetting to restore the file
// from a backup before doing incomplete recovery.
// *Action: Either apply more logs until the database is consistent or
// restore the database file from an older backup and repeat recovery.

Query the SCN:

SQL> col name for a50
SQL> select name,checkpoint_change# from v$datafile;

NAME CHECKPOINT_CHANGE#
-------------------------------------------------- ------------------
/home/oracle/orcl/system01.dbf 1322736
/home/oracle/orcl/sysaux01.dbf 1322736
/home/oracle/orcl/undotbs01.dbf 1322736
/home/oracle/orcl/users01.dbf 1322736

SQL> select name,checkpoint_change# from v$database;

NAME CHECKPOINT_CHANGE#
-------------------------------------------------- ------------------
ORCL 1322736

Solution 1: Using archive log or redo log to recover database

Restore archivelog to recover database.

~]$ rman target /

Recovery Manager: Release 11.2.0.4.0 - Production on Wed Apr 15 15:04:37 2026

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

connected to target database: ORCL (DBID=1681625816, not open)

RMAN> catalog start with '/nfs/';

using target database control file instead of recovery catalog
searching for all files that match the pattern /nfs/

List of Files Unknown to the Database
=====================================
File Name: /nfs/arch/arch_ORCL_20260415_1230648412_9_1
File Name: /nfs/arch/arch_ORCL_20260415_1230648412_10_1
File Name: /nfs/arch/arch_ORCL_20260415_1230648414_11_1

Do you really want to catalog the above files (enter YES or NO)? yes
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: /nfs/arch/arch_ORCL_20260415_1230648412_9_1
File Name: /nfs/arch/arch_ORCL_20260415_1230648412_10_1
File Name: /nfs/arch/arch_ORCL_20260415_1230648414_11_1

RMAN> run {
allocate channel ch00 type disk;
set archivelog destination to '/nfs/arch/';
restore archivelog all;
release channel ch00;
}2> 3> 4> 5> 6>

allocated channel: ch00
channel ch00: SID=135 device type=DISK

executing command: SET ARCHIVELOG DESTINATION

Starting restore at 15-APR-26

released channel: ch00
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 04/15/2026 15:05:02
RMAN-06026: some targets not found - aborting restore
RMAN-06025: no backup of archived log for thread 1 with sequence 14 and starting SCN of 1260687 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 13 and starting SCN of 1239019 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 12 and starting SCN of 1218908 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 11 and starting SCN of 1196654 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 10 and starting SCN of 1164995 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 9 and starting SCN of 1115335 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 8 and starting SCN of 1089088 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 7 and starting SCN of 1053728 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 6 and starting SCN of 1026897 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5 and starting SCN of 996525 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 4 and starting SCN of 976473 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 3 and starting SCN of 954329 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 2 and starting SCN of 925918 found to restore

RMAN> recover database;

Starting recover at 15-APR-26
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=1 sequence=16
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=17
channel ORA_DISK_1: reading from backup piece /nfs/arch/arch_ORCL_20260415_1230648412_10_1
channel ORA_DISK_1: piece handle=/nfs/arch/arch_ORCL_20260415_1230648412_10_1 tag=TAG20260415T144652
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
archived log file name=/arch001/orcl1_16_1153845084.dbf thread=1 sequence=16
archived log file name=/arch001/orcl1_17_1153845084.dbf thread=1 sequence=17
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=18
channel ORA_DISK_1: reading from backup piece /nfs/arch/arch_ORCL_20260415_1230648414_11_1
channel ORA_DISK_1: piece handle=/nfs/arch/arch_ORCL_20260415_1230648414_11_1 tag=TAG20260415T144652
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
archived log file name=/arch001/orcl1_18_1153845084.dbf thread=1 sequence=18
unable to find archived log
archived log thread=1 sequence=19
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 04/15/2026 15:06:44
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 19 and starting SCN of 1320395

RMAN> alter database open resetlogs;

database opened

Copy redo log to recover database.

SQL> recover database using backup controlfile;
ORA-00279: change 5634731 generated at 03/05/2013 14:23:36 needed for thread 1
ORA-00289: suggestion :
/oracle/u01/app/oracle/oradata/orcl/archive/1_315_796990179.dbf
ORA-00280: change 5634731 for thread 1 is in sequence #315

Specify log: {=suggested | filename | AUTO | CANCEL}
/oracle/u01/app/oracle/oradata/orcl/redo01.log -- Specify the log file.
Log applied.
Media recovery complete.

SQL> alter database open resetlogs;
Database altered.

Solution 2: Using built-in parameter _allow_resetlogs_corruption to skip the consistency check

RMAN> alter database open resetlogs;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ==========================================================
RMAN-03002: failure of alter db command at 03/05/2013 14:56:41
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/oracle/u01/app/oracle/oradata/orcl/system01.dbf'

SQL> startup force
ORA-32004: obsolete and/or deprecated parameter(s) specified
ORACLE instance started.
Total System Global Area 1224736768 bytes
Fixed Size 2020384 bytes
Variable Size 352324576 bytes
Database Buffers 855638016 bytes
Redo Buffers 14753792 bytes
Database mounted.
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open

SQL> alter system set "_allow_resetlogs_corruption"=true scope=spfile;
System altered.

SQL> recover database using backup controlfile until cancel
ORA-00279: change 5638424 generated at 03/05/2013 14:48:17 needed for thread 1
ORA-00289: suggestion :
/oracle/u01/app/oracle/oradata/orcl/archive/1_1_809275697.dbf
ORA-00280: change 5638424 for thread 1 is in sequence #1
Specify log: {=suggested | filename | AUTO | CANCEL}
cancel --Cancel

ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/oracle/u01/app/oracle/oradata/orcl/system01.dbf'
ORA-01112: media recovery not started

SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01092: ORACLE instance terminated. Disconnection forced

SQL> startup force
ORA-32004: obsolete and/or deprecated parameter(s) specified
ORACLE instance started.
Total System Global Area 1224736768 bytes
Fixed Size 2020384 bytes
Variable Size 352324576 bytes
Database Buffers 855638016 bytes
Redo Buffers 14753792 bytes
Database mounted.
Database opened.

SQL> alter system set "_allow_resetlogs_corruption"=false scope=spfile;
System altered.