首页  >  文章  >  数据库  >  Oracle 11g在ASM磁盘组上添加控制文件

Oracle 11g在ASM磁盘组上添加控制文件

WBOY
WBOY原创
2016-06-07 17:35:05892浏览

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

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn