重庆思庄Oracle、Redhat认证学习论坛

标题: Oracle asm磁盘迁移控制文件 [打印本页]

作者: mahan    时间: 2024-7-14 13:01
标题: Oracle asm磁盘迁移控制文件
在做测试前先对数据库做足备份

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

最后删除原FRA盘控制文件和DATA盘旧控制文件控制文件








欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2