プロのOracle Databaseの復旧サービスを提供
携帯番号: +86 13764045638 メール:[email protected]
ORA-01122: database file 9 failed verification check
ORA-01110: data file 9: ‘/mac01.dbf’
ORA-01200: actual file size of 64000 is smaller than correct size of 65600
[oracle@oel8 ~]$ 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@oel8 ~]$ 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.
ORA-1110 、ORA-1122がエラが一緒に現れたとは該当する番号/名前のデータファイルにトラブルが起こったと意味する。例えば、ORA-1200はデータファイルが現れるとはデータファイル自身の大きさが予想した大きさより小さいである。
完全なバックアップとアーカイブを持っているデータベースに対して、RESTORE、REOCOVERでデータファイルをリカバリしてください。何の物理バックアップがないデータベースに対して、DDなどの方法でデータファイルの大きさを修正することによって、トラブルを避けられる。けど、これはせいぜいトラブルを避けるだけで、なくしたデータはリカバリできない。
dd if= of=<output/target datafile> count=< > bs=
Taking the above example (First we take an dd backup of datafile):
dd if=/u02/oradata/careware/users01.dbf of=/tmp/corr_temp.DBF count=64000 bs=8192
Now add 1600 zero blocks to datafile /u02/oradata/careware/users01.dbf
syntax
dd if=/dev/zero of= bs= seek= count=
In parameter seek specify the block from which it should append 1600 blocks.
In this case since the file contains 64000 (as indicated by the error message) so seek=64001 which is the next block from where the append will occur.
dd if=/dev/zero of=/u02/oradata/careware/users01.dbf bs=8192 seek=64001 count=1600 conv=notrunc
Now check the file size at OS level (It should be 65600 * 8192 + 8192)bytes
Do a ls -lrt to confirm the same.
Warning!! Once the database is open, export all the objects present in the tablespace containing the datafile. Please note that for any segment which had blocks that got
truncated at OS level, the export may fail if it tries to read data from the zero padded blocks. In that case it may be needed to apply a procedure to salvage good records.
Once export is complete, create a new tablespace and import the data.
Once it is confirmed that the data is good, drop the old tablespace.
Leave a Reply