oracle之 RAC 11G ASM下控制文件多路复用

简介:

如果数据库仅有一组control file文件,需要添加一组或者多组,保证一组文件损坏或者丢失导致数据库宕机。


-- 环境说明
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
CORE 11.2.0.4.0 Production
TNS for Linux: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production

SQL> show parameter cluster;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
cluster_database boolean TRUE
cluster_database_instances integer 2
cluster_interconnects string

0、记录现有控制文件路径

SQL>select name from v$controlfile;SQL> select name from v$controlfile;

NAME
--------------------------------------------------------------------------------
+DATA/devdb/controlfile/current.260.936769367
+FLASH/devdb/controlfile/current.256.936769367

1、关闭两个节点

$ srvctl stop database -d devdb

2、在其中一个节点上启动rman

[oracle@node1 ~]$ rman target /

Recovery Manager: Release 11.2.0.4.0 - Production on Tue Dec 27 16:59:10 2016

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

connected to target database (not started)

3、将数据库启动到nomount状态下

RMAN> startup nomount;

Oracle instance started

Total System Global Area 4275781632 bytes

Fixed Size 2260088 bytes
Variable Size 989856648 bytes
Database Buffers 3271557120 bytes
Redo Buffers 12107776 bytes

4、采用restore拷贝一份controlfile到新路径

RMAN> restore controlfile to '+FLASH/devdb/controlfile/current.256.936769368' from '+DATA/devdb/controlfile/current.260.936769367';

Starting restore at 27-DEC-16
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=50 instance=orcl1 device type=DISK

channel ORA_DISK_1: copied control file copy
Finished restore at 27-DEC-16

说明:’+FLASH/devdb/controlfile/current.256.936769368’是拷贝的新的控制文件,
如果asm自动管理的,可能名字不会按照你的命名,需要确定下新的文件名字。

ASMCMD> pwd
+FLASH/devdb/controlfile/
ASMCMD> ls
current.303.956019293 > 跟你指定的不一样

5. sqlplus 中 修改控制文件路径, 修改完成后,关闭数据库
SQL> alter system set control_files='+DATA/devdb/controlfile/current.260.936769367','+FLASH/devdb/controlfile/current.256.936769367','+FLASH/devdb/controlfile/current.303.956019293' scope=spfile sid='*';

SQL> shutdown immediate;
ORA-01507: database not mounted
ORACLE instance shut down.

6、启动数据库

[grid@node1 oracle]$ srvctl start database -d devdb

7、验证

SQL> select name from v$controlfile;
NAME
--------------------------------------------------------------------------------
+DATA/devdb/controlfile/current.260.936769367
+FLASH/devdb/controlfile/current.256.936769367
+FLASH/devdb/controlfile/current.303.956019293

 

文章可以转载,必须以链接形式标明出处。
分类:  oracle 11G RAC
本文转自 张冲andy 博客园博客,原文链接: http://www.cnblogs.com/andy6/p/7612360.html   ,如需转载请自行联系原作者


相关文章
|
2月前
|
Oracle 关系型数据库
oracle asm 磁盘显示offline
oracle asm 磁盘显示offline
30 2
|
2月前
|
存储 Oracle NoSQL
Oracle 表空间、数据文件、schema的关系
Oracle 表空间、数据文件、schema的关系
41 2
|
1月前
|
XML Java 数据库连接
struts+hibernate+oracle+easyui实现lazyout组件的简单案例——hibernate的config文件(hibernate.cfg.xml)
struts+hibernate+oracle+easyui实现lazyout组件的简单案例——hibernate的config文件(hibernate.cfg.xml)
11 0
|
8天前
|
运维 Oracle 安全
Oracle的三重奏:密码文件、警告文件与跟踪文件
【4月更文挑战第19天】Oracle数据库的三大守护者:密码文件保护系统免受未经授权访问,如同宝藏的“密码锁”;警告文件似“哨兵”,记录错误信息,助于及时解决问题;跟踪文件扮演“侦探”角色,详尽记录操作,便于性能优化和故障排查。这三份文件共同确保数据王国的安全与稳定。作为管理员,重视并善用它们是关键。
|
8天前
|
运维 Oracle 关系型数据库
Oracle日志文件:数据王国的“记事本”
【4月更文挑战第19天】Oracle日志文件是数据库稳定运行的关键,记录数据变更历史,用于恢复和故障处理。它们协调并发操作,确保数据一致性和完整性。日志文件实时写入操作信息并定期刷新到磁盘,便于数据恢复。然而,日志文件需备份和归档以保证安全性,防止数据丢失。日志文件,数据王国的“记事本”,默默守护数据安全。
|
1月前
|
存储 运维 Oracle
Oracle系列十八:Oracle RAC
Oracle系列十八:Oracle RAC
|
1月前
|
存储 Oracle 关系型数据库
RAC创建ASM磁盘组时配置多路径和UDEV
RAC创建ASM磁盘组时配置多路径和UDEV
100 5
|
2月前
|
Oracle 关系型数据库
oracle Hanganalyze no RAC
oracle Hanganalyze no RAC
15 0
|
2月前
|
Oracle 关系型数据库
oracle rac 手工安装补丁,不适用auto
oracle rac 手工安装补丁,不适用auto
25 3
|
2月前
|
存储 Oracle 关系型数据库
【数据库数据恢复】Oracle数据库ASM磁盘组掉线的数据恢复案例
oracle数据库ASM磁盘组掉线,ASM实例不能挂载。数据库管理员尝试修复数据库,但是没有成功。
【数据库数据恢复】Oracle数据库ASM磁盘组掉线的数据恢复案例

推荐镜像

更多