您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

由于断电Oracle数据库启动报错:ORA-00333: 重做日志读取块 2758 计数 7366 出错

bubuko 2022/1/25 20:09:59 其他 字数 17034 阅读 1179 来源 http://www.bubuko.com/infolist-5-1.html

【环境介绍】 系统环境:windows + Oracle 11GR2 + 单机 +notarhive 【背景描述】 业务反馈Oracle数据库连接不上,报错信息为ORA-01033错误,反馈数据库登录不上,咨询服务器工程师前面出现数据库断电然后重启情况: 该报错信息解释为数据库正在启动或者数据库关闭 ...

【环境介绍】

系统环境:windows + Oracle 11GR2 + 单机 +notarhive
 
【背景描述】
业务反馈Oracle数据库连接不上,报错信息为ORA-01033错误,反馈数据库登录不上,咨询服务器工程师前面出现数据库断电然后重启情况:
技术分享图片

该报错信息解释为数据库正在启动或者数据库关闭状态 

[oracle@alllinux ~]$ oerr ora 01033
01033, 00000, "ORACLE initialization or shutdown in progress"
// *Cause: An attempt was made to log on while Oracle is being started up
//         or shutdown.
// *Action: Wait a few minutes. Then retry the operation.

【问题处理】

根据无法连接数据库,登录数据库查看数据库是否异常,查看open_mode状态为mount的状态,尝试使用alter database open,尝试打开数据库,报错信息为:

SQL> alter database open;
alter database open
*
第 1 行出现错误:
ORA-00333: 重做日志读取块 2758 计数 7366 出错

报错描述为磁盘IO损坏导致读取日志文件时报错,当前数据库是没有开启归档,建议是进行restore方法或者拷贝其他的备份文件,当前数据库没有进行备份;

查询资料对于这个报错可以修改隐含参数_allow_resetlogs_corruption=TRUE 尝试强制重启

[oracle@oslatm ~]$ oerr ora 00333
00333, 00000, "redo log read error block %s count %s"
// *Cause:  An IO error occurred while reading the log described in the
//          accompanying error.
// *Action: Restore accessibility to file, or get another copy of the file.
[oracle@oslatm ~]$

 

由于没有备份,建议当前对数据库进行shutdown冷备,这里直接对数据文件拷贝操作,不然后续出现问题无法进行恢复到最初的状态;

冷备好数据库后进行修改参数操作:

SQL> create pfile=‘E:\backup\PFILEHISDB.ora‘ from spfile;
文件已创建。
对pfile文件添加参数
_allow_resetlogs_corruption=TRUE
*.undo_management=‘MANUAL‘
*.rollback_segments=‘SYSTEM‘
同时修改undo参数,通常事情是redo出问题了,那就意味着有事务没提交完,那undo必然不一致,所以干脆把undo也改了
 
尝试启动数据库,同时进行recover操作
SQL> startup mount pfile=‘E:\backup\PFILEHISDB.ora‘
ORACLE 例程已经启动。
Total System Global Area 1954160640 bytes
Fixed Size                  2256464 bytes
Variable Size            1207959984 bytes
Database Buffers          738197504 bytes
Redo Buffers                5746688 bytes
数据库装载完毕。
SQL> RECOVER DATABASE until cancel; >>>进行自动recover到时间点
ORA-00279: 更改 11817660 (在 02/26/2020 11:06:42 生成) 对于线程 1 是必需的
ORA-00289: 建议:
D:\APP\ADMINISTRATOR\FAST_RECOVERY_AREA\HISDB\ARCHIVELOG\2020_02_26\O1_MF_1
_389_%U_.ARC
ORA-00280: 更改 11817660 (用于线程 1) 在序列 #389 中

指定日志: {<RET>=suggested | filename | AUTO | CANCEL}
ORA-00308: 无法打开归档日志
‘D:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\RDBMS\ARC0000002478_0975754895.000
1‘
ORA-27041: 无法打开文件
OSD-04002: 无法打开文件
O/S-Error: (OS 2) 系统找不到指定的文件。

ORA-01547: 警告: RECOVER 成功但 OPEN RESETLOGS 将出现如下错误
ORA-01194: 文件 1 需要更多的恢复来保持一致性
ORA-01110: 数据文件 1: ‘E:\FSZYYDATA\HISDB\SYSTEM01.DBF‘


SQL> alter database open resetlogs; 
alter database open resetlogs
*
第 1 行出现错误:
ORA-00603: ORACLE server session terminated by fatal error
ORA-00600: internal error code, arguments: [2662], [2888], [676729259], [2888],
[676735192], [12583040], [], [], [], [], [], []
ORA-00600: internal error code, arguments: [2662], [2888], [676729258], [2888],
[676735192], [12583040], [], [], [], [], [], []
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00600: internal error code, arguments: [2662], [2888], [676729256], [2888],
[676735192], [12583040], [], [], [], [], [], []
进程 ID: 1092
会话 ID: 1144 序列号: 5
 
 

尝试使用resetlogs方式打开数据库时候出现报错:

ORA-00603: ORACLE server session terminated by fatal error
ORA-00600: internal error code, arguments: [2662], [2888], [676729259], [2888],

[oracle@oslatm ~]$ oerr ORA 00603
00603, 00000, "ORACLE server session terminated by fatal error"
// *Cause:  An Oracle server session was in an unrecoverable state.
// *Action: Log in to Oracle again so a new server session will be created
//          automatically.  Examine the session trace file for more
//          information.
[oracle@oslatm ~]$

 

查询资料建议添加参数*._corrupted_rollback_segments=true undo回滚段损坏参数

C:\Users\Administrator>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on 星期三 2月 26 17:29:47 2020
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
已连接到空闲例程。
SQL> startup pfile=‘E:\backup\PFILEHISDB.ora‘
ORACLE 例程已经启动。
Total System Global Area 2572144640 bytes
Fixed Size                  2257952 bytes
Variable Size            1342180320 bytes
Database Buffers         1207959552 bytes
Redo Buffers               19746816 bytes
数据库装载完毕。
数据库已经打开。
SQL>
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
READ WRITE
SQL>
 
现在已经正常启动,当期是使用品file启动数据库,生成spfile文件启动:
SQL> show parameter pfile
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string
SQL>
SQL> create spfile=‘D:\app\Administrator\product\11.2.0\dbhome_1\database\SPFILEHISDB.ORA‘ from pfile=‘E:\backup\PFILEHISDB.ora‘;
文件已创建。
SQL>
SQL> shutdown immediate
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。
SQL>
SQL> startup
ORACLE 例程已经启动。
Total System Global Area 3557584896 bytes
Fixed Size                  2260320 bytes
Variable Size            1811940000 bytes
Database Buffers         1728053248 bytes
Redo Buffers               15331328 bytes
数据库装载完毕。
数据库已经打开。
SQL>
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
READ WRITE
SQL>
至此数据库启动正常,业务测试连接正常。
 
查看数据库日志信息发现存在报错:
ORA-12012: 自动执行作业 4 出错
ORA-01552: 非系统表空间 ‘HTHIS‘ 不能使用系统回退段
 
[oracle@oslatm ~]$ oerr ora 01552
01552, 00000, "cannot use system rollback segment for non-system tablespace ‘%s‘"
// *Cause: Tried to use the system rollback segment for operations involving
//        non-system tablespace. If this is a clone database then this will
//        happen when attempting any data modification outside of the system
//        tablespace. Only the system rollback segment can be online in a
//        clone database.
// *Action: Create one or more private/public segment(s), shutdown and then
//         startup again. May need to modify the INIT.ORA parameter
//         rollback_segments to acquire private rollback segment. If this is
//         a clone database being used for tablspace point in time recovery
//         then this operation is not allowed.  If the non-system tablespace
//         has AUTO segment space management, then create an undo tablespace.
[oracle@oslatm ~]$
 
针对上面操作的参数,对undo表空间进行重建及修改为undo自动管理模式: 
SQL> show parameter undo
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
undo_management                      string      MANUAL
undo_retention                       integer     900
undo_tablespace                      string      UNDOTBS1
SQL> set linesize 200
SQL> col file_name for a100
SQL> select file_name,bytes/1024/1024 from dba_data_files where TABLESPACE_NAME like‘%UNDO%‘;
FILE_NAME                                                                                            BYTES/1024/1024
---------------------------------------------------------------------------------------------------- ---------------
E:\TESTDBDATA\HISDB\UNDOTBS01.DBF                                                                    2048
SQL>create undo tablespace undotbs2 datafile ‘E:\FSZYYDATA\HISDB\UNDOTBS02.DBF‘ size 2G;
表空间已创建。
SQL>
SQL> alter system set undo_tablespace=undotbs2 scope=spfile;
系统已更改。
SQL> alter system set undo_management=auto scope=spfile;
系统已更改。
SQL> shutdown immediate
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。
SQL>
SQL> startup
ORACLE 例程已经启动。
Total System Global Area 1954160640 bytes
Fixed Size                  2256464 bytes
Variable Size            1207959984 bytes
Database Buffers          738197504 bytes
Redo Buffers                5746688 bytes
数据库装载完毕。
数据库已经打开。
SQL> show parameter undo
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
undo_management                      string      AUTO
undo_retention                       integer     900
undo_tablespace                      string      UNDOTBS2
SQL> show parameter spfile
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      D:\APP\ADMINISTRATOR\PRODUCT\1
                                                 1.2.0\DBHOME_1\DATABASE\SPFILE
                                                 HISDB.ORA
SQL>
 

 【总结】

1,在数据库异常修复时,建议进行备份操作;

2,建议对数据库开启归档操作;

3,建议定期对数据库进行备份操作。

 

由于断电Oracle数据库启动报错:ORA-00333: 重做日志读取块 2758 计数 7366 出错

原文:https://www.cnblogs.com/zetanchen/p/12370623.html


如果您也喜欢它,动动您的小指点个赞吧

除非注明,文章均由 laddyq.com 整理发布,欢迎转载。

转载请注明:
链接:http://laddyq.com
来源:laddyq.com
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。


联系我
置顶