For example, let's assume we need to restore the database, but we also have lost all archive logs. So we issue the following command in RMAN (just restore, without recover).
RMAN> run{
2> set newname for database to '+DGMOOTDB';
3> restore database;
4> switch datafile all;
5> }
6>
Ok, now, we can't open the database, because the files are inconsistent (CHECKPOINT_CHANGE# are not the same in all files) and we don't have any archive log to sync it.
SQL> Select Count(1),CHECKPOINT_CHANGE#,To_Char(Checkpoint_Time,'dd/mm/yyyy hh24:mi:ss') as data_hora_repl From V$datafile_Header
group by CHECKPOINT_CHANGE#,checkpoint_time order by CHECKPOINT_CHANGE#;
2
COUNT(1) CHECKPOINT_CHANGE# CHECKPOINT_TIME
---------- ------------------ -------------------
5 32826214 29/05/2021 19:14:22
5 32826215 29/05/2021 19:14:22
SQL> SQL>
Is there any way to open the database?
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
SQL> alter database open RESETLOGS;
alter database open RESETLOGS
*
ERROR at line 1:
ORA-01190: control file or data file 1 is from before the last RESETLOGS
ORA-01110: data file 1: '+DGMOOTDB/MOOTDBHIST/DATAFILE/system.264.1074023789'
SQL>