------------------------------------ ----------- ------------------------------
spfile string
SQL> create spfile from pfile;
File created.
SQL> shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 826248288 bytes
Fixed Size 732256 bytes
Variable Size 503316480 bytes
Database Buffers 318767104 bytes
Redo Buffers 3432448 bytes
Database mounted.
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
SQL> show parameter spfile;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string ?/dbs/
[email protected]
SQL> alter system set "_allow_resetlogs_corruption"=true scope=spfile;
System altered.
提示:Oracle的隐含参数只应该在测试环境或者在Oracle Support的支持下使用。
设置此参数之后,在数据库Open过程中,Oracle会跳过某些一致性检查,从而使数据库可能跳过不一致状态。
SQL> shutdown immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 826248288 bytes
Fixed Size 732256 bytes
Variable Size 503316480 bytes
Database Buffers 318767104 bytes
Redo Buffers 3432448 bytes
Database mounted.
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-03113: end-of-file on communication channel
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-03114: not connected to ORACLE
SQL> conn /as sysdba
Connected to an idle instance.
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01034: ORACLE not available
SQL> shutdown immediate
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
SVR4 Error: 2: No such file or directory
SQL> startup
ORACLE instance started.
Total System Global Area 826248288 bytes
Fixed Size 732256 bytes
Variable Size 503316480 bytes
Database Buffers 318767104 bytes
Redo Buffers 3432448 bytes
Database mounted.
ORA-00607: Internal error occurred while making a change to a data block
ORA-00600: internal error code, arguments: [4194], [53], [43], [], [], [], [],[]
以上强制启动后,产生Ora-600错误了,在预料之中。。。。
SQL> startup force;
ORACLE instance started.
Total System Global Area 826248288 bytes
Fixed Size 732256 bytes
Variable Size 503316480 bytes
Database Buffers 318767104 bytes
Redo Buffers 3432448 bytes
Database mounted.
ORA-01092: ORACLE instance terminated. Disconnection forced
SQL> startup mount
ORACLE instance started.
Total System Global Area 826248288 bytes
Fixed Size 732256 bytes
Variable Size 503316480 bytes
Database Buffers 318767104 bytes
Redo Buffers 3432448 bytes
Database mounted.
SQL> set pages 0 feedback off lines 132
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01092: ORACLE instance terminated. Disconnection forced
SQL>
SQL> !oerr ora 1092
01092, 00000, "ORACLE instance terminated. Disconnection forced"
// *Cause: The instance this process was connected to was terminated
// abnormally, probably via a shutdown abort. This process
// was forced to disconnect from the instance.
// *Action: Examine the alert log for more details. When the instance has been
// restarted, retry action.
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-03114: not connected to ORACLE
SQL> startup force;
ORA-24324: service handle not initialized
ORA-01041: internal error. hostdef extension doesn't exist
SQL> conn /as sysdba
Connected to an idle instance.
SQL> startup force;
ORACLE instance started.
Total System Global Area 826248288 bytes
Fixed Size 732256 bytes
Variable Size 503316480 bytes
Database Buffers 318767104 bytes
Redo Buffers 3432448 bytes
Database mounted.
ORA-01092: ORACLE instance terminated. Disconnection forced
前面提到过复用的联机重做日志中的一个成员丢失或受损的情况下,如何进行恢复。而当当前日志文件组的所有副本都被损坏,那么实例就会立即终止。如果在日志切换时,当前生成的日志文件组的所有副本都被损坏,那么实例也会立即终止。
解决方法:
方法一:
1)删除受损的联机重做日志文件成员并添加一个替换的成员。
命令:
ocp10g> alter database drop logfile member 'C:\ORACLE\ORADATA\REDOA\REDO1A.LOG';
ocp10g> host del C:\ORACLE\ORADATA\REDOA\REDO1A.LOG
ocp10g> alter database add logfile member 'C:\ORACLE\ORADATA\REDOA\REDO1A.LOG' to group 1;
方法二:
1)使用”CLEAR LOGFILE“命令通过替换所有成员与重用旧成员的文件名来创建一个新的联机重做日志文件组。
命令:
ocp10g> alter database clear logfile group 1;