Si por un casual no tenemos todos los archivelogs para recuperar la base de datos, por ejemplo si nos encontramos con este error:
SQL> alter database open; alter database open * ERROR at line 1: ORA-01113: file 1 needs media recovery ORA-01110: data file 1: '/u01/system01.dbf'Si intentamos recuperar la base datos nos mostrará este error:
SQL> recover database using backup controlfile until cancel;
ORA-00279: change xxxx generated at 04/14/2010 13:51:42 needed for
thread 1
ORA-00289: suggestion :
/u02/db/10.2.0/dbs/history.dbf
ORA-00280: change xxxx for thread 1 is in sequence #1322
Specify log: {=suggested | filename | AUTO | CANCEL}
cancel
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/u01/system01.dbf'
ORA-01112: media recovery not started
Obviamente si ejecutamos un ALTER DATABASE OPEN RESETLOGS nos mostrará este error:SQL> alter database open resetlogs; alter database open resetlogs * ERROR at line 1: ORA-01194: file 1 needs more recovery to be consistent ORA-01110: data file 1: '/u01/system01.dbf'Oracle es así, te dice como repararlo, lo repara pero luego dice que necesita recuperar el system01 y entra en un bucle.
Para arreglarlo, lo que debemos realizar es lo siguiente:
1-Creamos un fichero pfile con el comando CREATE PFILE='C:\INIT.ORA' FROM SPFILE;
2-Ejecutamos shutdown abort desde el sqlplus.
3-Editamos con el notepad el fichero recién creado c:\init.ora.
4-Añadimos al final del fichero estos dos comandos:
- - _ALLOW_RESETLOGS_CORRUPTION = TRUE
- _ALLOW_ERROR_SIMULATION = TRUE
6-Iniciamos el sqlplus y ejecutamos los siguientes pasos:
$ sqlplus '/as sysdba'
SQL*Plus: Release 11.2.0.0 - Production on Tue Apr 14 09:06:56 2014
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to an idle instance.
SQL> startup mount pfile='c:\init.ora'
ORACLE instance started.
Total System Global Area 5251268608 bytes
Fixed Size 2091368 bytes
Variable Size 1040189080 bytes
Database Buffers 4194304000 bytes
Redo Buffers 14684160 bytes
Database mounted.
SQL> recover database using backup controlfile until cancel;
ORA-00279: change xxxxxxx generated at 04/15/2014 09:51:42 needed for
thread 1
ORA-00289: suggestion :
/u02/db/10.2.0/dbs/history.dbf
ORA-00280: change xxxxxx for thread 1 is in sequence #1322
Specify log: {=suggested | filename | AUTO | CANCEL}
cancel
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/u01/system01.dbf'
ORA-01112: media recovery not started
SQL> alter database open resetlogs;
Database altered.
Voila! ya tenemos la base de datos accesible.Consejo:
1-Hacer un full export de nuestro usuario.
2-Realizar una copia completa con RMAN.
3-Reiniciar
4-Comprobar de no tener ningún tablespace inválido.
NOTA: en caso de inconsistencia, sería necesario recrear el undo tablespace.
Espero que les resulte útil.
Salu2.
0 comentarios:
Publicar un comentario