标签:asm controfile
控制文件(Control File)是Oracle的物理文件之一,它记录了数据库的名字、数据文件的位置等信息。控制文件的重要性在于,一旦控制文件损坏,数据库将会宕机。如果没有数据库的备份和归档日志文件,数据库将无法恢复。因此,我们应该多路镜像控制文件(Multiplex Control Files),并把每个镜像的控制文件分布在不同的物理磁盘。根据经验,控制文件多路镜像以后,几个控制文件同时坏掉的可能性几乎为零。控制文件管理的重心是重在预防,而不是亡羊补牢! 今天做在测试环境为control file创建多路径镜像控制文件! 环境:RHEL6.4 ORACLE 11.2.0.3 RAC1:查看现在的控制文件:SQL> select * from V$CONTROLFILE; STATUS NAME IS_ BLOCK_SIZE FILE_SIZE_BLKS------- ------------------------------------------------------------ --- ---------- --------------+SYSTEM/gtsdb/controlfile/current.260.870609283 NO 16384 11282. 修改spfile中的控制文件参数SQL> alter system set control_files=‘+SYSTEM/gtsdb/controlfile/current.260.870609283‘,‘+ARCHIVE‘,‘+DATA‘ SCOPE=SPFILE;System altered.3:停数据库srvctl stop database -d gtsdb 4:将数据库实例启动到nomount状态startup nomount5:使用rman还原controlfile[oracle@gtsdb1 ~]$ rman target /Recovery Manager: Release 11.2.0.3.0 - Production on Sat Feb 7 11:48:15 2015Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.connected to target database: GTSDB (not mounted)RMAN> restore controlfile from ‘+SYSTEM/gtsdb/controlfile/current.260.870609283‘;Starting restore at 2015/02/07 11:48:22using target database control file instead of recovery catalogallocated channel: ORA_DISK_1channel ORA_DISK_1: SID=1425 instance=gtsdb1 device type=DISKchannel ORA_DISK_1: copied control file copyoutput file name=+SYSTEM/gtsdb/controlfile/current.260.870609283output file name=+ARCHIVE/gtsdb/controlfile/current.259.871040903output file name=+DATA/gtsdb/controlfile/current.258.871040903Finished restore at 2015/02/07 11:48:26RMAN> RMAN> RMAN> sql ‘ alter database mount‘;sql statement: alter database mountreleased channel: ORA_DISK_1RMAN> sql ‘alter database open‘;sql statement: alter database openRMAN> exitRecovery Manager complete.[oracle@gtsdb1 ~]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.3.0 Production on Sat Feb 7 11:49:10 2015Copyright (c) 1982, 2011, Oracle. All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit ProductionWith the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,Data Mining and Real Application Testing optionsSQL> select open_mode,name from v$database;OPEN_MODE NAME-------------------- ---------READ WRITE GTSDBSQL> select name from v$controlfile;NAME--------------------------------------------------------------------------------+SYSTEM/gtsdb/controlfile/current.260.870609283+ARCHIVE/gtsdb/controlfile/current.259.871040903+DATA/gtsdb/controlfile/current.258.8710409036:将节点2实例启动!标签:asm controfile
原文地址:http://blog.csdn.net/jamesyao008/article/details/43602171