How To Mirror Controlfile To FRA On ASM (文档 ID 1305674.1)
2014-06-03 10:16
597 查看
In this Document
Information in this document applies to any platform.
***Checked for relevance on 16-Sep-2013***
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?
$ 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
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
相关文章推荐
- How to Recreate a Controlfile (文档 ID 735106.1)
- How To Move Controlfile To ASM
- How to manage DB Control 11.x for RAC Database with emca (文档 ID 578011.1)
- Step-By-Step Guide To Create Physical Standby On Normal File System For ASM Primary using RMAN (文档 I
- How To Verify the Word Size (32bit vs 64bit) of the Oracle Binary on MS Windows systems (文档 ID 46506
- How to Create an OCM Response file to Apply a Patch (文档 ID 966023.1)
- XPages Example: Building a Custom Control - How to build a Custom Multi-FileUpload Control that you can drop on any XPa
- How to Disable Asynch_io on HP to Avoid Ioctl Async_config Error Errno = 1 (文档 ID 302801.1)
- How To Verify the Word Size (32bit vs 64bit) of the Oracle Binary on MS Windows systems (文档 ID 46506
- How to Change ASM Home on a Node in RAC [ID 558508.1]
- How to get controlToValidate ID base on Custom Validator
- How to duplicate a controlfile when ASM is involved
- How to Resize a Datafile (文档 ID 1029252.6)
- How to collect the full path name of the files in ASM diskgroups (文档 ID 888943.1)
- How to restore ASM based OCR after complete loss of the CRS diskgroup on Linux systems[ID 1062983.1]
- How to copy a datafile from ASM to a file system not using RMAN (Doc ID 428893.1)
- How to move a datafile from a file system to ASM (Doc ID 390274.1)
- ONT-How to Create a Debug File in Shipping Execution (文档 ID 290432.1)
- How to restore ASM based OCR after complete loss of the CRS diskgroup on Linux/Unix systems [ID 1062
- How To Reclaim Wasted Space on The Segment (Table, Index and LOB) and Tablespace Levels (文档 ID 16827