今天不小心把oracle的辅助表空间SYSAUX设置为offline导致重新启动的时候出现
引用
Errors in file f:\oracle\product\10.1.0\admin\liweiwei\bdump\liweiwei_j000_3612.trc:
ORA-12012: error on auto execute of job 1
ORA-00376: file 3 cannot be read at this time
ORA-01110: data file 3: 'F:\ORACLE\PRODUCT\10.1.0\ORADATA\LIWEIWEI\SYSAUX01.DBF'
ORA-06512: at "WKSYS.WK_ERR", line 262
ORA-06512: at "WKSYS.WK_JOB", line 441
ORA-00376: file 3 cannot be read at this time
ORA-01110: data file 3: 'F:\ORACLE\PRODUCT\10.1.0\ORADATA\LIWEIWEI\SYSAUX01.DBF'
ORA-06512: at "WKSYS.WK_ERR", line 42
ORA-06512: at "WKSYS.WK_ERR", line 71
ORA-06512: at "WKSYS.WK_ERR", line 105
ORA-06512: at "WKSYS.WK_ADM", line 1389
ORA-00376: file 3 cannot be read at this time
ORA-01110: data file 3: 'F:\ORACLE\PRODUCT\10.1.0\ORADATA\LIWEIWEI\SYSAUX01.DBF'
ORA-06512: at line 1
kwqiclode: Error 376 happened during loading of queue
下面是我处理的一些步骤:
1.查询表空间的状态
select d.tablespace_name,d.status from dba_tablespaces d;
2.查询数据文件的状态
select file#,name,status,enabled from v$datafile;
注意SYSAUX01.DBF数据文件需要恢复。
3.恢复数据文件
recover datafile 'F:\ORACLE\PRODUCT\10.1.0\ORADATA\LIWEIWEI\SYSAUX01.DBF'
4.我们再次查看数据文件的状态
select file#,name,status,enabled from v$datafile;
这时SYSAUX01.DBF数据文件的状态变为offline;
5.恢复SYSAUX01.DBF数据文件的状态online;
alter database datafile 'F:\ORACLE\PRODUCT\10.1.0\ORADATA\LIWEIWEI\SYSAUX01.DBF' online;
6.我们再次查看数据文件的状态
select file#,name,status,enabled from v$datafile;
这时数据库就不会再报Error 376 happened during loading of queue 的错误了。
有时出现这种错误之后,使用OEM都不能登录,执行恢复会空指针异常。