Case: Oracle Unconventional Recovery ASM Disk Group DiskGroup is removed using kfed for perfect recovery

Source: Internet
Author: User
Tags sqlplus

Oracle RAC Environment ASM Disk Group is forcibly deleted with kfed tool for perfect recovery of mistakenly deleted disk group cases

In some cases, may be due to misoperation, not small drop diskgroup, this time do not be nervous, this type of failure, can be kfed for a perfect recovery (data 0 lost). If the relevant ASM disk is further damaged, subsequent restores will be cumbersome, You may need to use the Dul scan disk for salvage recovery and may result in data loss.

1. Create a Test disk group in an Oracle environment
[[email protected] ~]$ sqlplus/as sysasmsql*plus:release 11.2.0.4.0 Production on Thu Apr 15:12:08 2015Copyrigh  T (c) 1982, Oracle. All rights reserved. Connected to:oracle Database 11g Enterprise Edition Release 11.2.0.4.0-64bit productionwith the Automatic Storage Manage                           ment optionsql> Select Name,path,header_status from V$asm_disk;name path                               Header_statu------------------------------------------------------------------------                      /DEV/ASM-DISK3 Candidatedata_0000/dev/asm-disk1 memberdata_0001 /dev/asm-disk2 membersql> Create DiskGroup oracleplus external redundancy disk '/dev /asm-disk3 ';D Iskgroup created. Sql> Select Name,path,header_status from V$asm_disk;name path Heade R_statu------------------------------------------------------------------------Oracleplus_0000/dev/asm-disk3 memberdata_0000/dev/asm- Disk1 Memberdata_0001/dev/asm-disk2 MEMBER

Create a disk group using/DEV/ASM-DISK3 this disk oracleplus

CREATE TABLE, stored in Oracleplus disk group

[[email protected] ~]$ sqlplus/as sysdbasql*plus:release 11.2.0.4.0 Production on Thu Apr 15:14:55 2015Copyrigh  T (c) 1982, Oracle. All rights reserved. Connected to:oracle Database 11g Enterprise Edition Release 11.2.0.4.0-64bit productionwith the partitioning, Automatic Storage Management, OLAP, Data miningand Real application Testing optionssql> Create tablespace oracleplus datafile ' +o Racleplus ' size 100M; Tablespace created. Sql> select name from V$datafile; NAME--------------------------------------------------------------------------------+data/oracleplus/datafile/ system.256.878224279+data/oracleplus/datafile/sysaux.257.878224279+data/oracleplus/datafile/ undotbs1.258.878224279+data/oracleplus/datafile/users.259.878224279+oracleplus/oracleplus/datafile/ Oracleplus.256.878397315sql> CREATE TABLE T_oracleplus tablespace oracleplus 2 as SELECT * from Dba_objects; Table created.  Sql> Select COUNT (*) from T_oracleplus; COUNT (*)----------86259

Implement table Oracleplus in a test disk group by creating table spaces in the disk group

2. Try to delete the disk group Oracleplus
sql> drop DiskGroup oracleplus;drop diskgroup oracleplus*error at line 1:ora-15039:diskgroup not Droppedora-15053:dis   Kgroup "Oracleplus" contains existing filessql> drop DiskGroup oracleplus including Contents;drop DiskGroup Oracleplus including Contents*error at line 1:ora-15039:diskgroup no droppedora-15027:active use of DiskGroup "Oracleplus" precl                                                Udes its dismount[[email protected] ~]$ asmcmdasmcmd> lsofdb_name instance_name Path Oracleplus oracleplus +data/oracleplus/controlfile/current.260.878224379 Oracleplus Oracle Plus +data/oracleplus/datafile/sysaux.257.878224279 oracleplus oracleplus +data/oracleplus/datafile/sy stem.256.878224279 oracleplus oracleplus +data/oracleplus/datafile/undotbs1.258.878224279 oracleplus o Racleplus +data/oracleplus/datafile/users.259.878224279 oracleplus Oracleplus +data/oracleplus/online log/group_1.261.878224381 oracleplus oracleplus +data/oracleplus/onlinelog/group_2.262.878224383 oracleplus oracleplus +da ta/oracleplus/onlinelog/group_3.263.878224385 Oracleplus Oracleplus +data/oracleplus/tempfile/temp.264.8782243   Oracleplus Oracleplus +oracleplus/oracleplus/datafile/oracleplus.256.878397315

Disk group cannot be deleted due to Oracleplus disk group being used by instance, ORA-15027 error is reported
The disk group cannot be deleted due to a file in the Oracleplus disk group, which is reported as ORA-15053 error
If the two warnings that prevent you from accidentally deleting a disk group are still not going to save you, then I'm not going to be able to say anything more, just continue down as I do.

3. Close the DB instance, delete the disk group
sql> shutdown immediatedatabase closed. Database dismounted. ORACLE instance shut down. sql> drop DiskGroup oracleplus;drop diskgroup oracleplus*error at line 1:ora-15039:diskgroup not Droppedora-15053:dis Kgroup "Oracleplus" contains existing filessql> drop DiskGroup oracleplus including Contents;diskgroup dropped. Sql> Select Name,path,header_status from V$asm_disk;name path HEAD Er_statu------------------------------------------------------------------------/dev/asm-                      Disk3 Formerdata_0000/dev/asm-disk1 memberdata_0001 /dev/asm-disk2 membersql> alter DiskGroup oracleplus mount;alter diskgroup oracleplus Mount*ERROR At line 1:ora-15032:not all alterations Performedora-15017:diskgroup "Oracleplus" cannot be mountedora-15063:asm Discov Ered an insufficient number of disks for DiskGroup "Oracleplus"

After the disk group is drop, it can't be normal mount,mount times ORA-15063 No

4. Recover deleted disk groups using the Kfed tool
[Email protected] ~]$ kfed read/dev/asm-disk3 >/tmp/disk3-0-0[[email protected] ~]$ kfed  read/dev/asm-disk3
   blkn=1 >/tmp/disk3-0-1[[email protected] ~]$ kfed  read/dev/asm-disk3  aun=1 >/tmp/disk3-1-0 Modify these through VI/ Partial value in tmp/disk3-* [[email protected] ~]$ kfed merge/dev/asm-disk3 text=/tmp/disk3-0-0[[email protected] ~]$ kfed merge/de V/ASM-DISK3  blkn=1 text=/tmp/disk3-0-1[[email protected] ~]$ kfed merge/dev/asm-disk3 aun=1 text=/tmp/disk3-1-0

Query the repaired ASM disk

Sql> col path for a30sql> set lines 150sql> select Name,path,header_status from v$asm_disk;name                           path                           HEA Der_statu------------------------------------------------------------------------                               /dev/asm-disk3                 memberdata_0000                      /dev/asm-disk1                 memberdata_0001                      /dev/asm-disk2                 MEMBER
5. Try the Mount Oracleplus disk group
sql> alter DiskGroup Oracleplus Mount;diskgroup altered. Sql> Select Name,path,header_status from v$asm_disk;name                           path                           header_ Statu------------------------------------------------------------------------oracleplus_0000                  /dev/ Asm-disk3                 memberdata_0000                      /dev/asm-disk1                 memberdata_0001                      /dev/asm-disk2                 MEMBER

Test Recovery Disk Group

Sql> Startup   ORACLE instance started. Total System Global area  952020992 bytesfixed size                  2258960 bytesvariable size             306186224 bytesdatabase Buffers          637534208 Bytesredo buffers                6041600 bytesdatabase mounted. Database opened. Sql>  Select COUNT (*) from T_oracleplus;  COUNT (*)----------     86259

This proves that, when the disk group is mistakenly deleted, immediately stop further damage, can be kfed for perfect recovery

--------------------------------------ORACLE-DBA----------------------------------------

The most authoritative and professional example of Oracle Case resource Summary: Oracle's unconventional recovery ASM Disk Group DiskGroup is deleted using kfed for perfect recovery

Original URL: http://www.oracleplus.net/arch/oracle-20160602-265.html

Oracle Research Center Key Words:Oracle's unconventional recovery ASM Disk Group DiskGroup is removed using kfed for perfect recovery

Case: Oracle Unconventional Recovery ASM Disk Group DiskGroup is removed using kfed for perfect recovery

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.