Estava realizando um Database Point-in-Time Recovery, e no momento de abrir o banco, me deparei com o seguinte erro:
[oracle@cortex cortex]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.5.0 - Production on Wed Aug 11 18:08:36 2021
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> SELECT INSTANCE_NAME,STATUS FROM V$INSTANCE;
INSTANCE_NAME STATUS
---------------- ------------
ASWAN MOUNTED
SQL> ALTER DATABASE OPEN RESETLOGS;
ALTER DATABASE OPEN RESETLOGS
*
ERROR at line 1:
ORA-00349: failure obtaining block size for '+DG_DATA'
Na nota “‘ORA-00349: failure obtaining block size’ On ‘open resetlogs’ During Incomplete Recovery (Doc ID 356191.1)” (link AQUI), vi que uma das soluções proposta é:
Desse modo, coleto a condição atual dos meus online redo logs:
SQL> l
1* SELECT GROUP#,MEMBER FROM V$LOGFILE
SQL> col MEMBER format a50
SQL> /
GROUP# MEMBER
---------- --------------------------------------------------
4 +DG_DATA/onlinelog/group_4.350.846063515
8 +DG_DATA/onlinelog/group_8.356.846063929
6 +DG_DATA/onlinelog/group_6.352.846063857
7 +DG_DATA/onlinelog/group_7.353.846063879
1 +DG_DATA/onlinelog/group_1.349.846063485
2 +DG_DATA/onlinelog/group_2.354.846063589
5 +DG_DATA/onlinelog/group_5.351.846063517
3 +DG_DATA/onlinelog/group_3.355.846063593
9 +DG_DATA/onlinelog/group_9.357.846063955
10 +DG_DATA/onlinelog/group_10.358.846063959
11 +DG_DATA/onlinelog/group_11.359.846083125
GROUP# MEMBER
---------- --------------------------------------------------
12 +DG_DATA/oxip/onlinelog/group_12.360.846083129
13 +DG_DATA/oxip/onlinelog/group_13.361.846083147
14 +DG_DATA/oxip/onlinelog/group_14.362.846083151
15 +DG_DATA/oxip/onlinelog/group_15.364.846083493
16 +DG_DATA/oxip/onlinelog/group_16.363.846083497
17 +DG_DATA/oxip/onlinelog/group_17.365.846083499
18 +DG_DATA/oxip/onlinelog/group_18.366.846083503
18 rows selected.
Realizando a alteração da localização dos Online Redo Logs:
SQL> alter database rename file '+DG_DATA/onlinelog/group_4.350.846063515' to '/oracle/redo/redo_846063515';
Database altered.
SQL> alter database rename file '+DG_DATA/onlinelog/group_8.356.846063929' to '/oracle/redo/redo_846063929';
Database altered.
SQL> alter database rename file '+DG_DATA/onlinelog/group_6.352.846063857' to '/oracle/redo/redo_846063857';
Database altered.
SQL> alter database rename file '+DG_DATA/onlinelog/group_7.353.846063879' to '/oracle/redo/redo_846063879';
Database altered.
SQL> alter database rename file '+DG_DATA/onlinelog/group_1.349.846063485' to '/oracle/redo/redo_846063485';
Database altered.
SQL> alter database rename file '+DG_DATA/onlinelog/group_2.354.846063589' to '/oracle/redo/redo_846063589';
Database altered.
SQL> alter database rename file '+DG_DATA/onlinelog/group_5.351.846063517' to '/oracle/redo/redo_846063517';
Database altered.
SQL> alter database rename file '+DG_DATA/onlinelog/group_3.355.846063593' to '/oracle/redo/redo_846063593';
Database altered.
SQL> alter database rename file '+DG_DATA/onlinelog/group_9.357.846063955' to '/oracle/redo/redo_846063955';
Database altered.
SQL> alter database rename file '+DG_DATA/onlinelog/group_10.358.846063959' to 'oracle/redo/redo_846063959';
Database altered.
SQL> alter database rename file '+DG_DATA/onlinelog/group_11.359.846083125' to 'oracle/redo/redo_846083125';
Database altered.
SQL> alter database rename file '+DG_DATA/onlinelog/group_12.360.846083129' to 'oracle/redo/redo_846083129';
Database altered.
SQL> alter database rename file '+DG_DATA/onlinelog/group_13.361.846083147' to 'oracle/redo/redo_846083147';
Database altered.
SQL> alter database rename file '+DG_DATA/onlinelog/group_14.362.846083151' to 'oracle/redo/redo_846083151';
Database altered.
SQL> alter database rename file '+DG_DATA/onlinelog/group_15.364.846083493' to 'oracle/redo/redo_846083493';
Database altered.
SQL> alter database rename file '+DG_DATA/onlinelog/group_16.363.846083497' to 'oracle/redo/redo_846083497';
Database altered.
SQL> alter database rename file '+DG_DATA/onlinelog/group_17.365.846083499' to 'oracle/redo/redo_846083499';
Database altered.
SQL> alter database rename file '+DG_DATA/onlinelog/group_18.366.846083503' to 'oracle/redo/redo_846083503';
Database altered.
Após isso, consigo abrir o banco de dados conforme abaixo:
SQL> ALTER DATABASE OPEN RESETLOGS;
Database altered.
SQL> SELECT NAME,OPEN_MODE FROM V$DATABASE;
NAME OPEN_MODE
--------- ----------
ASWAN READ WRITE
SQL> ALTER SYSTEM CHECKPOINT;
System altered.