Oracle添加冗余控制文件
来源:互联网 发布:易经精髓 知乎 编辑:程序博客网 时间:2024/05/29 08:01
实验环境:
[root@db ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.8 (Tikanga)
[root@db ~]# su - grid
[grid@db ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE db
ora.LISTENER.lsnr
ONLINE ONLINE db
ora.asm
ONLINE ONLINE db Started
ora.ons
OFFLINE OFFLINE db
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 ONLINE ONLINE db
ora.diskmon
1 OFFLINE OFFLINE
ora.evmd
1 ONLINE ONLINE db
ora.orcl.db
1 ONLINE ONLINE db Open
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
CORE 11.2.0.4.0 Production
TNS for Linux: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production
SQL>
1、检查当前控制文件名称及路径
SQL> show parameter control
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time integer 7
control_files string +DATA/orcl/controlfile/current
.262.938021411
control_management_pack_access string DIAGNOSTIC+TUNING
2、检查pfile路径
SQL> show parameter spfile
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string +DATA/orcl/spfileorcl.ora
3、备份pfile及控制文件
SQL> create pfile='/home/oracle/pfile1114.ora' from spfile;
File created.
SQL> alter session set tracefile_identifier='bak_control';
Session altered.
SQL> alter database backup controlfile to trace;
Database altered.
4、在参数文件中添加新的控制文件路径及名称
SQL> select name from v$controlfile;
NAME
--------------------------------------------------------------------------------
+DATA/orcl/controlfile/current.262.938021411
SQL> alter system set control_files='+DATA/orcl/controlfile/current.262.938021411','+DATA' scope=spfile;
System altered.
5、重启数据库至nomount状态
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 939495424 bytes
Fixed Size 2258840 bytes
Variable Size 595593320 bytes
Database Buffers 335544320 bytes
Redo Buffers 6098944 bytes
SQL> show parameter control_files
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_files string +DATA/orcl/controlfile/current
.262.938021411, +DATA
6、恢复控制文件
[oracle@db ~]$ rman target /
Recovery Manager: Release 11.2.0.4.0 - Production on Tue Nov 14 11:08:41 2017
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORCL (not mounted)
RMAN> restore controlfile from '+DATA/orcl/controlfile/current.262.938021411';
Starting restore at 14-NOV-2017 11:08:42
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=24 device type=DISK
channel ORA_DISK_1: copied control file copy
output file name=+DATA/orcl/controlfile/current.262.938021411
output file name=+DATA/orcl/controlfile/current.268.960030523
Finished restore at 14-NOV-2017 11:08:44
7、启动数据库至OPEN
RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1
RMAN> alter database open;
database opened
RMAN> exit
SQL*Plus: Release 11.2.0.4.0 Production on Tue Nov 14 11:09:18 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, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
SQL> show parameter control_files;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_files string +DATA/orcl/controlfile/current
.262.938021411, +DATA/orcl/con
trolfile/current.268.960030523
[root@db ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.8 (Tikanga)
[root@db ~]# su - grid
[grid@db ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE db
ora.LISTENER.lsnr
ONLINE ONLINE db
ora.asm
ONLINE ONLINE db Started
ora.ons
OFFLINE OFFLINE db
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 ONLINE ONLINE db
ora.diskmon
1 OFFLINE OFFLINE
ora.evmd
1 ONLINE ONLINE db
ora.orcl.db
1 ONLINE ONLINE db Open
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
CORE 11.2.0.4.0 Production
TNS for Linux: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production
SQL>
1、检查当前控制文件名称及路径
SQL> show parameter control
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time integer 7
control_files string +DATA/orcl/controlfile/current
.262.938021411
control_management_pack_access string DIAGNOSTIC+TUNING
2、检查pfile路径
SQL> show parameter spfile
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string +DATA/orcl/spfileorcl.ora
3、备份pfile及控制文件
SQL> create pfile='/home/oracle/pfile1114.ora' from spfile;
File created.
SQL> alter session set tracefile_identifier='bak_control';
Session altered.
SQL> alter database backup controlfile to trace;
Database altered.
4、在参数文件中添加新的控制文件路径及名称
SQL> select name from v$controlfile;
NAME
--------------------------------------------------------------------------------
+DATA/orcl/controlfile/current.262.938021411
SQL> alter system set control_files='+DATA/orcl/controlfile/current.262.938021411','+DATA' scope=spfile;
System altered.
5、重启数据库至nomount状态
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 939495424 bytes
Fixed Size 2258840 bytes
Variable Size 595593320 bytes
Database Buffers 335544320 bytes
Redo Buffers 6098944 bytes
SQL> show parameter control_files
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_files string +DATA/orcl/controlfile/current
.262.938021411, +DATA
6、恢复控制文件
[oracle@db ~]$ rman target /
Recovery Manager: Release 11.2.0.4.0 - Production on Tue Nov 14 11:08:41 2017
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORCL (not mounted)
RMAN> restore controlfile from '+DATA/orcl/controlfile/current.262.938021411';
Starting restore at 14-NOV-2017 11:08:42
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=24 device type=DISK
channel ORA_DISK_1: copied control file copy
output file name=+DATA/orcl/controlfile/current.262.938021411
output file name=+DATA/orcl/controlfile/current.268.960030523
Finished restore at 14-NOV-2017 11:08:44
7、启动数据库至OPEN
RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1
RMAN> alter database open;
database opened
RMAN> exit
Recovery Manager complete.
SQL*Plus: Release 11.2.0.4.0 Production on Tue Nov 14 11:09:18 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, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
SQL> show parameter control_files;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_files string +DATA/orcl/controlfile/current
.262.938021411, +DATA/orcl/con
trolfile/current.268.960030523
阅读全文
0 0
- Oracle添加冗余控制文件
- rac 中添加控制文件冗余
- 翻译mos添加冗余控制文件
- ORACLE RAC添加控制文件
- ORACLE 11gR2 RAC添加控制文件
- oracle 添加控制文件和修改归档模式
- oracle 11g 添加控制文件
- 添加控制文件
- 添加控制文件
- 管理oracle控制文件
- 移动Oracle控制文件
- 恢复oracle控制文件
- Oracle 控制文件 说明
- Oracle 控制文件
- oracle控制文件管理
- Oracle 控制文件
- oracle 重建控制文件
- Oracle 控制文件(CONTROLFILE)
- java常用的8种排序方法
- MySQL中有关TIMESTAMP和DATETIME的总结
- (16)QL2:模糊查询(%,_)、常用的函数、group by、having、子查询、update 、delete、native
- 3. PHP 工具
- 模板模式
- Oracle添加冗余控制文件
- 在AndroidStudio上使用leakcanary
- 面向对象
- unity关节
- mix-blend-mode无效?你需要注意以下内容
- 暴风AI电视获双11人工智能品类销量第一
- 一“屏”一宇宙——看完这个视频,才知道什么叫真正的“全面屏”!
- 合作伙伴收入增长11倍,腾讯云的野心不止10朵云
- Ubuntu16.04.2 SSH连接