问题解释:
文件的真实大小比控制文件和数据文件头记录的小,一般是数据库异常导致的,在数据库的运行过程中,重新启动时,文件resize之后出现异常状
况时都可能会遇到.
推荐的解决方案是从备份中恢复一个完好的拷贝,执行必要的恢复,使数据库恢复到正常的状态。
问题的发现
备份失败,提示如下:
allocated channel:ch00
channel ch00:sid=32 devtype=SBT_TAPE
channel choo:Veritas NetBackup for Oracle - Release 6.5
sent command to channel:ch00
Starting backup at 24-MAR-09
channel ch00:starting incremental level 0 datafile backupset
channel ch00:specifying datafile(s) in backupset
input datafile fno=00079 name=/dev/rpub_pind1_12
input datafile fno=00090 name=/dev/rpub_ping2_13
channel ch01:starting piece 1 at 24-MAR-09
including current SPFILE in backupset
including current controlfile in backupset
input datafile fno=00044 name=/dev/rpub_pdata2_06
input datafile fno=00063 name=/dev/rpub_plob2_05
released channel:ch00
RMAN-00571==============
RMAN-00569==============
RMAN-00571==============
RMAN-03009:failure of backup command on ch00 channel at 03/24/2009 00:06:42
ORA-01122:database file 59 failed verification check
ORA-01110:data file 59:'/dev/rpub_plob2_01'
ORA-01200:actual file size of 327678 is smaller than corrent size of 655104 blocks
这里提示 文件59大小异常,文件实际大小为327678个数据块,而控制文件记录的当前大小为655104,两者不一致,导致rman异常退出,备份失败。
如果为了使rman暂时能够跳过这个错误,可以在rman中设置备份时跳过这个出现错误的表空间,在常规rman备份时,也可以通过exclude命令来排除某些表空间:
rman target /
Recovery Manager: Release 9.2.0.7.0 - 64bit Production
Copyriht (c) 1995,2002,Oracle Corporation. All rights reserced.
connected to target database:OS(DBID=658484424)
RMAN>configure exclude for tablespace PUB_PLOB2_01;
using target database controlfile instead of recovery catalog tablespace PUB_PLOB2_01 will be excluded from future whole database backups
new RMAN configuration parameters are successfully stored
检查告警日志文件,可以找到离线文件的相关信息,其实初始创建大小为126MB,创建时间等如下代码:
Wed Nov 16 09:00:44 2005
create tablespace pub_plob2_01 datafile '/dev/rpub_plob2_01' size 126m segment space management auto
Wed Nov 16 09:00:45 2005
Completed:created tablespace pub_plob2_01 datafile '/dev/rpub.......
而数据文件离线的具体出错时间及详细信息如下:
Mon Mar 9 16:41:04 2009
Errors in file /opt/prod/admin/ds/bdump/ds2_ckpt_827498.trc:
ORA-01171:datafile 59 going offline due to error advancing checkpoint
ORA-01122:database file 59 failed verification check
ORA-01110:data file 59:'/dev/rpub_plob2_01'
ORA-01200:actual file size of 327678 is smaller than correct size of 655104 blocks
检查点进程在增加表空间时,发现了该文件的错误,并将该文件离线,CKPT进程跟踪文件记录如下:
Oracle9i Enterprise Edition Release 9.2.0.7.0-64bit Production
With the Partitioning and Real Application Clusters options
JServer Release 9.2.0.7.0-Production
ORACLE_HOME=/opt/prod/ora92
System name:AIX
Node name:oracle2
Release:1
Version:5
Machine:0007D76F4C00
Instance name:ds2
Redo thread mounted by this instance:2
Oracle process number:10
Unix process pid:827498,image:oracle@oracle2(CKPT)
****2009-03-09......
****SESSION ID:(11.1) 2008.....
ORA-01171:datafile 59 going offline dure to error advancing checkpoint
ORA-01122:database file 59 failed verification check
ORA-01110:data file 59:'/dev/rpub_plob2_01'
ORA-01200:actual file size of 327678 is smaller than correct size of 655104 blocks
--171