Email: service@parnassusdata.com 7 x 24 online support!

    You are here

    • You are here:
    • Home > Blogs > PDSERVICE's blog > Oracle 在备用数据库环境中的ORA-1122 ORA-1110 和 ORA-01200: 的实际文件大小小于 块的正确大

Oracle 在备用数据库环境中的ORA-1122 ORA-1110 和 ORA-01200: 的实际文件大小小于 块的正确大

Oracle 在备用数据库环境中的ORA-1122 ORA-1110 和 ORA-01200: 的实际文件大小小于 块的正确大

 

 

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

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

服务热线 : 13764045638 QQ号:47079569 邮箱:service@parnassusdata.com

 

ORA-01200:  的实际文件大小小于  块的正确大小

oerr ora 1200
01200, 00000, "actual file size of %s is smaller than correct size of %s blocks"
// *Cause:  The size of the file as returned by the operating system is smaller
//         than the size of the file as indicated in the file header and the
//         control file. Somehow the file has been truncated. Maybe it is the
//         result of a half completed copy.
// *Action: Restore a good copy of the data file and do recovery as needed.
 
 

适用于:

Oracle Server – Enterprise Edition – 版本 11.1.0.6 11.2.0.2.0 [Release 11.1 to 11.2]
本文信息适用于任何平台。

症状

在备用数据库环境中,我们尝试启动或alter database open。这会返回错误ORA-1122 ORA-1110 ORA-1200

SQL> startup
ORACLE instance started.
Total System Global Area 1235959808 bytes
Fixed Size                  2159232 bytes
Variable Size            1107299712 bytes
Database Buffers          117440512 bytes
Redo Buffers                9060352 bytes
Database mounted.

ORA-01122: database file 2 failed verification check
ORA-01110: data file 2: ‘/u01/home/oracle/oradata/chicago/sysaux01.dbf’
ORA-01200: actual file size of 106168 is smaller than correct size of 106296
blocks

SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01122: database file 2 failed verification check
ORA-01110: data file 2: ‘/u01/home/oracle/oradata/chicago/sysaux01.dbf’
ORA-01200: actual file size of 106168 is smaller than correct size of 106296
blocks

尝试备份相同文件可能在其中一个备用数据库中显示相同错误:

RMAN> backup datafile 2 format ‘/tmp/sysaux.bck’;

Starting backup at 01-JUN-12
Starting implicit crosscheck backup at 01-JUN-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=113 device type=DISK
Crosschecked 5 objects
Finished implicit crosscheck backup at 01-JUN-12

Starting implicit crosscheck copy at 01-JUN-12
using channel ORA_DISK_1
Finished implicit crosscheck copy at 01-JUN-12

searching for all files in the recovery area
cataloging files…
no files cataloged

using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 06/01/2012 10:12:27
ORA-01122: database file 2 failed verification check
ORA-01110: data file 2: ‘/u01/home/oracle/oradata/newyork/sysaux01.dbf’
ORA-01200: actual file size of 106168 is smaller than correct size of 106296 blocks

更改

 包含主数据库的机器崩溃并被重启。

原因

问题是由于机器崩溃导致的损坏。

解决方案

查看在其他备用数据库中是否没有损坏。从完好备用数据库中备份文件并还原到主数据库。然后你可以打开主数据库,不生成错误。

[oracle@vboxstb ~]$ rman target /
Recovery Manager: Release 11.1.0.7.0 – Production on Fri Jun 1 10:13:34 2012
Copyright (c) 1982, 2007, Oracle.  All rights reserved.
connected to target database: CHICAGO (DBID=1391866143, not open)

RMAN> backup datafile 2 format ‘/tmp/sysaux.bck’;
Starting backup at 01-JUN-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=120 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00002 name=/u01/home/oracle/oradata/boston/sysaux01.dbf
channel ORA_DISK_1: starting piece 1 at 01-JUN-12
channel ORA_DISK_1: finished piece 1 at 01-JUN-12
piece handle=/tmp/sysaux.bck tag=TAG20120601T101352 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
Finished backup at 01-JUN-12

RMAN> exit
Recovery Manager complete.

 

将文件传输到有问题的数据库,例如使用ftp protocol

连接到主数据库,还原并恢复那里的文件。

[oracle@vboxprm ~]$ rman target /
Recovery Manager: Release 11.1.0.7.0 – Production on Fri Jun 1 10:16:51 2012
Copyright (c) 1982, 2007, Oracle.  All rights reserved.
connected to target database: CHICAGO (DBID=1391866143, not open)

RMAN> catalog backuppiece ‘/tmp/sysaux.bck’;
using target database control file instead of recovery catalog
cataloged backup piece
backup piece handle=/tmp/sysaux.bck RECID=7 STAMP=784808257

RMAN> restore datafile 2;
Starting restore at 01-JUN-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=145 device type=DISK
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00002 to /u01/home/oracle/oradata/chicago/sysaux01.dbf
channel ORA_DISK_1: reading from backup piece /tmp/sysaux.bck
channel ORA_DISK_1: piece handle=/tmp/sysaux.bck tag=TAG20120601T101352
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:25
Finished restore at 01-JUN-12

RMAN> recover datafile 2;
Starting recover at 01-JUN-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=148 device type=DISK
starting media recovery
archived log for thread 1 with sequence 156 is already on disk as file /u01/home/oracle/flash_recovery_area/CHICAGO/archivelog/2012_05_24/o1_mf_1_156_7vv0lr01_.arc

archived log file name=/u01/home/oracle/flash_recovery_area/CHICAGO/archivelog/2012_05_30/o1_mf_1_197_7wd2z2w3_.arc thread=1 sequence=197
media recovery complete, elapsed time: 00:01:30
Finished recover at 01-JUN-12

RMAN> exit
Recovery Manager complete.

 

现在你可以打开主数据库了。

SQL> alter database open;
Database altered.