日期:2014-05-16  浏览次数:20549 次

关于undo表空间配置错误的ORA-30012

      undo表空间是Oracle体系结构的重要组成部分,为什么我们可以回滚,就是因为有它。数据库任意数据的修改都会在undo表空间里生成前镜像,一是可以回滚,二是可以实现并发,以及一致性查询。因此undo也是Oracle数据库在创建和配置参数时必要的组成部分。本文描述的是错误的配置undo表空间之后故障的解决。

      有关undo表空间的基础知识可以参考:
            Oracle 回滚(ROLLBACK)和撤销(UNDO)
            检查及设置合理的undo表空间
            收缩undo表空间

 

1、undo异常的错误提示

oracle@DevDB04:~> export ORACLE_SID=BODB3
oracle@DevDB04:~> sqlplus / as sysdba

SQL*Plus: Release 10.2.0.5.0 - Production on Wed Apr 23 10:19:27 2014

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.

Connected to an idle instance.

SQL> startup pfile=/u02/database/BODB3/initBODB3.ora;
ORACLE instance started.

Total System Global Area  536870912 bytes
Fixed Size                  2097624 bytes
Variable Size             411045416 bytes
Database Buffers          117440512 bytes
Redo Buffers                6287360 bytes
Database mounted.
ORA-01092: ORACLE instance terminated. Disconnection forced


2、故障分析
#下面是alert 日志信息
#我们收到了错误提示: ORA-30012,UNDOTBS1不存在或者类型错误
Wed Apr 23 10:19:49 HKT 2014
Errors in file /u02/database/BODB3/udump/bodb3_ora_819.trc:
ORA-30012: undo tablespace 'UNDOTBS1' does not exist or of wrong type
Wed Apr 23 10:19:49 HKT 2014
Error 30012 happened during db open, shutting down database
USER: terminating instance due to error 30012
Instance terminated by USER, pid = 819
ORA-1092 signalled during: ALTER DATABASE OPEN...

#进一步查看跟踪文件
oracle@DevDB04:/u02/database/BODB3/bdump> more /u02/database/BODB3/udump/bodb3_ora_819.trc
/u02/database/BODB3/udump/bodb3_ora_819.trc
Oracle Database 10g Release 10.2.0.5.0 - 64bit Production
ORACLE_HOME = /users/oracle/OraHome10g
System name:    Linux
Node name:      DevDB04
Release:        2.6.16.46-0.12-smp
Version:        #1 SMP Thu May 17 14:00:09 UTC 2007
Machine:        x86_64
Instance name: BODB3
Redo thread mounted by this instance: 1
Oracle process number: 15
Unix process pid: 819, image: oracle@DevDB04 (TNS V1-V3)

*** ACTION NAME:() 2014-04-23 10:19:49.076
     .....中间部分省略.....
----- Recovery Hash Table Statistics ---------
Hash table buckets = 32768
Longest hash chain = 0
Average hash chain = 0/0 = 0.0
Max compares per lookup = 0
Avg compares per lookup = 0/0 = 0.0
----------------------------------------------
ORA-30012: undo tablespace 'UNDOTBS1' does not exist or of wrong type
#也是undo相关的问题,UNDOTBS1不存在或者类型错误
#也就是说undo参数没有正确的设置

 

3、故障解决

SQL> startup mount pfile=/u02/database/BODB3/initBODB3.ora;
ORACLE instance started.
--注,undo 参数没有正确设置是可以mount的,
--