- 浏览: 1020185 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (529)
- 服务器 (8)
- jsp (1)
- java (6)
- AIX (1)
- solaris (3)
- linux学习 (53)
- javaScript (2)
- hibernate (1)
- 数据库 (74)
- sql语句 (8)
- oracle 学习 (75)
- oracle 案例 (42)
- oracle 管理 (42)
- Oracle RAC (27)
- oracle data guard (12)
- oracle 参数讲解 (14)
- Oracle 字符集 (8)
- oracle性能调优 (24)
- oracle备份与恢复 (12)
- oracle Tablespace (9)
- oracle性能诊断艺术 (1)
- oracle 11g学习 (5)
- oracle streams (1)
- oracle upgrade and downgrade (4)
- db2学习 (13)
- db2命令学习 (2)
- mysql (28)
- sql server (30)
- sql server 2008 (0)
- 工具 (10)
- 操作系统 (3)
- c++ (1)
- stock (1)
- 生活 (5)
- HADOOP (2)
最新评论
-
massjcy:
...
如何将ubuntu文件夹中文名改为英文 -
skypiea:
谢谢。。。
终于解决了。。。
Oracle 10.2.0.4(5)EM不能启动的解决方案(Patch 8350262) -
qwe_rt:
引用vi /etc/sysconfig/network 请问 ...
Linux操作系统下配置静态IP上网 -
liuqiang:
sudo killall -9 apache2
ps 和 kill 命令详解 -
dazuiba:
引用*绝杀 kill -9 PID 当使用此命令时,一定要通过 ...
ps 和 kill 命令详解
How to duplicate a controlfile when ASM is involved [ID 345180.1]
- 博客分类:
- oracle 学习
Applies to:
Oracle Server - Enterprise Edition - Version: 10.1.0.2 to 11.1.0.7
Information in this document applies to any platform.
Checked for relevance on 04-May-2009
This document presents different options to duplicate a controlfile in environments using ASM. The procedure applies either to duplicate a controlfile into ASM using a controlfile stored in file system or to duplicate a controlfile into ASM using a controlfile already stored in ASM.
Duplicating a controlfile into ASM when original controlfile is stored on a file system
On the database instance:
1. Identify the location of the current controlfile:
SQL> select name from v$controlfile;
NAME
--------------------------------------------------------------------------------
/oradata2/102b/oradata/P10R2/control01.ctl'
2. Shutdown the database and start the instance:
SQL> shutdown normal
SQL> startup nomount
3. Use RMAN to duplicate the controlfile:
$ rman nocatalog
RMAN>connect target
RMAN>restore controlfile to '<DISKGROUP_NAME>' from '<OLD_PATH>';
RMAN> restore controlfile to '+DG1' from '/oradata2/102b/oradata/P10R2/control01.ctl';
Starting restore at 23-DEC-05
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
channel ORA_DISK_1: copied control file copy
Finished restore at 23-DEC-05
We are only specifying the name of the diskgroup, so Oracle will create an OMF (Oracle Managed File). Use ASMCMD or sqlplus to identify the name assigned to the controlfile
4. On the ASM instance, identify the name of the controlfile:
Using ASMCMD:
$ asmcmd
ASMCMD> cd <DISKGROUP_NAME>
ASMCMD> find -t controlfile . *
Changing the current directory to the diskgroup where the controlfile was created will speed the search.
Output:
ASMCMD> find -t controlfile . *
+DG1/P10R2/CONTROLFILE/backup.308.577785757
ASMCMD>
Note the name assigned to the controlfile. Although the name starts with the backup word, that does not indicate is a backup of the file. This just the name assigned for the identical copy of the current controlfile.
5. On the database side:
- Modify init.ora or spfile, adding the new path to parameter control_files.
· if using init<SID>.ora, just modify the control_files parameter and restart the database.
· If using spfile,
1) startup nomount the database instance
2) alter system set control_files='+DG1/P10R2/CONTROLFILE/backup.308.577785757','/oradata2/102b/oradata/P10R2/control01.ctl' scope=spfile;
For RAC instance:
alter system set control_files='+DG1/P10R2/CONTROLFILE/backup.308.577785757','/oradata2/102b/oradata/P10R2/control01.ctl' scope=spfile sid='*';
3) shutdown immediate
· start the instance.
Verify that new control file has been recognized. If the new controlfile was not used, the complete procedure needs to be repeated.
Duplicating a controlfile into ASM using a specific name
It is also possible to duplicate the controlfile using a specific name for the new controlfile. In the following example, the controlfile is duplicated into a new diskgroup where controlfiles have not been created before.
On the ASM instance:
A. Create the directory to store the new controlfile.
SQL> alter diskgroup <DISKGROUP_NAME> add directory '+<DG_NAME>/<DB_NAME>/CONTROLFILE';
Note that ASM uses directories to store the files and those are created automatically when using OMF files. (just specifying the diskgroup name). Asumming that other OMF files were created on the diskgroup, the first directory (DB_NAME) already exist, so it is only required to create the directory for the controlfile.
SQL> alter diskgroup DG1 add directory '+DG1/P10R2/CONTROLFILE';
ASMCMD can also be used
ASMCMD>cd dg1
ASMCMD>mkdir controlfile
On the database instance:
B. Edit init.ora or spifile and modify parameter control_file:
control_files='+DG1/P10R2/CONTROLFILE/control02.ctl','/oradata2/102b/oradata/P10R2/control01.ctl'
C. Identify the location of the current controlfile:
SQL> select name from v$controfile;
NAME
--------------------------------------------------------------------------------
/oradata2/102b/oradata/P10R2/control01.ctl'
D. Shutdown the database and start the instance:
SQL> shutdown normal
SQL> startup nomount
E. Use RMAN to duplicate the controlfile:
$ rman nocatalog
RMAN>connect target
RMAN>restore controlfile to '<FULL PATH>' from '<OLD_PATH>';
RMAN> restore controlfile to '+DG1/PROD/controlfile/control02.ctl' from '/oradata2/102b/oradata/P10R2/control01.ctl';
Starting restore at 23-DEC-05
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
channel ORA_DISK_1: copied control file copy
Finished restore at 23-DEC-05
F. Start the database:
SQL> alter database mount;
SQL> alter database open;
Now, using ASMCMD to search for information for the controlfiles, the find -t contrlfile command will return two records. That does not indicate there were created two controlfiles. The name specified is an alias name and is only an entry in the ASM metadata (V$ASM_ALIAS). Oracle will create the alias and the OMF entry when user specifies the file name.
Duplicating a controlfile into ASM when original controlfile is stored on ASM
If using spfile to start the instance:
1. Modify the spfile specifically the parameter control_files. In this example, a second controlfile
is going to be created on same diskgroup DATA1.
sql> alter system set control_files='+DATA1/v102/controlfile/current.261.637923577','+DATA1'
scope=spfile sid='*';
2. Start the instance in NOMOUNT mode.
3. From rman, duplicate the controlfile
$ rman nocatalog
RMAN>connect target
RMAN> restore controlfile from '+DATA1/v102/controlfile/current.261.637923577';
The output for the execution is like:
Starting restore at 08-NOV-07
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=147 instance=V1021 devtype=DISK
channel ORA_DISK_1: copied control file copy
output filename=+DATA1/v102/controlfile/current.261.637923577
output filename=+DATA1/v102/controlfile/current.269.638120375
Finished restore at 08-NOV-07
Note that the command prints the name of the new created file: +DATA1/v102/controlfile/current.269.638120375
4. Mount and Open the database
RMAN> sql 'alter database mount';
RMAN> sql 'alter database open;
5. Validate both controlfiles are present
SQL> select name from v$controlfile;
NAME
--------------------------------------------------------------------------------
+DATA1/v102/controlfile/current.261.637923577
+DATA1/v102/controlfile/current.269.638120375
6. Modify the control_file parameter with the complete path of the new file:
sql> alter system set control_files='+DATA1/v102/controlfile/current.261.637923577','+DATA1/v102/controlfile/current.269.638120375'
scope=spfile sid='*';
Next time instance are restarted, will pick both files.
When using init.ora file:
1) Edit init.ora and add new disk group name or same disk group name for mirroring controlfiles.
Example:
control_files=('+GROUP1','+GROUP2')
(2) Start the instance in NOMOUNT mode.
(3) Execute restore command, to duplicate the controlfile using the original location. Presuming, your current controlfile location DISK path is '+data/V10G/controlfile/Current.260.605208993' , execute:
RMAN> restore controlfile from '+data/V10G/controlfile/Current.260.605208993';
Starting restore at 29-APR-05
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=317 devtype=DISK
channel ORA_DISK_1: copied controlfile copy
output filename=+GROUP2/v10g/controlfile/backup.268.7
output filename=+GROUP2/v10g/controlfile/backup.260.5
Finished restore at 29-APR-05
(4) Mount and open the database:
RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1
RMAN> alter database open;
database opened
RMAN> exit
(5) Verify new mirrored controlfiles via sqlplus
SQL> show parameter control_files
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_files string +GROUP2/v10g/controlfile/backup.268.7, +GROUP2/v10g/controlfile/backup.260.5
发表评论
-
sqlldr总结参数介绍
2012-06-28 14:29 22819有效的关键字: userid -- ORACLE use ... -
11gR2新特性:STANDBY_MAX_DATA_DELAY
2011-12-27 11:18 1210Active Data Guard 是 Oracle 11g ... -
Linux下用OCCI或OCI连接Oracle
2011-07-26 12:00 2899首先,去oracle官网下载C ... -
Oracle Mutex实现机制
2011-05-18 23:43 1064我们都知道Latch是Oracle ... -
local_listener参数作用
2011-05-10 17:19 1924pmon只会动态注册port等于1521的监听,否则 ... -
oracle伪列 rowid和rownum
2011-03-23 10:00 3532整理ROWID一 一,什么是伪列RowID?1,首先是一种数 ... -
Oracle10gR2 主备自动切换之客户端Failover配置
2011-01-20 10:32 9501. 主库检查和设置假设新增的服务名为ORCL_TAF.LK. ... -
Oracle10g配置Dataguard的相关参数解释
2011-01-20 10:24 1265参考自 http://space.itpub.ne ... -
wrap加密oracle包
2011-01-19 11:52 1297大家都知道oracle的很多系统包是没法看它的源码的,orac ... -
利用hcheck检查数据字典一致性状态
2011-01-17 17:42 1813利用hcheck可以检查oracle数据字典的一致性状态,主要 ... -
插入相同的数据量普通表和临时表产生的redo对比
2011-01-17 16:08 985往临时表里插入相同量 ... -
Database Link与GLOBAL_NAMES参数
2011-01-12 13:36 1028当GLOBAL_NAMES参数设置为TRUE时,使用DATAB ... -
Oracle Streams学习二(清除流配置)
2011-01-09 23:34 1179在完成streams部署之后,如果需要重新配置或舍弃配置,可以 ... -
red hat enterprise 下完全删除oracle 数据库
2011-01-05 01:28 1756步骤 1 以oracle用户登录主、备节点。步骤 2 ... -
Oracle常用dump命令
2010-12-20 00:31 831Oracle常用dump命令,记录一下备查。 一.M ... -
oracle执行DML(事物过程)的深入研究(二)
2010-12-14 15:02 1536接上一节的 oracle执行DML(事物过程)的深入研究(一) ... -
oracle执行DML(事物过程)的深入研究(一)
2010-12-14 10:26 2803用户所执行 DML (即执行事务)操作在 Oracle 内部按 ... -
Oracle基本数据类型存储格式研究(二)—数字类型
2010-12-14 00:35 1471数字类型包含number,intege ... -
Oracle基本数据类型存储格式研究(一)—字符类型
2010-12-13 23:32 11701.char char是定长字符型,内部代码是:96,最多可 ... -
关于oracle rowid的一些内容 -- 转载
2010-12-13 15:47 779本文讨论的是关于oracle ...
相关推荐
[1] This paper will provide such a project model and is donated to the FreeBSD Documentation project where it can evolve together with the project so that it can at any point in time reflect the way ...
1 Welcome to WordPress 1.1.1 Welcome ........................................................................9 1.1.2 Why WordPress is Amazing .............................................................
Principles and Motivation of LTE............................................1 1.1 Mobile Radio: Comparison between 3G and 4G..................2 1.1.1 Performance and Mobility Management related Issues...
Finding patterns in massive event streams can be difficult, but learning how to find them doesn’t have to be. This unique hands-on guide shows you how to solve this and many other problems in large-...
CHAPTER 1 Introduction to MySQL . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2 Database, ...
1. **全面扫描**:Duplicate Cleaner能够对指定的磁盘或文件夹进行深度扫描,查找其中的所有重复文件。无论是图片、文档、音乐、视频还是其他类型的文件,它都能精准定位。 2. **智能匹配**:软件采用了先进的文件...
《Duplicate Cleaner Pro 3.2.5:硬盘文件查重利器》 在信息化时代,我们的电脑硬盘中存储了大量的文件,随着时间的推移,重复的文件往往会占用大量的存储空间,这不仅影响了硬盘的效率,也使得查找特定文件变得...
“Duplicate_Polygon_ID_Tool.zip_tool”是一个压缩包文件,包含了两个关键组件:UpdatePolyID.py和Duplicate Polygon ID Tool.tbx。前者是Python脚本,它是工具的主要执行逻辑,后者是ArcGIS的工具箱文件,使得该...
Principles and Motivation of LTE............................................1 1.1 Mobile Radio: Comparison between 3G and 4G..................2 1.1.1 Performance and Mobility Management related Issues...
Duplicate Edge ID(解决方案).md
Duplicate Node ID(解决方案).md
本例中,两个服务器上的确切路径均为`C:\oracle\product\10.2.0\db_1\database`。 第一步是制作原始`initproddb.ora`文件的备份副本,因为这个过程会覆盖原始文件,之后可以再恢复。原始初始化文件包含了生产数据库...
javax.ejb.DuplicateKeyException.class javax.ejb.EJB.class javax.ejb.EJBAccessException.class javax.ejb.EJBContext.class javax.ejb.EJBException.class javax.ejb.EJBHome.class javax.ejb.EJBLocalHome....
is because to do so leads to a 10 - 20% drop in sequential I/O performance, as a disk head seek is needed to seek to the initial file data and another disk seek is need to seek to the fragment block. ...
Duplicate Cleaner Pro 5.19.0.0_中文直装版文件查重神器
Duplicate Cleaner Pro 是一款专业的重复文件查找清理工具。它支持多种搜索模式,可根据文件内容、文件名、文件大小、日期等条件快速查找出重复的图片、音乐、视频或者其他类型的文件,轻松清理重复文件,让硬盘空间...
This is a convenient feature when you're manually comparing files, when you want to copy/paste between multiple files, or when you simply want to divide up your edit space. Tabbed Child Windows ...