ASM中怎样冗余控制文件

1.查看当前系统的控制文件信息

[oracle@rac02 dbs]$ exit
exit

SQL> show parameter control_files

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
control_files                        string      +DISKGRP1/orac/controlfile/bac
                                                 kup.257.719218371

Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options

2.用RAMN复制控制文件到新的地方
[oracle@rac02 dbs]$ rman target /

Recovery Manager: Release 10.2.0.1.0 - Production on Sun Jul 4 05:00:02 2010

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

connected to target database: ORAC (DBID=986088201, not open)


RMAN> shutdown immediate;

database dismounted
Oracle instance shut down

RMAN> startup nomount;

connected to target database (not started)
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 to '+FLS' from '+DISKGRP1/orac/controlfile/backup.257.719218371';

Starting restore at 04-JUL-10
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=150 instance=ORAC2 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=149 instance=ORAC2 devtype=DISK

channel ORA_DISK_2: skipped, autobackup already found
channel ORA_DISK_1: copied control file copy
Finished restore at 04-JUL-10

RMAN> RMAN> exit

Recovery Manager complete.

3.查找新控制文件的位置
[oracle@rac02 dbs]$ export ORACLE_SID=+ASM2
[oracle@rac02 dbs]$ asmcmd
ASMCMD> find -t controlfile . *
+DISKGRP1/orac/CONTROLFILE/backup.257.719218371
+FLS/ORAC/CONTROLFILE/backup.273.723445753
ASMCMD> exit

4.修改控制文件参数
[oracle@rac02 dbs]$ export ORACLE_SID=ORAC2
[oracle@rac02 dbs]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Sun Jul 4 05:13:58 2010

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


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
SQL> show parameter control_files;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
control_files                        string      +DISKGRP1/orac/controlfile/bac
                                                 kup.257.719218371
SQL> alter system set control_files='+DISKGRP1/orac/controlfile/backup.257.719218371',
'+FLS/ORAC/CONTROLFILE/backup.273.723445753' scope=spfile;

System altered.

SQL> shutdown immediate;
ORA-01507: database not mounted


ORACLE instance shut down.

5.从新启动数据库
SQL> startup;
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
Database mounted.
Database opened.
SQL>  select * from v$controlfile;
/
STATUS  NAME
------- ------------------------------------------------------------------------
        +DISKGRP1/orac/controlfile/backup.257.719218371
        +FLS/orac/controlfile/backup.273.723445753

SQL>  show parameter control_files;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
control_files                        string      +DISKGRP1/orac/controlfile/bac
                                                 kup.257.719218371, +FLS/orac/c
                                                 ontrolfile/backup.273.72344575
                                                 3

 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值