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'; <