如何将控制文件迁移到ASM


搭建ADG后,控制文件没有放到ASM(/u01/app/oracle/product/11.2.0/db_1/dbs/s.ctl),现在要将控制文件迁移到ASM


1)修改spfile 文件中 控制文件的位置

SQL>  alter system set control_files='+DATA/kdedidg/datafile/control01.ctl' scope=spfile;

System altered.

SQL> shutdown immediate
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> startup nomount
ORACLE instance started.

Total System Global Area 4.2758E+10 bytes
Fixed Size                  2262656 bytes
Variable Size            8053066112 bytes
Database Buffers         3.4628E+10 bytes
Redo Buffers               74420224 bytes

2) 在 rman 下 将控制文件restore 到ASM 下,

[oracle@qs-fbfjdbadg1 ~]$ rman target /

Recovery Manager: Release 11.2.0.4.0 - Production on Tue Nov 17 17:09:06 2015

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: KDEDI (not mounted)

RMAN> restore controlfile to '+DATA/kdedidg/datafile/control01.ctl' from '/u01/app/oracle/product/11.2.0/db_1/dbs/s.ctl';

Starting restore at 2015-11-17 17:09:17
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=139 device type=DISK

channel ORA_DISK_1: copied control file copy
Finished restore at 2015-11-17 17:09:18

RMAN> alter database mount;

database mounted
released channel: ORA_DISK_1


阅读更多
个人分类: rman备份与恢复
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭