您的位置:首页 > 其它

How To Mirror Controlfile To FRA On ASM (文档 ID 1305674.1)

2014-06-03 10:16 597 查看
In this Document

 Goal
 Solution
This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review.

Applies to:

Oracle Database - Enterprise Edition - Version 10.2.0.1 to 11.2.0.2 [Release 10.2 to 11.2]

Information in this document applies to any platform.

***Checked for relevance on 16-Sep-2013***

Goal

How can you mirror the controlfile to the FRA on ASM?   

In other words, an FRA is configured and you want to have a copy of the controlfile residing in the FRA. 

How is this accomplished?

Solution

TEST CASE

$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Wed Mar 9 10:35:01 2011

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

Connected to an idle instance.

SQL> startup nomount;

ORACLE instance started.

Total System Global Area 238530560 bytes

Fixed Size 1343380 bytes

Variable Size 155189356 bytes

Database Buffers 79691776 bytes

Redo Buffers 2306048 bytes

SQL> show parameter control_files

NAME TYPE VALUE

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

control_files string +DGROUP1/l112asm/controlfile/current.256.734880159

SQL> alter system set control_files='+DGROUP1/l112asm/controlfile/current.256.734880159', '+DGROUP2' scope=spfile;

System altered.

SQL> startup force nomount;

ORACLE instance started.

Total System Global Area 238530560 bytes

Fixed Size 1343380 bytes

Variable Size 155189356 bytes

Database Buffers 79691776 bytes

Redo Buffers 2306048 bytes

SQL> show parameter control_files

NAME TYPE VALUE

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

control_files string +DGROUP1/l112asm/controlfile/current.256.734880159, +DGROUP2

$ rman target /

Recovery Manager: Release 11.2.0.2.0 - Production on Wed Mar 9 10:36:51 2011

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

connected to target database: L112ASM (not mounted)

RMAN> restore controlfile from '+DGROUP1/l112asm/controlfile/current.256.734880159';

Starting restore at 09-MAR-11

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=25 device type=DISK

channel ORA_DISK_1: copied control file copy

output file name=+DGROUP1/l112asm/controlfile/current.256.734880159

output file name=+DGROUP2/l112asm/controlfile/current.412.745324641

Finished restore at 09-MAR-11

RMAN> exit

SQL> alter system set control_files='+DGROUP1/l112asm/controlfile/current.256.734880159', '+DGROUP2/l112asm/controlfile/current.412.745324641' scope=spfile;

System altered.

SQL> startup force nomount;

ORACLE instance started.

Total System Global Area 238530560 bytes

Fixed Size 1343380 bytes

Variable Size 155189356 bytes

Database Buffers 79691776 bytes

Redo Buffers 2306048 bytes

SQL> show parameter control_files

NAME TYPE VALUE

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

control_files string +DGROUP1/l112asm/controlfile/current.256.734880159, +DGROUP2/l112asm/controlfile/current.412.745324641

SQL> alter database mount;

Database altered.

SQL> desc v$controlfile;

Name Null? Type

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

STATUS VARCHAR2(7)

NAME VARCHAR2(513)

IS_RECOVERY_DEST_FILE VARCHAR2(3)

BLOCK_SIZE NUMBER

FILE_SIZE_BLKS NUMBER

SQL> select name, is_recovery_dest_file from v$controlfile;

NAME                                                  IS_

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

+DGROUP1/l112asm/controlfile/current.256.734880159    NO

+DGROUP2/l112asm/controlfile/current.412.745324641    YES

As demonstrated in above testcase, in general you would:

1. Add the FRA disk group to the control_files parameter in spfile

2. Shutdown and startup nomount the database

3. In rman, issue a restore using the existing controlfile name.

     RMAN> restore controlfile from '+DGROUP1/l112asm/controlfile/current.256.734880159';

4. Add the second controlfile name (created by #3) to control_files parameter in spfile.

5. Shutdown and startup the database

 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐