backup incremental level 0 database tag 'test_backup00' format '/oracledba/rmanbackup/db0_%U.bak';
backup archivelog all format '/oracledba/rmanbackup/arch_%T.bak' tag 'arch';
backup current controlfile format '/oracledba/rmanbackup/control_%f.dbf' tag 'ctl';
参数文件备份
create pfile='/u01/app/oracle/product/11.2.0.4/db_1/dbs/pfileracdb01.ora' from spfile;
修改spfile参数
ALTER SYSTEM SET control_files='+DATA/racdb/controlfile/controlfile01.ctl', '+DATA/racdb/controlfile/controlfile02.ctl' SCOPE=SPFILE sid='*';
停库再把节点1启动到nomount
srvctl stop database -d racdb
sqlplus / as sysdba
SQL> startup nomount
恢复控制文件并重新写入参数文件指定路径
rman target /
RMAN> restore controlfile from '/oracledba/rmanbackup/control_0.dbf';
RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1
RMAN> alter database open;
database opened
此时节点1数据库已经打开,再将节点2打开
srvctl start instance -d racdb -i racdb2
crsctl status res -t
查询视图验证控制文件使用的位置
set line 200
col name for a60
SELECT name FROM v$controlfile;
NAME
-----------------------------------------
+DATA/racdb/controlfile/controlfile01.ctl
+DATA/racdb/controlfile/controlfile02.ctl