Welcome 微信登录

首页 / 数据库 / MySQL / undo 表空间损坏导致无法open

undo 表空间损坏导致无法open在数据库undo表空间文件损坏,或者undo表空间文件缺失的情况,无法打开数据库。这两种情况都可以视为一种情况处理,解决方法一样。启动数据库时 出现:SQL> startupOracle instance started.Total System Global Area  709836800 bytes
Fixed Size                  2231752 bytes
Variable Size           536871480 bytes
Database Buffers          167772160 bytes
Redo Buffers                2961408 bytes
Database mounted.
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-30012: undo tablespace "UNDOTBS1" does not exist or of wrong type
Process ID: 4098Session ID: 1 Serial number: 5可以很明显的看到,由于undo表空间损坏或丢失,导致无法打开。解决思路很简单:新建一个undo表空间,然后将undo_tablespace指向新的undo表空间。但是,但是。。。新建表空间只能在数据库open状态下才能进行。所以。。因为oracle system 表空间还有回滚段,因为我们先可以让oracle使用回滚段打开数据库,然后就可以新建undo表空间了解决思路:1、将数据库启动到mount
2、alter system set undo_management=manual scope=spfile;3、shutdown immediate4 、startup 然后新建一个undo表空间 new_undotbsxx5、修改undo_tablespace参数指向new_undotbsxx6、记得 将undo_manageme参数修改回来。 alter system set undo_management=auto scope=spfile;SQL> alter system set undo_management=manual scope=spfile;System altered.然后打开数据库---SQL> startup
ORACLE instance started.Total System Global Area  709836800 bytes
Fixed Size                  2231752 bytes
Variable Size           536871480 bytes
Database Buffers          167772160 bytes
Redo Buffers                2961408 bytes
Database mounted.
Database opened.--已经顺利打开数据库查看 --undo_management
NAME                               TYPE        VALUE
------------------------------------ ----------- ------------------------------
undo_management                      string      MANUAL
undo_retention                     integer   900
undo_tablespace                      string      UNDOTBS11
现在可以新建一个undo_tablespace 然后将undo_tablespace参数指向过去。
SQL> create undo tablespace undotbs11 datafile "/u01/app/oracle/oradata/orcl/undotbs11.dbf" size 100m;Tablespace created.--然后将undo_tablespace指向为刚刚新建的undo表空间SQL> alter system set undo_tablespace=undotbs11 scope=spfile;System altered.
--最后一定一定要记得把undo_management  给改回来SQL> alter system set undo_management=auto scope=spfile;System altered.然后关闭数据库,再打开SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.Total System Global Area  709836800 bytes
Fixed Size                  2231752 bytes
Variable Size           536871480 bytes
Database Buffers          167772160 bytes
Redo Buffers                2961408 bytes
Database mounted.
Database opened.--没有问题,可以将以前损坏的undo表空间数据文件删除了SQL> drop tablespace undotbs1 including contents and datafiles;Tablespace dropped.推荐阅读:[Oracle] 在没有备份的情况下undo损坏怎么办? http://www.linuxidc.com/Linux/2013-06/86143.htmUNDO表空间失败的处理方法 http://www.linuxidc.com/Linux/2013-05/83974.htmundo表空间故障和ORA-01548处理 http://www.linuxidc.com/Linux/2013-01/77748.htmRAC下丢失undo表空间的恢复 http://www.linuxidc.com/Linux/2012-10/71709.htmUNDO表空间备份恢复 http://www.linuxidc.com/Linux/2012-09/69953.htm更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12Oracle 自动内存管理基于RMAN的异机数据库克隆(rman duplicate)相关资讯      undo表空间 
  • 如何删除回滚段状态为NEEDS   (09/02/2015 19:28:49)
  • undo表空间概述  (02/24/2015 20:32:43)
  • 监控和管理Oracle UNDO表空间的使  (01/29/2015 11:20:57)
  • undo表空间使用率  (07/23/2015 16:29:56)
  • Oracle 11gR2 Database UNDO表空间  (01/29/2015 11:30:59)
  • 在线扩大数据库UNDO表空间  (07/17/2014 08:10:22)
本文评论 查看全部评论 (0)
表情: 姓名: 字数