oralce:ora-00376 问题的解决

今天在做练习的时候,遇到了这样的问题:
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博客 ” ,链接:http://blog.itpub.net/23230551/viewspace-630593/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/23230551/viewspace-630593/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值