Home > Oracle > 正文

dd命令的简单使用解决ORA-01200错误参考

数据库版本:11.2.0.4

平台:Linux x86

关键错误信息:ORA-01200

先看错误信息:

SQL> alter database open;
alter database open*
ERROR at line 1:
ORA-01122: database file12 failed verification check
ORA-01110: data file 12: ‘/u01/app/oracle/oradata/orcl/datafile/tb01.dbf’

ORA-01200: actual file size of 32434 is smaller than correct size of 32436 blocks

打开告警日志

Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_3542.trc:
ORA-01122: database file 12 failed verification check
ORA-01110: data file 12: ‘/u01/app/oracle/oradata/orcl/datafile/tb01.dbf’
ORA-01200: actual file size of 32434 is smaller than correct size of 32436 blocks
ORA-1122 signalled during: ALTER DATABASE OPEN…
Wed Jul 14 18:01:01 2021
db_recovery_file_dest_size of 4096 MB is1.51% used. This is a
user-specified limit on the amount of space that will be used by this
database for recovery-related files, and does not reflect the amount of
space available in the underlying filesystem or ASM diskgroup.
Wed Jul 14 18:32:21 2021
alter database open
Read of datafile ‘/u01/app/oracle/oradata/orcl/datafile/tb01.dbf’ (fno 12) header failed with ORA-01200
Rereading datafile 12 header failed with ORA-01200
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_3542.trc:
ORA-01122: database file 12 failed verification check
ORA-01110: data file 12: ‘/u01/app/oracle/oradata/orcl/datafile/tb01.dbf’
ORA-01200: actual file size of 32434 is smaller than correct size of 32436 blocks
ORA-1122 signalled during: alter database open…

根据报错的描述,大概是数据文件小于控制文件记录的数据文件的大小,通过查找资料找到了解决方法。

一、判断差值

根据ORA-01200提示信息,得到数据文件相差2个数据块。
SQL> select 32436-32434 from dual;

二、备份需要操作的数据文件

cp /u01/app/oracle/oradata/orcl/datafile/tb01.dbf /home/oracle

三、执行dd命令增加数据文件大小

使用dd命令增加数据文件大小,8192是数据块大小,2是多少个数据块 seek=32435表示从第32435 个数据块开始增加(32434+1

dd if=/dev/zero of= /u01/app/oracle/oradata/orcl/datafile/tb01.dbf bs=8192 count=2 seek=32435

四、open数据库

SQL> alter database open;

Database altered.

总结:

类似的错误如果有备份使用备份恢复是最靠谱的,没有备份的话其实也可以使用bbed工具修改相关的数据使达到一致,但是本例使用dd命令简单的增加以下文件大小就能解决问题,仅供参考。

 

上一篇:BBED那些事-自用总结
下一篇:sys帐号重命名导致的kokasgi1报错
rman fail for  ORA-01455  RMAN-06031 BUG 5448714

rman fail for ORA-01455 RMAN-06031 BUG 5448714

Oracle 11gRAC  Enterprises Manager (OEM)配置

Oracle 11gRAC Enterprises Manager (OEM)配置

sys帐号重命名导致的kokasgi1报错

sys帐号重命名导致的kokasgi1报错

BBED那些事-自用总结

BBED那些事-自用总结

关于数据库用户登录缓慢的问题

关于数据库用户登录缓慢的问题

数据库RAC 磁盘组磁盘调整

数据库RAC 磁盘组磁盘调整

CRS-2730集群资源DG无法删除

CRS-2730集群资源DG无法删除

发表评论

昵称
邮箱
网址

沙发空闲中,快来抢!