ALTER DATABASE create datafile in Oracle causes data file loss recovery

Source: Internet
Author: User
Tags oracle database

ALTER DATABASE Create datafile causes the original data file to be lost


We have a client with a small system to recover, after Oracle Database Recovery Check detection We found a strange phenomenon in the Red box section



1. The head of the file is fuzzy No, does not conform to the database unusual crash common sense, also and other files this state does not match
2. File creation time, SCN and checkpoint time, SCN consistent (that is, the file is created after the checkpoint, and then there is no other action)
3. The file started to be applied in 5,110 and other data file requirements of 3115 is far from
In combination with these cases, suspect that the file was recreated, and find alert log if the following information is found

Two files are created by creating datafile, then offline the operation. Check the creation time and SEQ information of file 6 and 8 with alert log

Fri 16 15:03:36 2015
Thread 1 advanced to log sequence 5 (LGWR switch)
Current log# 2 seq# 5 mem# 0:d:\app\administrator\oradata\mychoice\redo02. LOG
Fri 16 15:13:19 2015
CREATE bigfile tablespace "Fbaudit"
DataFile ' E:\ZDSoft\ZDFood\databak\FBAUDIT ' SIZE 10M
Autoextend on NEXT 10M
MAXSIZE Unlimited LOGGING EXTENT MANAGEMENT local SEGMENT spaces MANAGEMENT AUTO
Completed:create bigfile tablespace "Fbaudit"
DataFile ' E:\ZDSoft\ZDFood\databak\FBAUDIT ' SIZE 10M
Autoextend on NEXT 10M
MAXSIZE Unlimited LOGGING EXTENT MANAGEMENT local SEGMENT spaces MANAGEMENT AUTO

Sat Feb 07 15:03:46 2015
Thread 1 advanced to log sequence (LGWR switch)
Current log# 2 seq# mem# 0:d:\app\administrator\oradata\mychoice\redo02. LOG
Sat Feb 07 15:20:41 2015
CREATE bigfile tablespace "card"
DataFile ' E:\ZDSoft\ZDCARD\databak\CARD1 ' SIZE 10M
Autoextend on NEXT 10M
MAXSIZE Unlimited LOGGING EXTENT MANAGEMENT local SEGMENT spaces MANAGEMENT AUTO
Completed:create bigfile tablespace "card"
DataFile ' E:\ZDSoft\ZDCARD\databak\CARD1 ' SIZE 10M
Autoextend on NEXT 10M
MAXSIZE Unlimited LOGGING EXTENT MANAGEMENT local SEGMENT spaces MANAGEMENT AUTO

By combining alert log judgments, we can determine that the current Oracle Database Recovery Check checks out is due to the loss of the file before the failure of the Execute create datafile command, creating a new data file, Because the library is not in archive mode, causes the file data to be unrecoverable (note: Not only is it not in archive mode, but it also needs to be created from file to all archives now). In most production systems, I believe it is impossible to have such an archive because in executing ALTER DATABASE The Create datafile command must be careful to assess whether or not to lose the archive, otherwise it can cause the damage of the reason.
Customers are aware of the tragedy, but want us to help restore a core of data, the user's balance information.

Missing file recovery for ALTER DATABASE create DataFile


Tool scans original file-related records (due to write large amounts of data, unable to complete recovery, only through the tool scan, recover part of the data) [ASM disk header completely corrupted recovery]


Because the original library, although lost these two files, but has been open successfully, through the relevant data obj combined with the scanned file, extract the required object block, Then the data in the block is read to recover the relevant data. Here we have another difficulty is that because these two files are bigfile, it adds to the difficulty of the recovery process


At this point we have implemented a recovery of the core data that caused the file loss for ALTER DATABASE create datafile. Minimize customer damage as possible. This recovery is determined by luck, and the block of data on disk is not overwritten. If the cover is basically hopeless.
If database recovery is required, please contact us (Oracle Database Recovery Technical support) to provide you with professional database technical support:
phone:13429648788 Q q:107644445 e-mail:dba@xifenfei.com

Remind again

1. In the case of database failure, as far as possible to protect the scene, do not before the consequences of the operation of Baidu on the indiscriminate direct operation, resulting in irreversible damage, data may be permanently lost [Oracle Exception Recovery pre-backup protection site recommendations-filesystem Environment | Backup protection site prior to Oracle exception recovery-ASM Environment
2. You need to be cautious before using the ALTER DATABASE create DATAFILE command to evaluate whether all archives exist

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.