Thursday, October 6, 2011

Oracle Database recovery to fix error ORA-01200

Oracle database is a relation database management system that is used by individual for personal or industrial organization for company requirement. It stores data very securely but sometimes due to power failure or hardware failure it gets corrupt. A corrupt oracle database can be restored from backup, if available. In case there is no backup then it is recommend to you to try any third party oracle database recovery software to repair corrupt oracle database.


Consider a practical scenario, wherein you are working on oracle database and power failure occurs that shutdown your database. When you restart the database got bellow error message:

ORA-01200: actual file size of 1569280 is smaller than correct size of 1569920 (blocksize = 4K)

Cause: As error indicates that the size of file as returned by the OS is smaller than the size of the file as indicated in the file header and the control file. Somehow the file has been truncated.

Resolution: To resolve this error, you have two options.
  • Restore from Backup
  • Create a File with differ size
Restore from Backup: If you have updated backup then restore from backup and fix the issue. If you don't have backup then create a file with differ size.

Create a File with Differ size: As error indicate correct file size is 1569920 byte and actual file size is 1569280 byte that means 640 byte is missing from correct file size. So create a file with length 640 byte through “vi” and insert space into it until it reached the needed size. You can do it by below command:

# mv data0_01.dbf data0_01.dbf.ori
# cat data0_01.dbf.ori append.txt > data0_01.dbf

Now, you have a correct size datafile but need to repair corrupt datafile. You can perform media recovery offered by oracle on the corrupt datafile and fix the problem.

At last, if problem still persists then try any third party oracle database recovery software to repair corrupt datafile. Third party oracle recovery software repairs and restores corrupt oracle datafile efficiently. 

2 comments:

  1. 1569280 and 1569920 are blocks not bytes, so create a file with length 640 byte won't work.

    ReplyDelete
  2. Use Oracle Database Recovery which can easy successfully completed, the DBF Repair tool creates the log report which includes the whole recovery process. It contains a lot of details like end date, start date, objects recovered and records in this process.

    Download now: http://www.mannatsoftware.com/stellar-phoenix-oracle-database-recovery.html

    ReplyDelete