1、备份参数文件、检查控制文件、检查磁盘组名
sqlplus / as sysdba
!echo "create pfile='$HOME/pfile_$ORACLE_SID_`date +%Y%m%d`.ora' from spfile;"
!ls -ltr $HOME/pfile_$ORACLE_SID_`date +%Y%m%d`.ora
set linesize 300 pages 300
col path for a40
col name for a20
col failgroup for a20
col state for a10
col header_status for a13
col mount_status for a12
col value_col_plus_show_param format a70
show parameter control_files
select group_number,name,state,total_mb/1024 total_gb,free_mb/1024 free_gb,((total_mb-free_mb)/total_mb)*100 "used_rate(%)" from v$asm_diskgroup order by 1;
exit
2、关库
srvctl stop database -d mcsdb
3、控制文件生成
rman target /
startup nomount
restore controlfile to '+MCSDG' from '+MCSDG/MCSDB/CONTROLFILE/current.261.998522559'; 执行2次,生成2个
ls -l +MCSDG/MCSDB/CONTROLFILE/
Type Redund Striped Time Sys Name
CONTROLFILE UNPROT FINE JAN 29 02:00:00 Y Current.261.998522559
CONTROLFILE UNPROT FINE JAN 29 02:00:00 Y current.263.998791375
CONTROLFILE UNPROT FINE JAN 29 02:00:00 Y current.267.998791379
4、修改参数文件(建议放在不同的磁盘组)
alter system set control_files='+MCSDG/MCSDB/CONTROLFILE/current.261.998522559','+MCSDG/MCSDB/CONTROLFILE/current.263.998791375','+MCSDG/MCSDB/CONTROLFILE/current.267.998791379' scope=spfile;
shutdown immediate;
5、启动数据库
srvctl start database -d mcsdb