标签云
asm恢复 bbed bootstrap$ dul In Memory kcbzib_kcrsds_1 kccpb_sanity_check_2 kfed MySQL恢复 ORA-00312 ORA-00607 ORA-00704 ORA-01110 ORA-01555 ORA-01578 ORA-08103 ORA-600 2131 ORA-600 2662 ORA-600 2663 ORA-600 3020 ORA-600 4000 ORA-600 4137 ORA-600 4193 ORA-600 4194 ORA-600 16703 ORA-600 kcbzib_kcrsds_1 ORA-600 KCLCHKBLK_4 ORA-15042 ORA-15196 ORACLE 12C oracle dul ORACLE PATCH Oracle Recovery Tools oracle加密恢复 oracle勒索 oracle勒索恢复 oracle异常恢复 Oracle 恢复 ORACLE恢复 ORACLE数据库恢复 oracle 比特币 OSD-04016 YOUR FILES ARE ENCRYPTED 勒索恢复 比特币加密文章分类
- Others (2)
- 中间件 (2)
- WebLogic (2)
- 操作系统 (102)
- 数据库 (1,655)
- DB2 (22)
- MySQL (71)
- Oracle (1,519)
- Data Guard (51)
- EXADATA (8)
- GoldenGate (21)
- ORA-xxxxx (158)
- ORACLE 12C (72)
- ORACLE 18C (6)
- ORACLE 19C (14)
- ORACLE 21C (3)
- Oracle 23ai (7)
- Oracle ASM (65)
- Oracle Bug (8)
- Oracle RAC (52)
- Oracle 安全 (6)
- Oracle 开发 (28)
- Oracle 监听 (28)
- Oracle备份恢复 (553)
- Oracle安装升级 (90)
- Oracle性能优化 (62)
- 专题索引 (5)
- 勒索恢复 (76)
- PostgreSQL (18)
- PostgreSQL恢复 (6)
- SQL Server (27)
- SQL Server恢复 (8)
- TimesTen (7)
- 达梦数据库 (2)
- 生活娱乐 (2)
- 至理名言 (11)
- 虚拟化 (2)
- VMware (2)
- 软件开发 (37)
- Asp.Net (9)
- JavaScript (12)
- PHP (2)
- 小工具 (20)
-
最近发表
- RAC默认服务配置优先节点
- Oracle 19c RAC 替换私网操作
- 监听报TNS-12541 TNS-12560 TNS-00511错误
- drop tablespace xxx including contents恢复
- Linux 8 修改网卡名称
- 如何修改集群的公网信息(包括 VIP) (Doc ID 1674442.1)
- 如何在 oracle 集群环境下修改私网信息 (Doc ID 2103317.1)
- ORA-600 [kcvfdb_pdb_set_clean_scn: cleanckpt] 相关bug
- ORA-600 krhpfh_03-1210故障处理
- 19c库启动报ORA-600 kcbzib_kcrsds_1
- DBMS_SESSION.set_context提示ORA-01031问题解决
- redo写丢失导致ORA-600 kcrf_resilver_log_1故障
- 硬件故障导致ORA-01242 ORA-01122等错误
- 200T 数据库非归档无备份恢复
- 利用flashback快速恢复failover 的备库
- [comingback2022@cock.li].eking和[tsai.shen@mailfence.com].faust扩展名勒索病毒数据库可以完美恢复
- opatch auto 出现unable to get oracle owner for 错误
- Oracle 23ai 表和视图的列最多支持到4096个
- 断电引起redo和数据文件不一致故障恢复
- ORA-03113: 通信通道的文件结尾
标签归档:删除磁盘组恢复
kfed恢复误删除磁盘组
在某些情况下,可能因为误操作,不小先drop diskgroup,这个时候千万别紧张,出现此类故障,可以通过kfed进行完美恢复(数据0丢失).如果进一步损坏了相关asm disk,那后续恢复就很麻烦了,可能需要使用dul扫描磁盘来进行抢救性恢复,而且可能导致数据丢失.
创建测试磁盘组xifenfei
[grid@xifenfei ~]$ sqlplus / as sysasm SQL*Plus: Release 11.2.0.4.0 Production on Thu Apr 30 15:12:08 2015 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Automatic Storage Management option SQL> select name,path,header_status from v$asm_disk; NAME PATH HEADER_STATU ------------------------------ ------------------------------ ------------ /dev/asm-disk3 CANDIDATE DATA_0000 /dev/asm-disk1 MEMBER DATA_0001 /dev/asm-disk2 MEMBER SQL> create diskgroup xifenfei external redundancy disk '/dev/asm-disk3'; Diskgroup created. SQL> select name,path,header_status from v$asm_disk; NAME PATH HEADER_STATU ------------------------------ ------------------------------ ------------ XIFENFEI_0000 /dev/asm-disk3 MEMBER DATA_0000 /dev/asm-disk1 MEMBER DATA_0001 /dev/asm-disk2 MEMBER
使用/dev/asm-disk3这个磁盘创建磁盘组xifenfei
创建表,存储在xifenfei磁盘组中
[oracle@xifenfei ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Thu Apr 30 15:14:55 2015 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options SQL> create tablespace xifenfei datafile '+xifenfei' size 100M; Tablespace created. SQL> select name from v$datafile; NAME -------------------------------------------------------------------------------- +DATA/xifenfei/datafile/system.256.878224279 +DATA/xifenfei/datafile/sysaux.257.878224279 +DATA/xifenfei/datafile/undotbs1.258.878224279 +DATA/xifenfei/datafile/users.259.878224279 +XIFENFEI/xifenfei/datafile/xifenfei.256.878397315 SQL> create table t_xifenfei tablespace xifenfei 2 as select * from dba_objects; Table created. SQL> select count(*) from t_xifenfei; COUNT(*) ---------- 86259
通过在磁盘组中创建表空间,从而实现表xifenfei存放在测试磁盘组中
尝试删除磁盘组xifenfei
SQL> drop diskgroup xifenfei; drop diskgroup xifenfei * ERROR at line 1: ORA-15039: diskgroup not dropped ORA-15053: diskgroup "XIFENFEI" contains existing files SQL> drop diskgroup xifenfei including contents; drop diskgroup xifenfei including contents * ERROR at line 1: ORA-15039: diskgroup not dropped ORA-15027: active use of diskgroup "XIFENFEI" precludes its dismount [grid@xifenfei ~]$ asmcmd ASMCMD> lsof DB_Name Instance_Name Path xifenfei xifenfei +data/xifenfei/controlfile/current.260.878224379 xifenfei xifenfei +data/xifenfei/datafile/sysaux.257.878224279 xifenfei xifenfei +data/xifenfei/datafile/system.256.878224279 xifenfei xifenfei +data/xifenfei/datafile/undotbs1.258.878224279 xifenfei xifenfei +data/xifenfei/datafile/users.259.878224279 xifenfei xifenfei +data/xifenfei/onlinelog/group_1.261.878224381 xifenfei xifenfei +data/xifenfei/onlinelog/group_2.262.878224383 xifenfei xifenfei +data/xifenfei/onlinelog/group_3.263.878224385 xifenfei xifenfei +data/xifenfei/tempfile/temp.264.878224395 xifenfei xifenfei +xifenfei/xifenfei/datafile/xifenfei.256.878397315
由于xifenfei磁盘组被实例使用,因此磁盘组无法删除,报ORA-15027错误
由于xifenfei磁盘组中有文件,因此磁盘组无法删除,报ORA-15053错误
如果这两个阻止你误删除磁盘组的警告依然不能救你,那我也不好多说啥了,只能向我一样继续往下
关闭数据库实例,删除磁盘组
SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> drop diskgroup xifenfei; drop diskgroup xifenfei * ERROR at line 1: ORA-15039: diskgroup not dropped ORA-15053: diskgroup "XIFENFEI" contains existing files SQL> drop diskgroup xifenfei including contents; Diskgroup dropped. SQL> select name,path,header_status from v$asm_disk; NAME PATH HEADER_STATU ------------------------------ ------------------------------ ------------ /dev/asm-disk3 FORMER DATA_0000 /dev/asm-disk1 MEMBER DATA_0001 /dev/asm-disk2 MEMBER SQL> alter diskgroup xifenfei mount; alter diskgroup xifenfei mount * ERROR at line 1: ORA-15032: not all alterations performed ORA-15017: diskgroup "XIFENFEI" cannot be mounted ORA-15063: ASM discovered an insufficient number of disks for diskgroup "XIFENFEI"
磁盘组被drop之后,无法正常mount,mount之时报ORA-15063凑无
kfed恢复删除磁盘组
[grid@xifenfei ~]$ kfed read /dev/asm-disk3 >/tmp/disk3-0-0 [grid@xifenfei ~]$ kfed read /dev/asm-disk3 blkn=1 >/tmp/disk3-0-1 [grid@xifenfei ~]$ kfed read /dev/asm-disk3 aun=1 >/tmp/disk3-1-0 通过vi修改这些/tmp/disk3-*中的部分值 [grid@xifenfei ~]$ kfed merge /dev/asm-disk3 text=/tmp/disk3-0-0 [grid@xifenfei ~]$ kfed merge /dev/asm-disk3 blkn=1 text=/tmp/disk3-0-1 [grid@xifenfei ~]$ kfed merge /dev/asm-disk3 aun=1 text=/tmp/disk3-1-0
查询修复后的asm disk
SQL> col path for a30 SQL> set lines 150 SQL> select name,path,header_status from v$asm_disk; NAME PATH HEADER_STATU ------------------------------ ------------------------------ ------------ /dev/asm-disk3 MEMBER DATA_0000 /dev/asm-disk1 MEMBER DATA_0001 /dev/asm-disk2 MEMBER
尝试mount xifenfei 磁盘组
SQL> alter diskgroup xifenfei mount; Diskgroup altered. SQL> select name,path,header_status from v$asm_disk; NAME PATH HEADER_STATU ------------------------------ ------------------------------ ------------ XIFENFEI_0000 /dev/asm-disk3 MEMBER DATA_0000 /dev/asm-disk1 MEMBER DATA_0001 /dev/asm-disk2 MEMBER
测试恢复后磁盘组
SQL> startup ORACLE instance started. Total System Global Area 952020992 bytes Fixed Size 2258960 bytes Variable Size 306186224 bytes Database Buffers 637534208 bytes Redo Buffers 6041600 bytes Database mounted. Database opened. SQL> select count(*) from t_xifenfei; COUNT(*) ---------- 86259
这里证明,当磁盘组被误删除后,立即停止进一步损坏,可以通过kfed进行完美恢复
如果您遇到此类情况,无法解决请联系我们,提供专业ORACLE数据库恢复技术支持
Phone:17813235971 Q Q:107644445 E-Mail:dba@xifenfei.com