ITPub博客

首页 > Linux操作系统 > Linux操作系统 > oralce:ora-00376 问题的解决

oralce:ora-00376 问题的解决

原创 Linux操作系统 作者:aimos 时间:2010-03-28 23:19:12 0 删除 编辑
今天在做练习的时候,遇到了这样的问题:
SQL> create table a1(id int,name varchar2(20));                                                         
create table rmantb1001(id int,name varchar2(20))
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-00376: file 2 cannot be read at this time
ORA-01110: data file 2: '/opt/app/oracle/oradata/orcl/undotbs01.dbf'
同时,在rman里创建catalog时,报:
RMAN> create catalog ;

恢复目录数据库发生 ORACLE 错误: ORA-00604: error occurred at recursive SQL level
 1
ORA-00376: file 2 cannot be read at this time
ORA-01110: data file 2: '/opt/app/oracle/oradata/orcl/undotbs01.dbf'

随后,google了一下ora-00376,发现:
$ oerr ora 376
00376, 00000, "file %s cannot be read at this time"
// *Cause: attempting to read from a file that is not readable. Most likely
// the file is offline.
// *Action: Check the state of the file. Bring it online
$
You might have to recover your datafile, as in following example :
SQL> select ONLINE_STATUS from dba_data_files
2 where file_id = 5;
ONLINE_



RECOVER
select了一下我的dba_data_files,发现:
'/opt/app/oracle/oradata/orcl/undotbs01.dbf'
'/opt/app/oracle/oradata/orcl/sysaux01.dbf'
都是RECOVER的状态。由于sysaux属于系统表空间,不能置为offline,又因为是练习库,所以就:
SQL> shutdown immediate;

SQL> !cp /backup/path/{undotbs01.dbf,sysaux01.dbf} /opt/app/oracle/oradata/orcl/

SQL> startup mount;

SQL> alter database datafile '/opt/app/oracle/oradata/orcl/sysaux01.dbf' offline;

SQL> alter database datafile '/opt/app/oracle/oradata/orcl/undotbs01.dbf' offline;

SQL> recover datafile '/opt/app/oracle/oradata/orcl/sysaux01.dbf';

SQL> recover datafile '/opt/app/oracle/oradata/orcl/undotbs01.dbf';

SQL> alter database datafile '/opt/app/oracle/oradata/orcl/undotbs01.dbf' online;

SQL> alter database datafile '/opt/app/oracle/oradata/orcl/sysaux01.dbf' online;

SQL> alter database open;

Database altered.

此时,再create table,再create catalog ,正常,问题得到解决。







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

上一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2010-01-23

  • 博文量
    15
  • 访问量
    38910