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
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
相关文章推荐
- 问题5:RAC + ASM环境下,多路复用控制文件
- ORACLE 11gR2 RAC添加控制文件
- RAC环境下控制文件损坏重建过程
- rac 中添加控制文件冗余
- 管道符和作业控制、shell变量、环境变量配置文件、添加操作记录审计
- Oracle 添加冗余控制文件 for RAC On Linux
- RAC和ASM环境下修改控制文件control file11
- RAC和ASM环境下修改控制文件control file
- RAC环境中的快照控制文件
- RAC和ASM环境下修改控制文件control file
- RAC环境下误操作将数据文件添加到本地存储
- RAC和ASM环境下修改控制文件control file
- 11g rac 添加一个控制文件
- rac 环境下增加控制文件
- oracle 10g rac 添加控制文件
- RAC环境ASM存储新增控制文件的方法
- 添加控制文件
- Windows命令行获取当前bat文件所在目录,添加永久系统环境变量的方法
- Win32汇编——过程控制(环境变量、命令行参数、可执行文件执行)
- 脚本,环境变量,环境文件,运算比较,控制语句