ITPub博客

首页 > 数据库 > Oracle > 关于ORA-00376错误的恢复

关于ORA-00376错误的恢复

原创 Oracle 作者:yaanzy 时间:2007-04-04 16:17:26 0 删除 编辑

今天遇到ORA-00376错误:
SQL> select count(*) from bb_bb60.course_main;

ORA0-00376: "file '/data/data1/blackboard/oracle/data/bb_bb60_indx_file1.dbf' cannot be read at this time"

重启数据库没有问题,怀疑数据文件有问题:

[@more@]

SQL> select file#,status from v$datafile;

FILE# STATUS
---------- -------
1 SYSTEM
2 ONLINE
3 ONLINE
4 ONLINE
5 ONLINE
6 ONLINE
7 ONLINE
8 ONLINE
9 ONLINE
10 ONLINE
11 ONLINE
12 ONLINE
13 RECOVER
14 RECOVER
15 ONLINE
16 ONLINE

果然文件13、14状态为RECOVER,看来得手工恢复该文件了

SQL> shutdown immediate
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
SQL> recover datafile '/data/data1/blackboard/oracle/data/bb_bb60_indx_file1.dbf';
ORA-00279: change 5009233 generated at 04/03/2007 14:41:23 needed for thread 1
ORA-00289: suggestion :
/home/oracle/app/oracle/product/9.2.0.1/dbs/arch1_59.dbf
ORA-00280: change 5009233 for thread 1 is in sequence #59


Specify log: {=suggested | filename | AUTO | CANCEL}
auto
Log applied.
Media recovery complete.
SQL> recover datafile '/data/data1/blackboard/oracle/data/bb_bb60_data_file1.dbf';
ORA-00279: change 5009233 generated at 04/03/2007 14:41:23 needed for thread 1
ORA-00289: suggestion :
/home/oracle/app/oracle/product/9.2.0.1/dbs/arch1_59.dbf
ORA-00280: change 5009233 for thread 1 is in sequence #59


Specify log: {=suggested | filename | AUTO | CANCEL}
auto
Log applied.
Media recovery complete.
SQL> alter database datafile '/data/data1/blackboard/oracle/data/bb_bb60_data_file1.dbf' online;

Database altered.

SQL> alter database datafile '/data/data1/blackboard/oracle/data/bb_bb60_indx_file1.dbf' online;

Database altered.

SQL> alter database open;

Database altered.

SQL> select count(*) from bb_bb60.course_main;

COUNT(*)
----------
1032

SQL> select file#,status from v$datafile;

FILE# STATUS
---------- -------
1 SYSTEM
2 ONLINE
3 ONLINE
4 ONLINE
5 ONLINE
6 ONLINE
7 ONLINE
8 ONLINE
9 ONLINE
10 ONLINE
11 ONLINE
12 ONLINE
13 ONLINE
14 ONLINE
15 ONLINE
16 ONLINE

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/3898/viewspace-908739/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
  • 博文量
    108
  • 访问量
    766132