您的位置:首页 > 其它

rac环境下面添加控制文件

2016-11-14 17:53 323 查看
[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 ~]$ srvctlstop 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

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