ITPub博客

首页 > 数据库 > Oracle > ORA-01111: name for data file 5 is unknown - rename to correct file

ORA-01111: name for data file 5 is unknown - rename to correct file

原创 Oracle 作者:dasong2410 时间:2012-01-06 12:22:27 0 删除 编辑
主库上的5号数据文件已经删除,由于某种原因造成备库上的5号数据文件并没有被删除,而是显示为'/opt/oracle/oracle/product/10.2.0/db_1/dbs/UNNAMED00005'
此时发现备库并没有recover,alert文件中报以下错误(MRP进程关闭)

Thu Jan  5 14:05:05 2012
Errors in file /opt/oracle/admin/dg2/bdump/dg2_mrp0_17216.trc:
ORA-01111: name for data file 5 is unknown - rename to correct file
ORA-01110: data file 5: '/opt/oracle/oracle/product/10.2.0/db_1/dbs/UNNAMED00005'
ORA-01157: cannot identify/lock data file 5 - see DBWR trace file
ORA-01111: name for data file 5 is unknown - rename to correct file
ORA-01110: data file 5: '/opt/oracle/oracle/product/10.2.0/db_1/dbs/UNNAMED00005'
Thu Jan  5 14:05:05 2012
MRP0: Background Media Recovery process shutdown (dg2)

解决方法:
查看数据文件,5号为未知名称数据文件
SQL> select file#, name from v$datafile;

     FILE# NAME
---------- ------------------------------------------------------------
         1 /opt/oracle/oradata/dg2/system01.dbf
         2 /opt/oracle/oradata/dg2/undotbs01.dbf
         3 /opt/oracle/oradata/dg2/sysaux01.dbf
         4 /opt/oracle/oradata/dg2/users01.dbf
         5 /opt/oracle/oracle/product/10.2.0/db_1/dbs/UNNAMED00005
        19 /opt/oracle/oradata/dg2/dasong.dbf

6 rows selected.

将standby_file_management参数修改为manual
SQL> alter system set standby_file_management=manual;

System altered.

重建5号数据文件
SQL> alter database create datafile 5;

Database altered.

将standby_file_management参数修改为auto
SQL> alter system set standby_file_management=auto;

System altered.

启动recover
SQL> alter database recover managed standby database disconnect from session using current logfile;

Database altered.

再次查看数据文件,未知名称数据文件已不存在,数据库recover正常
SQL> select file#, name from v$datafile;

     FILE# NAME
---------- ------------------------------------------------------------
         1 /opt/oracle/oradata/dg2/system01.dbf
         2 /opt/oracle/oradata/dg2/undotbs01.dbf
         3 /opt/oracle/oradata/dg2/sysaux01.dbf
         4 /opt/oracle/oradata/dg2/users01.dbf
        19 /opt/oracle/oradata/dg2/dasong.dbf

错误修改:
创建数据库文件时,如果按上文中的sql(alter database create datafile 5)可能会报以下错误:
ORA-01111: name for data file /opt/oracle/oracle/product/10.2.0/db_1/dbs/UNNAMED00005 is unknown - rename to correct file

此时需要使用以下sql创建文件:
alter database create datafile '/opt/oracle/oracle/product/10.2.0/db_1/dbs/UNNAMED00005' as '/opt/oracle/oradata/dg2/test.dbf';

具体数据文件名可以在alert日志里找到。

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

下一篇: dg case 2
请登录后发表评论 登录
全部评论

注册时间:2011-05-12

  • 博文量
    66
  • 访问量
    311885