『ORACLE』RAC—控制文件多路径复制(11g)
2017-05-17 14:49
344 查看
查看当前控制文件数量及位置、名称
SYS@RACDB1 rac1>show parameter control_files;
NAME TYPE VALUE
-------------------------------------------- ------------ ----------------------------------------------------
control_files string +DATA/racdb/controlfile/current.260.942339579,
关闭数据库并将一个节点启动到nomount
[oracle@rac1 ~]$ srvctl stop database -d racdb
[oracle@rac1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Thu Apr 27 23:37:51 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SYS@RACDB1 rac1>startup nomount;
ORACLE instance started.
Total System Global Area 835104768 bytes
Fixed Size 2257840 bytes
Variable Size 603982928 bytes
Database Buffers 226492416 bytes
Redo Buffers 2371584 bytes
利用RMAN创建控制文件
[oracle@rac1 ~]$ rman target /
Recovery Manager: Release 11.2.0.4.0 - Production on Thu Apr 27 23:45:55 2017
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: RACDB (not mounted)
RMAN> restore controlfile to '+DATA' from '+DATA/RACDB/CONTROLFILE/Current.260.942339579';
Starting restore at 27-APR-17
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=34 instance=RACDB1 device type=DISK
channel ORA_DISK_1: copied control file copy
Finished restore at 27-APR-17
RMAN> restore controlfile to '+DATA' from '+DATA/RACDB/CONTROLFILE/Current.260.942339579';
Starting restore at 27-APR-17
using channel ORA_DISK_1
channel ORA_DISK_1: copied control file copy
Finished restore at 27-APR-17
查看已生成的控制文件
[grid@rac2 ~]$ asmcmd
ASMCMD> cd DATA/RACDB/CONTROLFILE
ASMCMD> pwd
+DATA/RACDB/CONTROLFILE
ASMCMD> ls
Current.260.942339579
current.269.942446013
current.270.942447435
此时1节点应该在nmount
SYS@RACDB1 rac1>select inst_id,host_name,status from gv$instance;
INST_ID HOST_NAME STATUS
---------- ---------------------------------------------------------------- ------------
1 rac1 OPEN
SYS@RACDB1 rac1>alter system set control_files=
2 '+DATA/RACDB/controlfile/Current.260.942339579',
3 '+DATA/RACDB/controlfile/current.269.942450435',
4 '+DATA/RACDB/controlfile/current.270.942450415' scope=spfile;
System altered.
SYS@RACDB1 rac1>shutdown immediate
ORA-01507: database not mounted
ORACLE instance shut down.
SYS@RACDB1 rac1>exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
[oracle@rac1 ~]$ srvctl start database -d racdb
[oracle@rac1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Thu Apr 27 23:50:46 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SYS@RACDB1 rac1>select inst_id,name from gv$controlfile;
INST_ID NAME
--------------------------------------------------------------------------------------------------------
1 +DATA/racdb/controlfile/current.260.942339579
1 +DATA/racdb/controlfile/current.269.942450435
1 +DATA/racdb/controlfile/current.270.942450415
2 +DATA/racdb/controlfile/current.260.942339579
2 +DATA/racdb/controlfile/current.269.942450435
2 +DATA/racdb/controlfile/current.270.942450415
6 rows selected.
SYS@RACDB1 rac1>show parameter control_files;
NAME TYPE VALUE
-------------------------------------------- ------------ ----------------------------------------------------
control_files string +DATA/racdb/controlfile/current.260.942339579,
关闭数据库并将一个节点启动到nomount
[oracle@rac1 ~]$ srvctl stop database -d racdb
[oracle@rac1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Thu Apr 27 23:37:51 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SYS@RACDB1 rac1>startup nomount;
ORACLE instance started.
Total System Global Area 835104768 bytes
Fixed Size 2257840 bytes
Variable Size 603982928 bytes
Database Buffers 226492416 bytes
Redo Buffers 2371584 bytes
利用RMAN创建控制文件
[oracle@rac1 ~]$ rman target /
Recovery Manager: Release 11.2.0.4.0 - Production on Thu Apr 27 23:45:55 2017
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: RACDB (not mounted)
RMAN> restore controlfile to '+DATA' from '+DATA/RACDB/CONTROLFILE/Current.260.942339579';
Starting restore at 27-APR-17
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=34 instance=RACDB1 device type=DISK
channel ORA_DISK_1: copied control file copy
Finished restore at 27-APR-17
RMAN> restore controlfile to '+DATA' from '+DATA/RACDB/CONTROLFILE/Current.260.942339579';
Starting restore at 27-APR-17
using channel ORA_DISK_1
channel ORA_DISK_1: copied control file copy
Finished restore at 27-APR-17
查看已生成的控制文件
[grid@rac2 ~]$ asmcmd
ASMCMD> cd DATA/RACDB/CONTROLFILE
ASMCMD> pwd
+DATA/RACDB/CONTROLFILE
ASMCMD> ls
Current.260.942339579
current.269.942446013
current.270.942447435
此时1节点应该在nmount
SYS@RACDB1 rac1>select inst_id,host_name,status from gv$instance;
INST_ID HOST_NAME STATUS
---------- ---------------------------------------------------------------- ------------
1 rac1 OPEN
SYS@RACDB1 rac1>alter system set control_files=
2 '+DATA/RACDB/controlfile/Current.260.942339579',
3 '+DATA/RACDB/controlfile/current.269.942450435',
4 '+DATA/RACDB/controlfile/current.270.942450415' scope=spfile;
System altered.
SYS@RACDB1 rac1>shutdown immediate
ORA-01507: database not mounted
ORACLE instance shut down.
SYS@RACDB1 rac1>exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
[oracle@rac1 ~]$ srvctl start database -d racdb
[oracle@rac1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Thu Apr 27 23:50:46 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SYS@RACDB1 rac1>select inst_id,name from gv$controlfile;
INST_ID NAME
--------------------------------------------------------------------------------------------------------
1 +DATA/racdb/controlfile/current.260.942339579
1 +DATA/racdb/controlfile/current.269.942450435
1 +DATA/racdb/controlfile/current.270.942450415
2 +DATA/racdb/controlfile/current.260.942339579
2 +DATA/racdb/controlfile/current.269.942450435
2 +DATA/racdb/controlfile/current.270.942450415
6 rows selected.
相关文章推荐
- Oracle 11g RAC RMAN ORA-00245 control file backup operation failed 错误 与 控制文件备份 说明
- Oracle 11g RAC RMAN ORA-00245 control file backup operation failed 错误 与 控制文件备份 说明
- Oracle 11g RAC RMAN ORA-00245 control file backup operation failed 错误 与 控制文件备份 说明
- oracle之 RAC 11G ASM下控制文件多路复用
- Oracle 11g RAC RMAN ORA-00245 control file backup operation failed 错误 与 控制文件备份 说明
- oracle之 RAC 11G ASM下控制文件多路复用
- Oracle 11g ORA-03113故障,重建控制文件
- linux下oracle 11g RAC 安装grid失败,如何清除已安装文件
- Oracle 11g RAC开启归档,闪回并设置各自不同的路径
- Oracle 11g重建控制文件——控制文件全部丢失,从零开始
- Oracle 11g安装后几个重要文件路径
- Oracle Study之--Oracle 11g RAC设置归档路径错误案例
- [Rman]Oracle 11g控制文件延迟自动备份
- ORACLE 11G 中没有参数文件和控制文件如何通过rman恢复数据库
- Oracle在不同的物理路径下生成新的控制文件 推荐
- ORACLE 11G RAC--日志路径
- ORACLE 10g将数据文件,日志文件和控制文件迁移到不同的路径
- oracle diag trace 路径下产生大量跟踪文件,修改参数进行控制
- oracle 10g rac 添加控制文件