ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 关于ORA-00376错误的恢复(zt)

关于ORA-00376错误的恢复(zt)

原创 Linux操作系统 作者:season0891 时间:2009-08-19 11:00:29 0 删除 编辑
本文转自 :http://yaanzy.itpub.net/post/1263/277376

今天遇到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"

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


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/90618/viewspace-612662/,如需转载,请注明出处,否则将追究法律责任。

上一篇: apache+mysql4+php
请登录后发表评论 登录
全部评论

注册时间:2008-06-10

  • 博文量
    791
  • 访问量
    1926160