今天启动数据库从mount 到open 的时候,总是起不来
原因是undo 文件是offline的,我一开始是找ora-00604 的错,没有进展。下面换成找ora-00367才解决。
看alert 日志的报错:
Errors in file /u01/pp/oracle/admin/ezhou/bdump/ezhou_smon_21637.trc:
ORA-00604: error occurred at recursive SQL level 1
ORA-00376: file 2 cannot be read at this time
ORA-01110: data file 2: '/u02/ezhou/undotbs01.dbf'
select name, status from v$datafile;
STATUS NAME
------- ----------------------------------------
SYSTEM /u02/ezhou/system01.dbf
OFFLINE /u02/ezhou/undotbs01.dbf
ONLINE /u02/ezhou/sysaux01.dbf
ONLINE /u02/ezhou/users01.dbf
ONLINE /u02/ezhou/example01.dbf
ONLINE /u02/ezhou/example02.dbf
ONLINE /u02/ezhou/test01.dbf
RECOVER /u01/pp/oracle/product/10.2/db_1/dbs/MIS
SING00008
8 rows selected.
后来转变思路,查 ”ORA-00376: file 2 cannot be read at this time“ 才解决问题。
undo 文件和其他的文件不一样,一定要online 才可以 open.
SQL> select status from v$instance;
STATUS
------------
MOUNTED
SQL>
SQL> alter database datafile 2 online;
Database altered.
SQL> alter database open;
Database altered.