Oracle怎么增加控制文件副本

49次阅读
没有评论

共计 2601 个字符,预计需要花费 7 分钟才能阅读完成。

这篇文章主要介绍“Oracle 怎么增加控制文件副本”,在日常操作中,相信很多人在 Oracle 怎么增加控制文件副本问题上存在疑惑,丸趣 TV 小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”Oracle 怎么增加控制文件副本”的疑惑有所帮助!接下来,请跟着丸趣 TV 小编一起来学习吧!

1. 文档目标

新建的数据库只有一个控制文件副本,希望增加控制文件副本到不同位置,防止控制文件发生损坏。

2. 修改 control_files 参数

#  如果使用了 OMF 则可以在修改参数时只指定路径,无需指定绝对路径,是否使用 OMF 即是否设置了 db_create_file_dest  参数。SYS@honor1   show parameter control_files;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_files string +DATADG/honor/controlfile/current.260.984508003
control_management_pack_access string DIAGNOSTIC+TUNING
SYS@honor1   alter system set control_files= +DATADG/honor/controlfile/current.260.984508003 , +datadg  scope=spfile sid= * 
System altered.
Elapsed: 00:00:00.01
SYS@honor1   shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
10:16:35 SYS@honor1   exit

3. 使用 RMAN 利用现有 controlfile 创建副本

(1)创建控制文件副本
[oracle@db-oracle-node1 ~]$ rman target /
Recovery Manager: Release 11.2.0.4.0 - Production on Mon Dec 9 10:17:27 2019
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database (not started)
RMAN  startup nomount;
Oracle instance started
Total System Global Area 521936896 bytes
Fixed Size 2254824 bytes
Variable Size 440403992 bytes
Database Buffers 75497472 bytes
Redo Buffers 3780608 bytes
RMAN  restore controlfile from  +DATADG/honor/controlfile/current.260.984508003 
Starting restore at 09-DEC-19
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=34 instance=honor1 device type=DISK
channel ORA_DISK_1: copied control file copy
output file name=+DATADG/honor/controlfile/current.260.984508003
output file name=+DATADG/honor/controlfile/current.294.1026555549
Finished restore at 09-DEC-19
RMAN  alter database mount;
database mounted
released channel: ORA_DISK_1
RMAN  alter database open;
database opened
RMAN  exit
Recovery Manager complete.(2)查看 control_files 参数
[oracle@db-oracle-node1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Mon Dec 9 10:41:18 2019
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@honor1   show parameter control_files;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_files string +DATADG/honor/controlfile/curr
 ent.260.984508003, +DATADG/hon
 or/controlfile/current.294.102
 6555549

到此,关于“Oracle 怎么增加控制文件副本”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注丸趣 TV 网站,丸趣 TV 小编会继续努力为大家带来更多实用的文章!

正文完
 
丸趣
版权声明:本站原创文章,由 丸趣 2023-07-28发表,共计2601字。
转载说明:除特殊说明外本站除技术相关以外文章皆由网络搜集发布,转载请注明出处。
评论(没有评论)