-
备份参数文件
create pfile = ‘/home/oracle/init.ora’ from spfile; -
备份控制文件
Alter database backup controlfile to trace as ‘/home/oracle/controlfile.sql’;
多路复用控制文件
查看当前控制文件使用情况
SQL>show parameter control_files
会看出当前控制文件路径,比如+DATADG1/QHDYNDB/CONTROLFILE/current.272.104660813
两个实例一致性关闭:shutdown immediate
切换到grid用户;
su - grid
输入ASMCMD进入
ASMCMD>cp
+DATADG1/QHDYNDB/CONTROLFILE/current.272.104660813 +DATADG2/QHDYNDB/control02.ctl
之后回到Oracle用户下:
SQL>startup nomount
将刚刚cp的控制文件写入参数文件中:
Alter system set control_files
=‘+DATADG1/QHDYNDB/CONTROLFILE/current.272.104660813’,’+DATADG2/QHDYNDB/control02.ctl’ scope=spfile;
两个实例执行shutdown immediate后再startup
检查
Select * from v$controlfile;
或者show parameter control_files;