Oracle 11g rac 安装后在asm上增加control file文件副本
发表于:2026-11-02 作者:千家信息网编辑
千家信息网最后更新 2026年11月02日,Oracle 11g rac在建库的时候使用了ASM存储,然而rac在建库时默认只在asm上面创建了一个控制文件,如果想多加几个控制文件,就需要通过手工来添加了,很多人可能会忽略这个细节,但是我们还是
千家信息网最后更新 2026年11月02日Oracle 11g rac 安装后在asm上增加control file文件副本Oracle 11g rac在建库的时候使用了ASM存储,然而rac在建库时默认只在asm上面创建了一个控制文件,如果想多加几个控制文件,
就需要通过手工来添加了,很多人可能会忽略这个细节,但是我们还是希望多建几个control file来增加数据库的稳定性。
下面是具体步骤:
1、在操作前要保留一份控制文件和参数文件,以备搞不成恢复用。
注:只在一个数据库实例上进行修改。
SQL> create pfile='/home/oracle/pfile0531.ora' from spfile;
File created.
SQL> alter database backup controlfile to '/home/oracle/cntrl_20180531.ctl';
Database altered.
SQL> col name for a50
SQL> select * from gv$controlfile;
INST_ID STATUS NAME IS_ BLOCK_SIZE FILE_SIZE_BLKS
---------- ------- -------------------------------------------------- --- ---------- --------------
2 +DATA/crmdb/controlfile/current.282.873504505 NO 16384 1152
1 +DATA/crmdb/controlfile/current.282.873504505 NO 16384 1152
2、修改spfile中的控制文件参数
SQL> alter system set control_files='+DATA/crmdb/controlfile/current.256.977420629','+DATA','+DATA' scope=spfile sid='*';
System altered.
3、关闭数据库实例
crmdb1:/home/oracle@db> srvctl stop database -d crmdb
4、创建control file 副本
crmdb1:/home/oracle@db> rman target/
Recovery Manager: Release 11.2.0.4.0 - Production on 星期五 2月 6 15:50:12 2015
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database (not started)
RMAN> startup nomount
Oracle instance started
Total System Global Area 68412682240 bytes
Fixed Size 2263488 bytes
Variable Size 31675385408 bytes
Database Buffers 36507222016 bytes
Redo Buffers 227811328 bytes
RMAN> restore controlfile from '+DATA/crmdb/controlfile/current.256.977420629';
Starting restore at 06-2月 -15
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=4086 instance=crmdb device type=DISK
channel ORA_DISK_1: copied control file copy
output file name=+DATA/crmdb/controlfile/current.256.870194351
output file name=+DATA/crmdb/controlfile/current.426.870969063
output file name=+DATA/crmdb/controlfile/current.427.870969063
Finished restore at 06-2月 -15
RMAN> sql ' alter database mount';
sql statement: alter database mount
released channel: ORA_DISK_1
RMAN> sql ' alter database open';
sql statement: alter database open
5、登录数据库验证
SQL> select name from gv$controlfile;
NAME
--------------------------------------------------------------------------------
+DATA/crmdb/controlfile/current.256.977420629
+DATA/crmdb/controlfile/current.276.977568423
+DATA/crmdb/controlfile/current.277.977568423
6、修改spfile中的新添加的控制文件参数
SQL> alter system set control_files='+DATA/crmdb/controlfile/current.256.977420629','+DATA/crmdb/controlfile/current.276.977568423','+DATA/crmdb/controlfile/current.277.977568423' scope=spfile sid='*';
System altered.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
7、打开数据库最终验证
crmdb1:/home/oracle@db> srvctl start database -d crmdb
SQL> select * from gv$controlfile;
INST_ID STATUS NAME IS_ BLOCK_SIZE FILE_SIZE_BLKS
---------- ------- -------------------------------------------------- --- ---------- --------------
1 +DATA/crmdb/controlfile/current.256.977420629 NO 16384 1512
1 +DATA/crmdb/controlfile/current.276.977568423 NO 16384 1512
1 +DATA/crmdb/controlfile/current.277.977568423 NO 16384 1512
2 +DATA/crmdb/controlfile/current.256.977420629 NO 16384 1512
2 +DATA/crmdb/controlfile/current.276.977568423 NO 16384 1512
2 +DATA/crmdb/controlfile/current.277.977568423 NO 16384 1512
6 rows selected.
就需要通过手工来添加了,很多人可能会忽略这个细节,但是我们还是希望多建几个control file来增加数据库的稳定性。
下面是具体步骤:
1、在操作前要保留一份控制文件和参数文件,以备搞不成恢复用。
注:只在一个数据库实例上进行修改。
SQL> create pfile='/home/oracle/pfile0531.ora' from spfile;
File created.
SQL> alter database backup controlfile to '/home/oracle/cntrl_20180531.ctl';
Database altered.
SQL> col name for a50
SQL> select * from gv$controlfile;
INST_ID STATUS NAME IS_ BLOCK_SIZE FILE_SIZE_BLKS
---------- ------- -------------------------------------------------- --- ---------- --------------
2 +DATA/crmdb/controlfile/current.282.873504505 NO 16384 1152
1 +DATA/crmdb/controlfile/current.282.873504505 NO 16384 1152
2、修改spfile中的控制文件参数
SQL> alter system set control_files='+DATA/crmdb/controlfile/current.256.977420629','+DATA','+DATA' scope=spfile sid='*';
System altered.
3、关闭数据库实例
crmdb1:/home/oracle@db> srvctl stop database -d crmdb
4、创建control file 副本
crmdb1:/home/oracle@db> rman target/
Recovery Manager: Release 11.2.0.4.0 - Production on 星期五 2月 6 15:50:12 2015
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database (not started)
RMAN> startup nomount
Oracle instance started
Total System Global Area 68412682240 bytes
Fixed Size 2263488 bytes
Variable Size 31675385408 bytes
Database Buffers 36507222016 bytes
Redo Buffers 227811328 bytes
RMAN> restore controlfile from '+DATA/crmdb/controlfile/current.256.977420629';
Starting restore at 06-2月 -15
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=4086 instance=crmdb device type=DISK
channel ORA_DISK_1: copied control file copy
output file name=+DATA/crmdb/controlfile/current.256.870194351
output file name=+DATA/crmdb/controlfile/current.426.870969063
output file name=+DATA/crmdb/controlfile/current.427.870969063
Finished restore at 06-2月 -15
RMAN> sql ' alter database mount';
sql statement: alter database mount
released channel: ORA_DISK_1
RMAN> sql ' alter database open';
sql statement: alter database open
5、登录数据库验证
SQL> select name from gv$controlfile;
NAME
--------------------------------------------------------------------------------
+DATA/crmdb/controlfile/current.256.977420629
+DATA/crmdb/controlfile/current.276.977568423
+DATA/crmdb/controlfile/current.277.977568423
6、修改spfile中的新添加的控制文件参数
SQL> alter system set control_files='+DATA/crmdb/controlfile/current.256.977420629','+DATA/crmdb/controlfile/current.276.977568423','+DATA/crmdb/controlfile/current.277.977568423' scope=spfile sid='*';
System altered.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
7、打开数据库最终验证
crmdb1:/home/oracle@db> srvctl start database -d crmdb
SQL> select * from gv$controlfile;
INST_ID STATUS NAME IS_ BLOCK_SIZE FILE_SIZE_BLKS
---------- ------- -------------------------------------------------- --- ---------- --------------
1 +DATA/crmdb/controlfile/current.256.977420629 NO 16384 1512
1 +DATA/crmdb/controlfile/current.276.977568423 NO 16384 1512
1 +DATA/crmdb/controlfile/current.277.977568423 NO 16384 1512
2 +DATA/crmdb/controlfile/current.256.977420629 NO 16384 1512
2 +DATA/crmdb/controlfile/current.276.977568423 NO 16384 1512
2 +DATA/crmdb/controlfile/current.277.977568423 NO 16384 1512
6 rows selected.
文件
数据
数据库
控制
参数
实例
验证
副本
手工
时候
星期
步骤
稳定性
细节
还是
存储
登录
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
互联网金融监管科技数据
互联网科技会
互联网科技金融公司
互联网女皇 腾讯科技
互联网金融 科技创新
科技互联网创业计划书
华中科技有哪些互联网大佬
深圳市运趣互联网科技有限公司
互联网科技公司需要的职位
隆华科技工业互联网
全球顶尖互联网科技公司
互联网科技和信息
翼展科技 首家互联网医院
特约风豹互联网科技为什么扣费
群盈汇互联网科技有限公司
区块链结合互联网科技
图游互联网科技
优雇互联网科技有限公司
恒生互联网科技趋势
互联网高科技绘画
中国互联网科技工作委员会毛军
互联网和科技技术
科技互联网龙头
赫美联合互联网科技
天扬科技互联网广告
互联网巨头投资的硬核科技
呼和浩特新华互联网科技学院
东莞新华互联网科技学校
2021互联网科技公司排名
长沙渺峰互联网科技有限公司