This document provides information on how to move a controlfile from filesystem to ASM and Vise Versa
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-tCONTROLFILE+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
http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/asm_util.htm#sthref2876
From Oracle
-------------------------------------------------------------------------------------------------------
Blog: http://blog.csdn.net/tianlesoftware
Email: [email protected]
DBA1 群:62697716(满); DBA2 群:62697977(满) DBA3 群:62697850(满)
DBA 超级群:63306533(满); DBA4 群: 83829929 DBA5群: 142216823
聊天 群:40132017 聊天2群:69087192
--加群需要在备注说明Oracle表空间和数据文件的关系,否则拒绝申请