热门标签 | HotTags
当前位置:  开发笔记 > 数据库 > 正文

Oracle11g在ASM磁盘组上添加控制文件

ORACLE使用ASM存储,建库时默认只有一个控制文件,如果想多加几个控制文件,需要通过手工来添加,以下是具体步骤:

ORACLE使用ASM存储,建库时默认只有一个控制文件,如果想多加几个控制文件,需要通过手工来添加,以下是具体步骤:

1. 查看现在的控制文件

[oracle@Oracle-LAB dbs]$sqlplus /nolog

SQL> conn /assystem

SQL> conn /assysdba

SQL> set line 200

SQL> column nameformat a50

SQL> select * from v$controlfile;

STATUS NAME IS_ BLOCK_SIZE FILE_SIZE_BLKS

---------- ------------------------------------------------ ---------- ----

+DATA/orcl/controlfile/current.259.833372337 NO 16384 594

2.

SQL> alter system setcontrol_files='+DATA/orcl/controlfile/current.259.833372337','+DATA','+FRA'scope=spfile sid='*';

System altered.

3.

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLEinstance shut down.

[oracle@Oracle-LAB/]$ rman target/

Recovery Manager:Release 11.2.0.3.0 - Production on Thu Dec 5 11:49:47 2013

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

connected to target database (not started)

RMAN> startup nomount

Oracle instancestarted

Total SystemGlobal Area 1653518336 bytes

Fixed Size 2228904 bytes

VariableSize 973081944 bytes

DatabaseBuffers 671088640 bytes

Redo Buffers 7118848 bytes

RMAN> restore controlfile from '+DATA/orcl/controlfile/current.259.833372337';

Starting restore at 05-DEC-13

using target database control fileinstead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=14 devicetype=DISK

channel ORA_DISK_1: copied controlfile copy

output filename=+DATA/orcl/controlfile/current.259.833372337

output filename=+DATA/orcl/controlfile/current.261.833376309

output filename=+FRA/orcl/controlfile/current.256.833376309

Finishedrestore at 05-DEC-13

4. 打开数据库

RMAN> sql ' alter database mount';

sqlstatement: 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

--------------------------------------------------------------------------------

+DATA/orcl/controlfile/current.259.833372337

+DATA/orcl/controlfile/current.261.833376309

+FRA/orcl/controlfile/current.256.833376309

6.

SQL> alter system set control_files='+DATA/orcl/controlfile/current.261.833376309','+DATA/orcl/controlfile/current.259.833372337','+FRA/orcl/controlfile/current.256.833376309' scope=spfile sid='*';

System altered.

7.

SQL> shutdown immediate

SQL> startup

SQL> select name, value fromV$PARAMETER where name like '%control%';

SQL> select * fromv$controlfile;

How to duplicate a controlfilewhen ASM is involved [ID 345180.1]

linux


推荐阅读
author-avatar
热门星座排行榜空间
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有