How To Move Controlfile To ASM

 

       This document provides information on how to move a controlfile from filesystem to ASM and Vise Versa  

 

Solution

 

1. Identify the location of the current controlfile:

SQL> select name from v$controlfile;

NAME
--------------------------------------------------------------------------------
/u01/control01.ctl'



2. Shutdown the database and start the instance:

SQL> shutdown normal
SQL> startup nomount



3. Use RMAN to move the controlfile to ASM :

$ rman nocatalog
RMAN>connect target
RMAN>restore controlfile to '<DISKGROUP_NAME>' from '<OLD_PATH>';
e.g.
RMAN> restore controlfile to '+DG1' from '/u01/control01.ctl';



4. On the ASM instance, identify the name of the controlfile using ASMCMD:


$asmcmd
ASMCMD> find -t CONTROLFILE +DG1 *



Find

Purpose:
Displays the absolute paths of all occurrences of the specified name (with wildcards) in a specified directory and its subdirectories.

 

Syntax and Description:
find [-t type] dir name



       This command searches the specified directory and all subdirectories below it in the directory tree for the supplied name. name can be a directory name or a filename, and can include wildcard characters. dir may also include wildcards. In the output of the command, directory names are suffixed with the slash character (/) to distinguish them from filenames.

       You use the -t flag to find all the files of a particular type (specified as type). For example, you can search for control files by specifying type as CONTROLFILE. Valid values for type are the following:


CONTROLFILE
DATAFILE
ONLINELOG
ARCHIVELOG
TEMPFILE
BACKUPSET
DATAFILE
PARAMETERFILE
DATAGUARDCONFIG
FLASHBACK
CHANGETRACKING
DUMPSET
AUTOBACKUP
XTRANSPORT

Note:
These are the values from the type column of the V$ASM_FILE view.


Changing the current directory to the diskgroup where the controlfile was created will speed the search.

Output:
ASMCMD> find -t CONTROLFILE +DG1 *
+DG1/ORCL/CONTROLFILE/current.261.639419131
ASMCMD>


Note the name assigned to the controlfile.

5. On the database Instance:


* Modify init.ora or spfile, replacing the new path to the init parameter control_files.
* if using init<SID>.ora, just modify the control_files parameter and restart the database.
* If using spfile,

1]SQL>startup nomount the database instance
2]SQL>alter system set control_files='+DG1/ORCL/CONTROLFILE/current.261.639419131' scope=spfile;
3]SQL>shutdown immediate


6. Start the instance.

Note:
In-order to have Multiple Copies/ Multiplexed Version of the controlfiles, repeat steps 3-5

 

References

http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/asm_util.htm#sthref2876

 

 

 

 

From Oracle

-------------------------------------------------------------------------------------------------------

QQ: 492913789
Email: ahdba@qq.com
Blog: http://www.cndba.cn/dave

DBA1 群:62697716();   DBA2 群:62697977()   DBA3 群:62697850()  

DBA 超级群:63306533();  DBA4 群: 83829929  DBA5群: 142216823   

聊天 群:40132017   聊天2群:69087192

--加群需要在备注说明Oracle表空间和数据文件的关系,否则拒绝申请

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值