O banco de dados tinha esse chekcpoint antes do OPEN RESETLOGS:

SQL> select to_char(checkpoint_time,'dd/mm/yyyy hh24:mi:ss') as checkpoint_time, count(*)
from v$datafile_header
group by to_char(checkpoint_time,'dd/mm/yyyy hh24:mi:ss');

CHECKPOINT_TIME       COUNT(*)
------------------- ----------
04/05/2021 22:41:52         89

O comando OPEN RESETLOGS falhou devido a um com Change Tracking File (CTF):

SQL> ALTER DATABASE OPEN RESETLOGS UPGRADE;
ALTER DATABASE OPEN RESETLOGS UPGRADE
*
ERROR at line 1:
ORA-19751: could not create the change tracking file
ORA-19750: change tracking file:
'+DATA/samprd00_iad2cz/changetracking/ctf.336.1039316681'
ORA-17502: ksfdcre:4 Failed to create file
+DATA/samprd00_iad2cz/changetracking/ctf.336.1039316681
ORA-15046: ASM file name
'+DATA/samprd00_iad2cz/changetracking/ctf.336.1039316681' is not in single-file
creation form
ORA-17503: ksfdopn:2 Failed to open file
+DATA/samprd00_iad2cz/changetracking/ctf.336.1039316681
ORA-15012: ASM file '+DATA/samprd00_iad2cz/changetracking/ctf.336.1039316681'
does not exist

Então desabilitei a configuração de Block Change Tracking

SQL> alter database disable block change tracking;

Database altered.

Chequei o status atual da instância e ainda estava em MOUNT:

SQL> select status from v$instance;

STATUS
------------
MOUNTED

Tentei abrir o banco novamente:

SQL> SYS@SAMPRD00> ALTER DATABASE OPEN RESETLOGS UPGRADE;
ALTER DATABASE OPEN RESETLOGS UPGRADE
*
ERROR at line 1:
ORA-01139: RESETLOGS option only valid after an incomplete database recovery

O checkpoint nos datafiles avançou, indicando que o RESETLOGS já teria ocorrido em todos eles:

SQL> select to_char(checkpoint_time,'dd/mm/yyyy hh24:mi:ss') as checkpoint_time, count(*)
from v$datafile_header
group by to_char(checkpoint_time,'dd/mm/yyyy hh24:mi:ss');

CHECKPOINT_TIME       COUNT(*)
------------------- ----------
04/05/2021 22:47:00         89

Então consegui abrir em modo UPGRADE, sem a opção RESETLOGS:

SQL> ALTER DATABASE OPEN UPGRADE;

Database opened.

Leave a Reply

Discover more from Blog do Dibiei

Subscribe now to keep reading and get access to the full archive.

Continue reading