oracle中出现ORA-01122错误怎么办

发布时间:2021-11-11 17:05:54 作者:小新
来源:亿速云 阅读:1182

小编给大家分享一下oracle中出现ORA-01122错误怎么办,希望大家阅读完这篇文章之后都有所收获,下面让我们一起去探讨吧!

现象:

在做表空间恢复演练时,遇到如下错误提示:

SQL> alter database datafile 4 online;
alter database datafile 4 online      
*                                     
ERROR at line 1:                      
ORA-01122: database file 4 failed verification check
ORA-01110: data file 4: '/ora/app/oracle/oradata/orcl/users01.dbf'
ORA-01210: data file header is media corrupt

解决方法:

分析原因:

[oracle@test hotback]$ oerr ora 1122
01122, 00000, "database file %s failed verification check"
// *Cause:  The information in this file is inconsistent with information
//         from the control file. See accompanying message for reason.
// *Action: Make certain that the db files and control files are the correct
//         files for this database.
[oracle@test hotback]$ oerr ora 1110
01110, 00000, "data file %s: '%s'"
// *Cause:  Reporting file name for details of another error. The reported
//          name can be of the old file if a data file move operation is
//          in progress.
// *Action: See associated error message.
[oracle@test hotback]$ oerr ora 1210
01210, 00000, "data file header is media corrupt"
// *Cause: The file header block is internally inconsistent. The beginning
//         of the block has a header with a checksum and other data for
//         insuring the consistancy of the block. It is possible that
//         the last disk write did not operate correctly. The most likely
//         problem is that this is not a datafile for any database.
// *Action: Have operating system make correct file available to database.
//         If the trace file dump indicates that only the checksum is wrong,
//         restore from a backup and do media recovery.

基本可知,还原的数据文件是不正确的。认真检查后,果然是:

ho cp '/ora/app/oracle/backup/hotback/con01.ctl' '/ora/app/oracle/oradata/orcl/users01.dbf'

把备份的控制文件当数据文件给还原回去了!

重新还原:

SQL>  ho cp '/ora/app/oracle/backup/hotback/users01.dbf' '/ora/app/oracle/oradata/orcl/users01.dbf'

后续步骤正确执行。

看完了这篇文章,相信你对“oracle中出现ORA-01122错误怎么办”有了一定的了解,如果想了解更多相关知识,欢迎关注亿速云行业资讯频道,感谢各位的阅读!

推荐阅读:
  1. oracle中出现ORA-600错误怎么办
  2. oracle中出现ORA-28000错误怎么办

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

oracle

上一篇:Ubuntu GDB调试常用命令有哪些

下一篇:Django中的unittest应用是什么

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》