oracle断电重启之ORA-01033和ORA-01172

本文涉及的产品
云原生数据仓库AnalyticDB MySQL版,8核32GB 100GB 1个月
简介:

参考文献:

ORA-01033:解决方法

数据库掉电后 ORA-01172 磁盘坏块解决方法

 

复制代码
--尝试连接数据库prjdb
C:\Documents and Settings\Administrator>sqlplus test/test@prjdb
SQL*Plus: Release 11.2.0.1.0 Production on Mon Jun 9 17:23:08 2014
Copyright (c) 1982, 2010, Oracle.  All rights reserved.

--报错ORA01033
ERROR:
ORA-01033: ORACLE ????????
Process ID: 0
Session ID: 0 Serial number: 0

--查找ORA-01033的根源是什么,使用管理员身份登陆
C:\Documents and Settings\Administrator>SQLPLUS SYS/SYS AS SYSDBA
SQL*Plus: Release 11.2.0.1.0 Production on Mon Jun 9 17:25:31 2014
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

--关闭数据库实例
SQL> SHUTDOWN
ORA-01109: database not open

Database dismounted.
ORACLE instance shut down.

--尝试启动数据库,如果启动失败会报错,这样就能够找到问题根源。
SQL> STARTUP
ORACLE instance started.

Total System Global Area  778387456 bytes
Fixed Size                  1374808 bytes
Variable Size             469763496 bytes
Database Buffers          301989888 bytes
Redo Buffers                5259264 bytes
Database mounted.
--问题根源是ORA-01172和ORA-01151
ORA-01172: recovery of thread 1 stuck at block 651 of file 90
ORA-01151: use media recovery to recover block, restore backup if needed

--查看file 90到底是哪一个文件,此步骤非必需
SQL> select file#,name from v$datafile where file#=90;
     FILE#     NAME
     90        D:\ORACLE\ORADATA\PRJDB\TS_HIS18.DBF
     
--恢复file 90
SQL> recover datafile 90;
Media recovery complete.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Pr
oduction
With the Partitioning, OLAP, Data Mining and Real Application Testing options

--再次尝试连接prjdb
C:\Documents and Settings\Administrator>sqlplus test/test@prjdb
SQL*Plus: Release 11.2.0.1.0 Production on Mon Jun 9 17:46:33 2014
Copyright (c) 1982, 2010, Oracle.  All rights reserved.

--依然失败
ERROR:
ORA-01033: ORACLE ????????
Process ID: 0
Session ID: 0 Serial number: 0

--重复前面的操作
C:\Documents and Settings\Administrator>SQLPLUS SYS/SYS AS SYSDBA
SQL*Plus: Release 11.2.0.1.0 Production on Mon Jun 9 17:46:46 2014
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select open_mode from v$database;
OPEN_MODE
--------------------
MOUNTED

SQL> alter database open;
alter database open
*
ERROR at line 1:
--发现还有一个file 7也是有问题的
ORA-01172: recovery of thread 1 stuck at block 89361 of file 7
ORA-01151: use media recovery to recover block, restore backup if needed

--恢复file 7
SQL> recover datafile 7;
Media recovery complete.

--再次启动数据库
SQL> alter database open;

--数据库启动成功
Database altered.

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Pr
oduction
With the Partitioning, OLAP, Data Mining and Real Application Testing options

--再次尝试连接
C:\Documents and Settings\Administrator>sqlplus test/test@prjdb
SQL*Plus: Release 11.2.0.1.0 Production on Mon Jun 9 17:48:33 2014
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> 
--连接成功。
复制代码

 

 本文转自xwdreamer博客园博客,原文链接:http://www.cnblogs.com/xwdreamer/p/3778419.html,如需转载请自行联系原作者

 

相关实践学习
数据库实验室挑战任务-初级任务
本场景介绍如何开通属于你的免费云数据库,在RDS-MySQL中完成对学生成绩的详情查询,执行指定类型SQL。
阿里云云原生数据仓库AnalyticDB MySQL版 使用教程
云原生数据仓库AnalyticDB MySQL版是一种支持高并发低延时查询的新一代云原生数据仓库,高度兼容MySQL协议以及SQL:92、SQL:99、SQL:2003标准,可以对海量数据进行即时的多维分析透视和业务探索,快速构建企业云上数据仓库。 了解产品 https://www.aliyun.com/product/ApsaraDB/ads
目录
相关文章
|
1月前
|
Oracle 关系型数据库 数据库
oracle数据恢复—服务器断电导致Oracle数据库报错的数据恢复案例
一台Windows server操作系统的服务器上部署Oracle数据库。 服务器意外断电导致oracle数据库报错,报错信息:“system01.dbf需要更多的恢复来保持一致性”。由于该oracle数据库并没有备份,仅有一些断断续续的归档日志,无法通过备份文件恢复oracle数据库的数据。管理员联系北亚企安数据恢复中心要求修复Oracle数据库。
oracle数据恢复—服务器断电导致Oracle数据库报错的数据恢复案例
|
8月前
|
Oracle 关系型数据库 数据库
数据库数据恢复—断电导致Oracle数据库报错的数据恢复案例
北京某公司一台运行oracle数据库的服务器,机房意外断电导致该服务器重启,重启后发现oracle数据库报错。该Oracle数据库没有备份。
数据库数据恢复—断电导致Oracle数据库报错的数据恢复案例
|
1月前
|
Oracle 关系型数据库 数据库
oracle 重启步骤及踩坑经验
oracle 重启步骤及踩坑经验
154 0
|
10月前
|
监控 Oracle druid
Springboot2.1.9+druid+mybatits(不重启项目动态添加mysql和oracle数据源)和数据监控
Springboot2.1.9+druid+mybatits(不重启项目动态添加mysql和oracle数据源)和数据监控
226 0
|
Oracle 关系型数据库
Oracle如何重启mmon/mmnl进程(AWR自动采集)
Oracle如何重启mmon/mmnl进程(AWR自动采集)
660 0
|
Oracle 关系型数据库 Linux
Linux服务器oracle数据库重启服务、重启监听方法,oracle数据库sysdba管理员登录方法
Linux服务器oracle数据库重启服务、重启监听方法,oracle数据库sysdba管理员登录方法
632 0
Linux服务器oracle数据库重启服务、重启监听方法,oracle数据库sysdba管理员登录方法
|
运维 Oracle 关系型数据库
Oracle运维笔记之有关外部表的ORA-20011错误
Oracle运维笔记之有关外部表的ORA-20011错误
Oracle运维笔记之有关外部表的ORA-20011错误
|
运维 Oracle 关系型数据库
Oracle运维笔记之ORA-27102错误处理
Oracle运维笔记之ORA-27102错误处理
2769 0
Oracle运维笔记之ORA-27102错误处理
|
SQL Oracle 关系型数据库