Explore Oracle RMAN_07 disk corruption data loss recovery

Source: Internet
Author: User

Sometimes, database faults and data loss may inevitably occur in the enterprise due to disk damage. At this time, data backup is particularly important. In this section, we will focus on loading data files,RedoLog File,ControlfileDisk damage data recovery of control files. 

6.1Simulate data disk corruption by force detaching the disk:

[Root @ wwldb ~] # Umount-f/DBData/

Umount2:Resource or Device Busy

Umount:/DBData: device is busy

Umount2:Resource or Device Busy

Umount:/DBData: device is busy

 

[Root @ wwldb ~] # Fuser-m-k/DBData/View device usage

/DBData/: 3508 3510 3512 3514 3516 3518 3529 3531 3535 3541 3610c

 

[Root @ wwldb ~] # Fuser-m-k-I-k/DBData/ForceKill/DBDataRELATED PROCESSES

[Root @ wwldb ~] # Umount-f/DBData/Uninstall/DBData

[Root @ wwldb ~] #

 

6.2 umountAfterAlertThe instance also goes down.

Fri Jul 616: 03: 33 2012.

Errors in file/DBSoft/admin/WWL/bdump/wwl_pmon_3502.trc:

ORA-00471: DBWR process terminated with error.

Fri Jul 616: 03: 33 2012.

PMON: terminating instance due to error 471

Instance terminated by PMON, pid = 3502

 

[Root @ wwldb bdump] # ps-ef | grep ora

Root 2965 2943 0? 00:00:00 hald-addon-storage: polling/dev/hdc

Root 3944 3050 0 00:00:00 pts/2 su-Oracle

Oracle 3945 3944 0 00:00:00 pts/2-bash

Oracle 3977 3945 0 00:00:00 pts/2 rlwrap sqlplus/as sysdba

Oracle 3978 3977 0 00:00:00 pts/3 sqlplus as sysdba

Oracle 3979 3978 0? 00:00:00 oracleWWL (DESCRIPTION = (LOCAL = YES) (ADDRESS = (PROTOCOL = beq )))

Root 4022 3980 0 00:00:00 pts/4 grep ora

[Root @ wwldb bdump] #

 

6.3To recover, you must first start the databaseMountStatus to restore

SQL> startup

ORACLE instance started.

 

Total System Global Area 100663296 bytes

Fixed Size 1217884 bytes

Variable Size 88083108 bytes

Database Buffers 8388608 bytes

Redo Buffers 2973696 bytes

ORA-00205: error in identifying control file, checkalert log for more info

 

The database cannot be startedMountStatus, must be startedMountStatus, but we canAlertThe log shows that the file is controlled.2The database cannot be startedMountStatus, as shown in the following figure:

Fri Jul 616: 13: 24 2012

ORA-00202: control file: '/DBData/oradata/WWL/control02.ctl'

ORA-27037: unable to obtain file status

Linux Error: 2: No such file or directory

Additional information: 3

Fri Jul 616: 13: 24 2012

ORA-205 signalled during: alter database mount...

 

At this time, we can try to find out whether all other control files exist and where they are stored. As long as any control file exists, we only need to modify the parameter file to start the databaseMountStatus.

 

SQL> show parameter control

 

NAME TYPE VALUE

-----------------------------------------------------------------------------

Control_file_record_keep_time integer 7

Control_files string/DBSoft/oradata/WWL/control01.ctl,/DBData/oradata/WWL/control02.ctl,/DBData/oradata/WWL/control03.ctl

 

We passSpfileThe parameter shows that the control file is stored on two disks, and the damaged disk is/DBData, Then we thoughtControl02.ctlAndControl03.ctlThe two control files are corrupted. In this case, we can use/DBSoftDiskControl01.ctlTo start the database, orControl02.ctlAndControl03PassControl01.ctlDump to another disk to start the database.

 

By modifying the parameter file, I only keepControl01.ctlTo start the database.

 

SQL> alter system set control_files = '/DBSoft/oradata/WWL/control01.ctl' scope = spfile;

System altered.

 

SQL> shutdown immediate

ORA-01507: database not mounted

ORACLE instance shut down.

 

SQL> startup mount;

ORACLE instance started.

 

Total System Global Area 100663296 bytes

Fixed Size 1217884 bytes

Variable Size 88083108 bytes

Database Buffers 8388608 bytes

Redo Buffers 2973696 bytes

Database mounted.

SQL>

We can see that by modifying the parameter file, the database has been startedMountStatus.

  • 1
  • 2
  • 3
  • 4
  • Next Page

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.