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-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: dvd.dba@gmail.com
DBA1 群:62697716(满); DBA2 群:62697977(满) DBA3 群:62697850(满)
DBA 超级群:63306533(满); DBA4 群: 83829929 DBA5群: 142216823
聊天 群:40132017 聊天2群:69087192
--加群需要在备注说明Oracle表空间和数据文件的关系,否则拒绝申请
分享到:
相关推荐
When to use online, offline, controlfile, and archivelog backups Troubleshooting methodology and how to use Oracle database logs and other diagnostic utilities Different ways to manage your database ...
Alter database backup controlfile to ‘c:\control.bkp’; (2)以脚本文件形式备份控制文件 Alter database backup controlfile to trace; (3)查看脚本文件的存放位置 Show parameter user_dump_dest; (4)...
Connected to an idle instance. SQL> startup^C SQL> startup ORACLE instance started. 2、在双机环境下 要想启动或关闭ORACLE系统必须首先切换到root用户,如下 su - root a、启动ORACLE系统 hareg -y ...
share the file,hope can help the people who need it.
这两天一直在试着安装 cadence v16.0 。可是按现在网上说 试过了,怎么还是装不好啊?最后找到了一个新的 crack 。
ASM instance +ASM1 is running on node linux1. 列出配置的所有数据库 $ srvctl config database orcl 显示 RAC 数据库的配置 $ srvctl config database -d orcl linux1 orcl1 /u01/app/oracle/product/...
oracle归档日志步骤+RMAN步骤 . set ORACLE_SID=EKP sqlplus /nolog conn / as sysdba SQL> archive log list;...alter system set db_recovery...configure retention policy to redundancy 4; 备份策略,4个版本
2. 有 datafile、archivelog、controlfile、spfile 的有效备份和全备后的Archivelog,不完全恢复整个数据库。 3. Controlfile 中包括所有的backupset 信息(RMAN 信息),参考下文的备份脚本。 4. 在 controlfile 的...
ALTER DATABASE BACKUP CONTROLFILE TO ‘D:\ORACLE\CONTROL.BKP’; (7) ALTER DATABASE ADD LOGFILE GROUP 4 (‘D:\ORACLE\ORADATA\ORCL\redo04a.log’,’D:\ORACLE\ORADATA\ORCL\redo04b.log’)SIZE 5M; (8)...
(3) restore controlfile from $BACKUP_CONTROLFILE_PATH; 如果开启CONFIGURE CONTROLFILE AUTOBACKUP ON;就可以 restore controlfile from autobackup; (4) alter database mount; (5) recover database; ...
Ora我们都都知道在controlfile中记录着每一个archivelog的相关信息,当然们在OS下把这些物理文件delete掉后,在我们的 controlfile中仍然记录着这些archivelog的信息,在oracle的OEM管理器中有可视化的日志展现出,...
与recover database using backup controlfile until cancel效果一样Oracle会以当前controlfile
select name from v$controlfile; 5、查看日志文件 select member from v$logfile; 6、查看表空间的使用情况 select * from( select sum(bytes)/(1024*1024) as \"free_space(M)\",tablespace_name ...
使用数据字典v$controlfile,查看当前数据库的控制文件的名称与路 径,具体如下: SQL> COLUMN name FORMAT A50; SQL> SELECT name FROM v$controlfile; 通过SHOW PARAMETER语句可以查看块的默认大小信息 SQL> SHOW...
在独占的系统用户下,备份控制文件: SQL>alter database backup controlfile to trace; 4. 在独占的系统用户下,手工切换重作日志文件,确保当前已修改过的数据存入文件: SQL>alter system switch logfile; 5. 在...
select * from v$controlfile --列出所有参数的位置及状态信息 select * from v$parameter --列出控制文件中记录的部分信息 select * from v$controlfile_record_section -----------------------------------...
发现问题 我使用的Oracle11g,当我敲下如下一段命令后,就让我傻眼了。。 alter system set sga_max_size=960M ...ORA-00851: SGA_MAX_SIZE 985661440 cannot be set to more than MEMORY_TARGET 784334848. 原因分析
(2)控制文件通过脚本: backup_daily.sh中的 alter database backup controlfile to ' /oraarch/HZ1MOD/archs/backup/ctrl'; alter database backup controlfile to trace; 生成ctrlHZ1MOD.sql和ctrlHZ1MOD.ctl...
RMAN恢复实践:详细脚本,包括controlfile,全库等等
Connected to an idle instance. SQL> startup^C SQL> startup ORACLE instance started. 2、在双机环境下 要想启动或关闭ORACLE系统必须首先切换到root用户,如下 su - root a、启动ORACLE系统 hareg -y ...