数据误删数据文件之后出现报错ORA-01190 ORA-01110,整理如下:
[oracle@XXXX ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Sep 7 01:14:53 2016
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 281018368 bytes
Fixed Size 2020192 bytes
Variable Size 213912736 bytes
Database Buffers 62914560 bytes
Redo Buffers 2170880 bytes
Database mounted.
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01190: control file or data file 1 is from before the last RESETLOGS
ORA-01110: data file 1: '/u01/oracle/app/oracle/oradata/prod/system01.dbf'
SQL> ALTER SYSTEM SET "_allow_resetlogs_corruption"=TRUE SCOPE=SPFILE;
System altered.
SQL> shutdown abort;
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 281018368 bytes
Fixed Size 2020192 bytes
Variable Size 213912736 bytes
Database Buffers 62914560 bytes
Redo Buffers 2170880 bytes
Database mounted.
SQL> alter database open resetlogs;
Database altered.
注:
使用隐含参数_allow_resetlogs_corruption强制启动数据库,设置此参数之后,在数据库Open过程中,Oracle会跳过某些一致性检查,从而使数据库可能跳过不一致状态。
ResetLog的作用
(1)将重做日志的序列号设为1
(2)一般以该子句打开数据库后,要立即备份数据库,因为这个子句会使数据库以前的备份不能用.
(3)在重做日志当前日志组出现错误时,要以该子句打开数据库.该子句会重新设置重做日志文件的状态.
(4)让数据库系统归档初始化,重新生成归档文件.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29618264/viewspace-2124635/
,如需转载,请注明出处,否则将追究法律责任。