When we perform the backup, the datafilecopy generated as part of backup has RESETLOGS_CHANGE#.
It matches with the "Reset Log SCN" for the current incarnation.
When the database is restored to some point in time in past(PITR), a new "Reset Log SCN" is generated.
The datafilecopy generated as part of the backup after that restore will have that new "Reset Log SCN" as its RESETLOGS_CHANGE#, unless that datafile is ReadOnly.
I am seeing a strange case where the RESETLOGS_CHANGE# is not changing even after the PITR for a READ write file. It stays same. For example:-
select d.NAME, d.INCREMENTAL_LEVEL, d.RESETLOGS_CHANGE#, f.NAME, f.ENABLED from GV$DATAFILE_COPY d, GV$DATAFILE f
where f.FILE# = d.FILE# and
f.RFILE# = d.RFILE# and
f.CREATION_CHANGE# = d.CREATION_CHANGE# and
d.STATUS = 'A' and
d.TAG=upper('<BACKUP_TAG>');
data_D-RAC12DB_I-2471537645_TS-UNDOTBS1_FNO-4_rbthe2ds 0 50166360 +DATA/RAC12DB/DATAFILE/undotbs1.260.984778811 READ WRITE
data_D-RAC12DB_I-2471537645_TS-SYSTEM_FNO-5_r9the2cu 0 1408558 +DATA/RAC12DB/4700A987085B3DFAE05387E5E50A8C7B/DATAFILE/system.267.984778877 READ WRITE
RMAN> list incarnation;
using target database control file instead of recovery catalog
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1 1 RAC12DB 2471537645 PARENT 1 26-JAN-17
2 2 RAC12DB 2471537645 PARENT 1408558 21-AUG-18<<<<<<
3 3 RAC12DB 2471537645 PARENT 31062906 03-OCT-18
4 4 RAC12DB 2471537645 PARENT 31387168 04-OCT-18
5 5 RAC12DB 2471537645 PARENT 35030393 10-OCT-18
6 6 RAC12DB 2471537645 ORPHAN 49904376 01-NOV-18
7 7 RAC12DB 2471537645 PARENT 49904376 02-NOV-18
8 8 RAC12DB 2471537645 PARENT 49949891 02-NOV-18
9 9 RAC12DB 2471537645 PARENT 49993705 02-NOV-18
10 10 RAC12DB 2471537645 PARENT 50041067 02-NOV-18
11 11 RAC12DB 2471537645 PARENT 50148015 02-NOV-18
12 12 RAC12DB 2471537645 CURRENT 50166360 02-NOV-18 <<<<<<
In the above case, the RESETLOGS_CHANGE# for FNO_5 is not changing since incarnation 2 whereas the same is latest for FNO_4.
Can anyone please clarify what am I missing.
Thanks in advance.