---
title: "突然断电oracle故障"
author: "blueram"
date: "2012-07-30T14:54:35Z"
tags: []
categories: ["数据库"]
slug: "oracle"
draft: false
lastmod: "2012-07-30T14:54:35Z"
id: 1612224
url: "https://blueram.iteye.com/blog/1612224"
---

开始时是这个错误，

### ora 12528:TNS:监听程序:*所有适用例程都无法建立新连接*

然后配置了监听文件，Oracle listener静态注册和动态注册, 现在改为静态监听

 

```
# listener.ora Network Configuration File: D:\oracle\product\10.2.0\db_1\network\admin\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = D:\oracle\product\10.2.0\db_1)
      (PROGRAM = extproc)
    )
     (SID_DESC =
	(GLOBAL_DBNAME =orcl)
	(ORACLE_HOME = D:\oracle\product\10.2.0\db_1)
	(SID_NAME =orcl)
      )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = renfeng)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0)) 
    )
  )
```

 

 然后数据报这个错

ORA-01033: ORACLE 正在初始化或关闭，下面是查找错误的过程

1、首先修改环境变量，保证cmd下访问到正确的oracle监听，如：

```
E:\oracle\product\10.2.0\client_1\bin;E:\oracle\product\10.2.0\client_2\bin;E:\oracle\product\10.2.0\db_1\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32
\Wbem;
```

2、 开始修复数据库：

 

 

```
C:\Documents and Settings\Administrator>sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on 星期一 7月 5 09:50:36 2010
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
```

 Copyright (c) 1982, 2005, Oracle. All rights reserved.

```
SQL> conn /as sysdba
已连接。
SQL> shutdown normal
ORA-01507: ??????


ORACLE 例程已经关闭。
SQL> startup mount
ORACLE 例程已经启动。

Total System Global Area  612368384 bytes
Fixed Size                  1250428 bytes
Variable Size             264244100 bytes
Database Buffers          339738624 bytes
Redo Buffers                7135232 bytes
ORA-00204: ????????? (? 3, # ? 8)
ORA-00202: ????: ''D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL03.CTL''
ORA-27091: ??? I/O ??
ORA-27070: ????/????
OSD-04006: ReadFile() ????, ????????????
O/S-Error: (OS 23) ????????(????????????)??
```

发现错误所在，原来是停电造成CONTROL03.CTL文件损坏，这个好办，因为CONTROL01.CTL，CONTROL02.CTL，CONTROL03.CTL是相同的，直接复制一份。

```
SQL> shutdown immediate
ORA-01507: ??????


ORACLE 例程已经关闭。
SQL> startup mount
ORACLE 例程已经启动。

Total System Global Area  612368384 bytes
Fixed Size                  1250428 bytes
Variable Size             264244100 bytes
Database Buffers          339738624 bytes
Redo Buffers                7135232 bytes
数据库装载完毕。
SQL> alter database open
  2  ;

数据库已更改。

SQL>
```

 数据库已经成功启动了。

 

参考：

[http://www.oecp.cn/hi/simonsun/blog/223](http://www.oecp.cn/hi/simonsun/blog/223)

[http://syang0517.blog.163.com/blog/static/13334026320117299575556/](http://syang0517.blog.163.com/blog/static/13334026320117299575556/)