Oracle 在未知文件ID上报告的ORA-1114 错误

如果自己搞不定可以找诗檀软件专业ORACLE数据库修复团队成员帮您恢复!

诗檀软件专业数据库修复团队

服务热线 : 13764045638 QQ号:47079569 邮箱:[email protected]

ORA-01114
oerr ora 1114
01114, 00000, "IO error writing block to file %s (block # %s)"
// *Cause:  The device on which the file resides is probably offline. If the 
//          file is a temporary file, then it is also possible that the device
//          has run out of space. This could happen because disk space of
//          temporary files is not necessarily allocated at file creation time.
// *Action: Restore access to the device or remove unnecessary files to free
//          up space.


 

 

适用于:

Oracle Database – Enterprise Edition – 版本 8.1.6.0到 11.2.0.3 [Release 8.1.6 to 11.2]
本文信息适用于任何平台。

症状

ORA-1114 error reported on an unknown file id:

ORA-01114: IO error writing block to file 1519 (block # 389478)
ORA-27063: skgfospo: number of bytes read/written is incorrect
SVR4 Error: 28: No space left on device

 

但是,不存在文件id等于1519的数据文件:

SQL> select file_id, RELATIVE_FNO, file_name from dba_data_files
where file_id=’1519′;

no rows selected

SQL> select file_id, RELATIVE_FNO, file_name from dba_data_files
where RELATIVE_FNO=1519;
no rows selected
 

我们如何确认哪个文件受错误的影响?

原因

该错误在一个临时文件上被报告。对于临时文件,文件编号从db_files值后开始。在这里,参数db_files 是值是1500,所以文件1519 是临时文件号19。

解决方案

有两种方法来定位错误被报告的临时文件:

  1. 运行以下查询来获取文件名。

select file#, name from v$tempfile where file#=<file id reported in ora-1114 error >-<value of db_files>;

在这个情况中,sql 语句应为

select file#, name from v$tempfile where file#= (1519 – 1500);

 

  1. 查看controlfile dump来找出临时文件。
  2. a) Dump控制文件。
    例如:SQL>alter session set events ‘immediate trace name controlf level 10’;

    b) 打开dump文件并进入以下部分:
    ***************************************************************************
    TEMP FILE RECORDS
    ***************************************************************************

    c) 通过ora-1114错误中的文件id找出临时文件。

在这个情况下,找到以下信息:

TEMP FILE #19: External File #1519  <==== 这是ora-1114 错误中报告的文件号,它指向一个临时文件。
(name #1344) /paic/cx/epcis2/data/oradata/epcis/temp18.dbf
creation size=3670016 block size=8192 status=0xe head=1344 tail=1344 dup=1
tablespace 204, index=202 krfil=17 prev_file=18
unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00

参考


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *