今天用PL/SQL连接oracle数据库时,突然连接不上了,报了这样一个错误:ORA-01033: ORACLE initialization or shutdown in progress。在网上查了老长一段时间,再经过不断的摸索,好不容易才解决了。写这,希望能够给遇到同样错误的人一些帮助:
Microsoft Windows XP [版本 5.1.2600] (C) 版权所有 1985-2001 Microsoft Corp.
C:/Documents and Settings/Administrator>e:
E:/>cd ora*
E:/oracle>cd ora*
E:/oracle/ora90>cd bin
E:/oracle/ora90/BIN>sqlplus
SQL*Plus: Release 9.0.1.0.1 - Production on 星期五 6月 20 02:12:36 2008
(c) Copyright 2001 Oracle Corporation. All rights reserved.
请输入用户名: system/sys as sysdba
连接到: Oracle9i Enterprise Edition Release 9.0.1.1.1 - Production With the Partitioning option JServer Release 9.0.1.1.1 - Production
SQL> shutdown normal ORA-01109: 数据库未打开
已经卸载数据库。 ORACLE 例程已经关闭。 SQL> startup mount ORACLE 例程已经启动。
Total System Global Area 114061244 bytes Fixed Size 282556 bytes Variable Size 79691776 bytes Database Buffers 33554432 bytes Redo Buffers 532480 bytes 数据库装载完毕。 SQL> alter database open; alter database open * ERROR 位于第 1 行: ORA-00313: 无法打开日志组 1 (线程 1) 的成员 ORA-00312: 联机日志 1 线程 1: 'E:/ORACLE/ORADATA/ORA10/REDO01.LOG'
SQL> alter database recover database until cancel;
数据库已更改。
SQL> alter database open resetlogs ;
数据库已更改。
在连接就没问题了。
总结:
发生这个问题的主要原因是,我用了优化大师对系统进行了优化,结果不小心把我的'E:/ORACLE/ORADATA/ORA10/REDO01.LOG'这个文件给删除了。只能新建了这个日志文件,再从网上找了执行语句“alter database recover database until cancel; alter database open resetlogs;”,终于搞定。
