Control file recovery when damaged

Source: Internet
Author: User
Article title: control the recovery of corrupted files. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
1. A power supply company has created a power supply charging and management system to facilitate internal management and charge collection. the operating system environment of this system is Windows nt 4.0 Dual-host hot backup; the database version is Oracle 8.1.6 and runs in archive mode. The database stores detailed records of a large amount of electricity charges, which are crucial for power supply companies.
2. but for some reason, two consecutive power outages have occurred, resulting in database downtime. Unfortunately, the user does not have any backup.
3. according to the following error message, we found that the database can only start the instance and an error occurred while reading the control file. In the database design process, the system uses three radial control files from the security perspective. Currently, the three control files have different version numbers.
SVRMGRL> startup
Oracle instance started
Total system global area 222323980 bytes
Fixed size 70924 bytes
Variable size 78667776 bytes
Database buffers 143507456 bytes
Redo buffers 77824 bytes
ORA-00214: controlfile 'd: \ oracle \ oradata \ orcl \ control01.ctl 'version 57460 inconsistent with file 'd: \ oracle \ oradata \ orcl \ control02.ctl 'version 57452.
4. based on the above analysis, we try to modify the parameter file. Modify the control_file parameter in the parameter file to a control file using control01, control02, and control03, respectively. However, the database cannot be started, indicating that all three control files are damaged.
5. because there is no backup control file, we can only rebuild the control file.
D: \> svrmgrl
Oracle Server Manager Release 3.1.6.0.0-Production
Copyright (c) 1997,1999, Oracle Corporation. All rights reserved.
Oracle8i Enterprise Edition Release 8.1.6.0.0-Production
With the Partitioning option
JServer Release 8.1.6.0.0-Production
SVRMGR> connect internal
Connection successful.
SVRMGR> shutdowm abort
The ORACLE instance has been disabled.
SVRMGR> startup nomount
The ORACLE instance has been started.
The total number of global system regions is 108475660 bytes.
Fixed Size 70924 bytes
Variable Size 46116864 bytes
Database Buffers: 62210048 bytes
Redo Buffers 77824 bytes
SVRMGR> create controlfile reuse database orcl noresetlogs archivelog
Logfile group 1 'd: \ oracle \ oradata \ orcl \ redo01.log ',
Group 2 'd: \ oracle \ oradata \ orcl \ redo02.log ',
Group 3 'd: \ oracle \ oradata \ orcl \ redo03.log'
Datafile 'd: \ oracle \ oradata \ orcl \ system01.dbf ',
'D: \ oracle \ oradata \ orcl \ users01.dbf ',
'D: \ oracle \ oradata \ orcl \ temp01.dbf ',
'D: \ oracle \ oradata \ orcl \ tools01.dbf ',
'D: \ oracle \ oradata \ orcl \ indx01.dbf ',
'D: \ oracle \ oradata \ orcl \ dr01.dbf ',
'D: \ oracle \ oradata \ orcl \ rbs01.dbf ';
The statement has been processed.
6. after successfully recreating the control file, we tried to open the database, but the system reported an error, prompting you to restore the media.
SVRMGR> recover datafile 'd: \ oracle \ oradata \ orcl \ system01.dbf ';
The media has been restored.
SVRMGR> recover datafile 'd: \ oracle \ oradata \ orcl \ users0101.dbf ';
The media has been restored.
SVRMGR> recover datafile 'd: \ oracle \ oradata \ orcl \ temp01.dbf ';
The media has been restored.
SVRMGR> recover datafile 'd: \ oracle \ oradata \ orcl \ tools01.dbf ';
The media has been restored.
SVRMGR> recover datafile 'd: \ oracle \ oradata \ orcl \ indx01.dbf ';
The media has been restored.
SVRMGR> recover datafile 'd: \ oracle \ oradata \ orcl \ dr01.dbf ';
The media has been restored.
SVRMGR> recover datafile 'd: \ oracle \ oradata \ orcl \ rbs01.dbf ';
The media has been restored.
7. after the media is restored, open the database again, prompting that the log file also needs to be restored.
SVRMGR> recover database until cancel;
The log has been restored.
8. after the control file, data file, and log file are all restored, the three files are synchronized and the database is opened. the database recovery is completed successfully.
SVRMGR> alter database open resetlogs;
The database has been changed.
9. immediately shut down the database, perform cold backup of the database, and save the database data completely.
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.