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]view plaincopyprint?
SQL> startup mount pfile=/u02/database/BODB3/initBODB3.ora;
ORACLE instance started.
--注,undo 参数没有正确设置是可以mount的,
--mount阶段会读取控制文件以获取数据文件和重做日志文件的名字和状态信息,但不检查数据、日志文件存在与一致性
--Author: Leshami
--Blog : http://blog.csdn.net/leshami
--查看undo的配置
SQL> show parameter undo
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
undo_management string AUTO
undo_retention integer 900
undo_tablespace string UNDOTBS1
SQL> ho grep undo /u02/database/BODB3/initBODB3.ora
undo_management=AUTO
undo_tablespace=UNDOTBS1
#undo_retention=86400
#undo_retention=172800
--数据字典中记录的undo信息,没有undotbs1,这就是问题所在
SQL> selectnamefrom v$tablespace wherenamelike'%UNDO%';
NAME
------------------------------
UNDOTBS2
UNDOTBS
--下面查看undo对应的数据文件,有2个,应该是与上面的2个undo表空间相对应
SQL> ho ls -hltr /u02/database/BODB3/undo
total 301M
-rw-r----- 1 oracle oinstall 201M 2014-04-23 10:19 undotbsBODB33.dbf
-rw-r----- 1 oracle oinstall 101M 2014-04-23 10:19 undotbsBODB32.dbf
SQL> shutdown abort;
ORACLE instance shut down.
--下面修改undo配置到任意一个undo表空间
SQL> ho vi /u02/database/BODB3/initBODB3.ora
SQL> ho grep undo /u02/database/BODB3/initBODB3.ora
undo_management=AUTO
undo_tablespace=UNDOTBS
#undo_retention=86400
#undo_retention=172800
--再次重启后可以正常open
--如果你使用的是spfile,可以直接通过alter system去修改
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.
Database opened.
SQL> show parameter db_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_name string BODB3
SQL> select open_mode from v$database;
OPEN_MODE
----------
READ WRITE
SQL> show parameter undo
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
undo_management string AUTO
undo_retention integer 900
undo_tablespace string UNDOTBS
--转自