rac环境下面添加控制文件

[oracle@rac1~]$ rman target /

RecoveryManager: Release 11.2.0.2.0

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

connectedto target database: RAC (DBID=2514956254要记住这个 DBID 下面需要用

[oracle@rac1 ~]$ 
sqlplus / as sysdba

SQL*Plus:Release 11.2.0.2.0 Production 

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management,OLAP,
Data Mining and Real Application Testing options

SQL>select name,status from v$controlfile;

NAME
--------------------------------------------------------------------------------
STATUS
-------
+DG1/rac/controlfile/current.260.926974239


[grid@rac1 ~]$ s
rvctlstop database -d rac


[root@rac1 ~]#
 su - oracle
[oracle@rac1 ~]$ 
sqlplus / as sysdba

SQL*Plus:Release 11.2.0.2.0 Production on Thu Apr 17 21:50:23 2014

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

Connectedto an idle instance.

SQL> startup nomount;
ORACLE instance started.

TotalSystem Global Area 8351150080 bytes
FixedSize                 2243120 bytes
Variable Size           4328523216 bytes
Database Buffers         4009754624bytes
RedoBuffers              10629120 bytes

[oracle@rac1~]$ rman target /

RecoveryManager: Release 11.2.0.2.0 - Production on Thu Apr 17 21:51:05 2014

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

connectedto target database: RAC (not mounted)

RMAN> set DBID=2514956254

executingcommand: SET DBID

RMAN> restore controlfile to '+DG1' from'+DG1/rac/controlfile/current.260.926974239';

Startingrestore at 17-APR-14
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=713 instance=rac1 device type=DISK

channelORA_DISK_1: copied control file copy
Finished restore at 17-APR-14

RMAN>

SQL> alter system setcontrol_files='+DG1/rac/controlfile/current.260.926974239','+DG1/rac/controlfile/current.362.845157093'scope=spfile;

Systemaltered.

SQL> shutdown immediate

[grid@rac1 ~]$
 srvctl start database -d rac


[oracle@rac1 ~]$ 
sqlplus / as sysdba

SQL*Plus:Release 11.2.0.2.0 Production on Thu Apr 17 21:55:17 2014

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management,OLAP,
Data Mining and Real Application Testing options

SQL> select name,status fromv$controlfile;

NAME
--------------------------------------------------------------------------------
STATUS
-------
+DG1/rac/controlfile/current.260.926974239


+DG1/rac/controlfile/current.362.845157093

 


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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值