ORACLE 数据库 ASM磁盘组上添加控制文件

ORACLE使用ASM存储,建库时默认只有一个控制文件,如果想多加几个控制文件,需要通过手工来添加,以下是我测试文档,贴出来分享下。


1.查看当前数据库的控制文件
SQL> select name from v$controlfile;

NAME
------------------------------------------------
+DATA01/orcl/controlfile/current.274.743672963

2.修改spfile中的控制文件参数
SQL> alter system set control_files='+DATA01/orcl/controlfile/current.274.743672963','+DATA01','+DATA01' scope=spfile sid='*';

System altered.

3.将数据库实例启动到nomount状态
SQL> shutdown immediate

[oracle@node1 ~]$ rman target /

Recovery Manager: Release 10.2.0.1.0 - Production on Wed Jul 20 11:27:44 2011

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

connected to target database (not started)

RMAN> startup nomount

Oracle instance started

Total System Global Area     167772160 bytes

Fixed Size                     1218316 bytes
Variable Size                 88082676 bytes
Database Buffers              75497472 bytes
Redo Buffers                   2973696 bytes

RMAN> restore controlfile from '+DATA01/orcl/controlfile/current.274.743672963';

Starting restore at 20-JUL-11
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=147 instance=orcl1 devtype=DISK

channel ORA_DISK_1: copied control file copy
output filename=+DATA01/orcl/controlfile/current.274.743672963
output filename=+DATA01/orcl/controlfile/backup.285.756991697
output filename=+DATA01/orcl/controlfile/backup.286.756991699
Finished restore at 20-JUL-11


4.打开数据库
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 v$controlfile;

NAME
--------------------------------------------------------------------------------
+DATA01/orcl/controlfile/current.274.743672963
+DATA01/orcl/controlfile/backup.285.756991697
+DATA01/orcl/controlfile/backup.286.756991699;

6.修改spfile中的新添加的控制文件参数
SQL> alter system set

control_files='+DATA01/orcl/controlfile/current.274.743672963','+DATA01/orcl/controlfile/backup.285.756991697','+DATA01/orcl/controlfile/backup.286.756991699'   

scope=spfile sid='*';
System altered.

7.使用新的spfile启动数据库

SQL> shutdown immediate

SQL> startup

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26478664/viewspace-712013/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/26478664/viewspace-712013/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值