Oracle 12C 数据恢复步骤

本文详细记录了一次Oracle 12C数据库因磁盘错误导致的数据恢复过程。首先,通过停止并以NOCRS方式启动CRS恢复OCR,然后创建和恢复ASM磁盘组,接着恢复OCR和VOTEDISK,最后通过RMAN恢复控制文件和数据文件,利用隐藏参数解决无法创建数据文件的问题,完成数据库的打开和RESETLOGS操作。
摘要由CSDN通过智能技术生成

1.1.1  场景

2016年04月25日,由于操作失误,执行了数据库安装时的磁盘设置脚本,所有磁盘前100M数据被清除。导致数据库无法使用。4月22日对数据库进行了全库备份(仅包括数据文件),spfile,control文件均未备份。

1.1.2  操作步骤

使用CRS自动备份的文件恢复OCR ,使用备份的pfile生成spfile,启动数据库后,使用数据库自动生成的control文件的快照恢复控制文件,再用rman恢复数据。

1.1.3  恢复

本步骤结合网上的步骤,及现实情况,进行总结而成。如有类似情况,请参考执行。

1.1.3.1 恢复OCR和VOTEDISK

1)        停止RAC上的CRS服务端

SMIRRDB1:/# crsctl stop has -f

SMIRRDB2:/# crsctl stop has -f

 

2)        在SMIRRDB1节点上以NOCRS方式启动CRS,此操作会启动ASM实例

# crsctl start crs -excl -nocrs

CRS-4123: Oracle High Availability Serviceshas been started.                           

CRS-2673: Attempting to stop 'ora.gpnpd' on'smirrdb1'                                  

CRS-2673: Attempting to stop 'ora.mdnsd' on'smirrdb1'                                  

CRS-2673: Attempting to stop 'ora.gipcd' on'smirrdb1'                                   

CRS-2673: Attempting to stop 'ora.evmd' on'smirrdb1'                                   

CRS-2789: Cannot stop resource 'ora.cssd'as it is not running on server 'smirrdb1'     

CRS-2677: Stop of 'ora.gpnpd' on 'smirrdb1'succeeded                                    

CRS-2677: Stop of 'ora.mdnsd' on 'smirrdb1'succeeded                                   

CRS-2677: Stop of 'ora.gipcd' on 'smirrdb1'succeeded                                   

CRS-2677: Stop of 'ora.evmd' on 'smirrdb1'succeeded                                    

CRS-2672: Attempting to start 'ora.evmd' on'smirrdb1'                                  

CRS-2672: Attempting to start 'ora.mdnsd'on 'smirrdb1'                                 

CRS-2676: Start of 'ora.evmd' on 'smirrdb1'succeeded                                   

CRS-2676: Start of 'ora.mdnsd' on'smirrdb1' succeeded                                  

CRS-2672: Attempting to start 'ora.gpnpd'on 'smirrdb1'                                 

CRS-2676: Start of 'ora.gpnpd' on'smirrdb1' succeeded                                  

CRS-2672: Attempting to start'ora.cssdmonitor' on 'smirrdb1'                           

CRS-2672: Attempting to start 'ora.gipcd'on 'smirrdb1'                                 

CRS-2676: Start of 'ora.gipcd' on'smirrdb1' succeeded                                  

CRS-2676: Start of 'ora.cssdmonitor' on'smirrdb1' succeeded                            

CRS-2672: Attempting to start 'ora.cssd' on'smirrdb1'                                   

CRS-2672: Attempting to start 'ora.diskmon'on 'smirrdb1'                               

CRS-2676: Start of 'ora.diskmon' on'smirrdb1' succeeded                                

CRS-2676: Start of 'ora.cssd' on 'smirrdb1'succeeded                                    

CRS-2672: Attempting to start'ora.cluster_interconnect.haip' on 'smirrdb1'             

CRS-2676: Start of'ora.cluster_interconnect.haip' on 'smirrdb1' succeeded              

CRS-2672: Attempting to start'ora.drivers.acfs' on 'smirrdb1'                          

CRS-2672: Attempting to start 'ora.ctssd'on 'smirrdb1'                                 

CRS-2676: Start of 'ora.ctssd' on'smirrdb1' succeeded                                  

CRS-2676: Start of 'ora.drivers.acfs' on'smirrdb1' succeeded                           

CRS-2672: Attempting to start 'ora.asm' on'smirrdb1'                                   

CRS-2676: Start of 'ora.asm' on 'smirrdb1'succeeded                                     

CRS-2672: Attempting to start 'ora.storage'on 'smirrdb1'                               

CRS-2676: Start of 'ora.storage' on'smirrdb1' succeeded   

 

3)        按原先的ASM设计方案创建DG

 

# su - grid

$ sqlplus / as sysasm

SQL> create diskgroup SYSDG externalredundancy                                   

 2  disk '/dev/rhdisk2'                                                          

 3  ATTRIBUTE 'compatible.rdbms' ='12.1','compatible.asm' = '12.1';             <

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值