广告
返回顶部
首页 > 资讯 > 数据库 >ORACLE 控制文件(Control Files)概述
  • 342
分享到

ORACLE 控制文件(Control Files)概述

2024-04-02 19:04:59 342人浏览 泡泡鱼
摘要

<h3 style="background-color:#FFFFFF;color:#222222;font-family:Tahoma, sans-serif;font-size:19.7

<h3 style="background-color:#FFFFFF;color:#222222;font-family:Tahoma, sans-serif;font-size:19.7600002288818px;"> Control Files概述 </h3> <p style="color:#222222;font-family:Tahoma, sans-serif;font-size:small;background-color:#FFFFFF;"> &nbsp; &nbsp; The database&nbsp;control file&nbsp;is a small binary file associated with only one database. Each database has one unique control file, although it may maintain identical copies of it. </p> <p style="color:#222222;font-family:Tahoma, sans-serif;font-size:small;background-color:#FFFFFF;"> &nbsp; &nbsp; 数据库控制文件是一个比较小的,并且只与一个数据库关联二进制文件。每个数据库都有一个唯一的控制文件,即使它拥有多个相同的副本。 </p> <div> <h4 style="background-color:#FFFFFF;font-size:18.0699996948242px;font-family:Tahoma, sans-serif;color:#222222;"> Use of Control Files </h4> <p style="font-size:small;font-family:Tahoma, sans-serif;color:#222222;background-color:#FFFFFF;"> &nbsp; &nbsp; The control file is the root file that oracle Database uses to find database files and to manage the state of the database generally.&nbsp;A control file contains infORMation such as the following: </p> <ul style="margin-top:0px;margin-bottom:0px;"> <li style="background-color:#FFFFFF;font-size:small;font-family:Tahoma, sans-serif;color:#222222;"> <p style="background-color:inherit;"> The database name and database unique identifier (DBID) </p> </li> <li style="background-color:#FFFFFF;font-size:small;font-family:Tahoma, sans-serif;color:#222222;"> <p style="background-color:inherit;"> The time stamp of database creation </p> </li> <li style="background-color:#FFFFFF;font-size:small;font-family:Tahoma, sans-serif;color:#222222;"> <p style="background-color:inherit;"> Information about data files, online redo log files, and&nbsp;arcHived redo log files </p> </li> </ul> </div> <div style="background-color:#FFFFFF;color:#222222;font-family:Tahoma, sans-serif;font-size:small;"> <ul style="margin-top:0px;margin-bottom:0px;background-color:inherit;"> <li style="background-color:inherit;"> Tablespace information </li> <li style="background-color:inherit;"> RMAN backups <p style="background-color:inherit;"> <br /> </p> </li> </ul> <p style="line-height:1.5;"> &nbsp; &nbsp; 一般来说,控制文件是oracle数据库用来查找数据库文件、管理数据库状态的根文件。一个控制文件包含一下信息: </p> <p style="line-height:1.5;"> &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; </p> <div style="color:#000000;font-family:微软雅黑;font-size:14px;"> <ul style="margin-top:0px;margin-bottom:0px;background-color:inherit;"> <li style="color:#222222;font-family:Tahoma, sans-serif;font-size:small;"> <p style="background-color:inherit;"> 数据库名和数据库唯一标识符(DBID) </p> </li> <li style="color:#222222;font-family:Tahoma, sans-serif;font-size:small;"> <p style="background-color:inherit;"> 创建数据库的时间戳 </p> </li> <li style="color:#222222;font-family:Tahoma, sans-serif;font-size:small;"> <p style="background-color:inherit;"> 包含数据文件、联机日志文件和归档重做日志文件的信息 </p> </li> </ul> </div> <div> <ul style="margin-top:0px;margin-bottom:0px;background-color:inherit;"> <li style="background-color:inherit;"> 表空间信息 </li> <li style="background-color:inherit;"> RMAN备份 </li> </ul> </div> </div> <div style="background-color:#FFFFFF;color:#222222;font-family:Tahoma, sans-serif;font-size:small;"> <p style="line-height:1.5;"> <br /> </p> </div> <div style="background-color:#FFFFFF;color:#222222;font-family:Tahoma, sans-serif;font-size:small;"> <p style="background-color:inherit;"> The control file serves the following purposes: </p> <ul style="margin-top:0px;margin-bottom:0px;background-color:inherit;"> <li style="background-color:inherit;"> <p style="background-color:inherit;"> It contains information about data files, online redo log files, and so on that are required to open the database. </p> <p style="background-color:inherit;"> The control file tracks structural changes to the database. For example, when an administrator adds, renames, or drops a data file or online redo log file, the database updates the control file to reflect this change. </p> </li> <li style="background-color:inherit;"> <p style="background-color:inherit;"> It contains metadata that must be accessible when the database is not open. </p> <p style="background-color:inherit;"> For example, the control file contains information required to recover the database, including checkpoints.&nbsp;A&nbsp;<a href="file://C:/Users/ZhuRui/AppData/Local/Youdao/YNote/editor/WEB/glossary.htm#CHDDBJEH" style="background-color:inherit;cursor:pointer;color:#72007C;">checkpoint</a>&nbsp;indicates the&nbsp;<a href="file://C:/Users/ZhuRui/AppData/Local/Youdao/YNote/editor/web/glossary.htm#CHDBFAEG" style="background-color:inherit;cursor:pointer;color:#72007C;">SCN</a>&nbsp;in the redo stream where&nbsp;<a href="file://C:/Users/ZhuRui/AppData/Local/Youdao/YNote/editor/web/glossary.htm#CHDIAJFJ" style="background-color:inherit;cursor:pointer;color:#72007C;">instance recovery</a>&nbsp;would be required to begin (see&nbsp;<a href="file://C:/Users/ZhuRui/AppData/Local/Youdao/YNote/editor/web/startup.htm#CEGCHJGF" style="background-color:inherit;cursor:pointer;color:#72007C;">"Overview of Instance Recovery"</a>). Every committed change before a checkpoint SCN is guaranteed to be saved on disk in the data files. At least every three seconds the checkpoint process records information in the control file about the checkpoint position in the online redo log. </p> </li> </ul> <p style="background-color:inherit;"> Oracle Database reads and writes to the control file continuously during database use and must be available for writing whenever the database is open. For example, recovering a database involves reading from the control file the names of all the data files contained in the database. Other operations, such as adding a data file, update the information stored in the control file. </p> <div style="background-color:inherit;"> <p style="font-weight:bold;background-color:inherit;"> <br /> </p> </div> </div> <div style="background-color:#FFFFFF;color:#222222;font-family:Tahoma, sans-serif;font-size:small;"> <h4 style="background-color:inherit;font-size:18.0699996948242px;"> Multiple Control Files </h4> <p style="background-color:inherit;"> Oracle Database enables multiple, identical control files to be open concurrently and written for the same database. By multiplexing a control file on different disks, the database can achieve redundancy and thereby avoid a single point of failure. </p> <div style="background-color:inherit;"> <p style="font-weight:bold;background-color:inherit;"> Note: </p> Oracle recommends that you maintain multiple control file copies, each on a different disk. </div> <p style="background-color:inherit;"> If a control file becomes unusable, then the database instance fails when it attempts to access the damaged control file. When other current control file copies exist, the database can be remounted and opened without&nbsp;<a href="file://C:/Users/ZhuRui/AppData/Local/Youdao/YNote/editor/web/glossary.htm#CHDHGHAE" style="background-color:inherit;cursor:pointer;color:#72007C;">media recovery</a>. If&nbsp;all&nbsp;control files of a database are lost, however, then the instance fails and media recovery is required. Media recovery is not straightforward if an older backup of a control file must be used because a current copy is not available. </p> <div style="background-color:inherit;"> <p style="font-weight:bold;background-color:inherit;"> <br /> </p> </div> </div> <div style="background-color:#FFFFFF;font-family:Tahoma, sans-serif;font-size:small;"> <h4 style="background-color:inherit;color:#222222;font-size:18.0699996948242px;"> Control File Structure </h4> <p style="color:#222222;background-color:inherit;"> Information about the database is stored in different&nbsp;sections&nbsp;of the control file. Each section is a set of&nbsp;records&nbsp;about an aspect of the database. For example, one section in the control file tracks data files and contains a set of records, one for each data file. Each section is stored in multiple logical&nbsp;control file blocks. Records can span blocks within a section. </p> <p style="color:#222222;background-color:inherit;"> The control file contains the following types of records: </p> <ul style="margin-top:0px;margin-bottom:0px;background-color:inherit;color:#222222;"> <li style="background-color:inherit;"> <p style="background-color:inherit;"> Circular reuse records </p> <p style="background-color:inherit;"> These records contain noncritical information that is eligible to be overwritten if needed. When all available record slots are full, the database either expands the control file to make room for a new record or overwrites the oldest record. Examples include records about&nbsp;archived redo log files and RMAN backups. </p> </li> <li style="background-color:inherit;"> <p style="background-color:inherit;"> Noncircular reuse records </p> <p style="background-color:inherit;"> These records contain critical information that does not change often and cannot be overwritten. Examples of information include tablespaces, data files, online redo log files, and redo threads. Oracle Database never reuses these records unless the corresponding object is dropped from the tablespace. </p> </li> </ul> <p style="background-color:inherit;"> <span style="background-color:inherit;color:#222222;">As explained in&nbsp;</span><a href="file://C:/Users/ZhuRui/AppData/Local/Youdao/YNote/editor/web/datadict.htm#i4370" style="background-color:inherit;cursor:pointer;"><span style="background-color:inherit;color:#000000;">"Overview of the Dynamic Performance Views"</span></a><span style="background-color:inherit;color:#222222;">, you can query the dynamic performance views, also known as&nbsp;</span><code style="color:#222222;font-size:12px;background-color:inherit;">V$</code><span style="background-color:inherit;color:#222222;">&nbsp;views, to view the information stored in the control file. For example, you can query&nbsp;</span><code style="color:#222222;font-size:12px;background-color:inherit;">V$DATABASE</code><span style="background-color:inherit;color:#222222;">&nbsp;to obtain the database name and DBID. However, only the database can modify the information in the control file.</span> </p> <p style="background-color:inherit;"> <span style="background-color:inherit;color:#222222;">Reading and writing the control file blocks is different from reading and writing</span><b style="background-color:inherit;">&nbsp;</b><a href="file://C:/Users/ZhuRui/AppData/Local/Youdao/YNote/editor/web/glossary.htm#CHDBACIH" style="background-color:inherit;cursor:pointer;"><span style="background-color:inherit;color:#000000;">data blocks</span></a><span style="background-color:inherit;color:#222222;">. For the control file, Oracle Database reads and writes directly from the disk to the&nbsp;</span><a href="file://C:/Users/ZhuRui/AppData/Local/Youdao/YNote/editor/web/glossary.htm#CHDCHGAJ" style="background-color:inherit;cursor:pointer;"><span style="background-color:inherit;color:#000000;">program global area (PGA)</span></a><span style="background-color:inherit;color:#222222;">. Each process allocates a certain amount of its PGA memory for control file blocks.</span> </p> <p style="color:#222222;background-color:inherit;"> <br /> </p> <p style="color:#222222;background-color:inherit;"> &nbsp; &nbsp; 还可以通过以下两个视图查看控制文件的内容: </p> <div style="background-color:inherit;color:#222222;"> <ul style="margin-top:0px;margin-bottom:0px;line-height:19px;white-space:normal;widows:auto;"> <li style="background-color:inherit;"> <p style="background-color:inherit;"> &nbsp;<code style="font-size:12px;background-color:inherit;">V$CONTROLFILE_RECORD_SECTION</code>&nbsp;view </p> </li> <li style="background-color:inherit;"> <span style="line-height:1.5;">&nbsp;</span><code style="font-size:12px;">CONTROL_FILE_RECORD_KEEP_TIME</code><span style="line-height:1.5;">&nbsp;initialization parameter</span> <p style="background-color:inherit;"> <br /> </p> </li> </ul> <p style="line-height:1.5;white-space:normal;widows:auto;"> &nbsp; &nbsp; &nbsp;另外,还有其他方法查看控制文件的内容,详见博客:<a href="Http://blog.itpub.net/30208428/viewspace-1811811/" style="cursor:pointer;line-height:1.5;">http://blog.itpub.net/30208428/viewspace-1811811/</a> </p> <div> <br /> </div> </div> </div>
您可能感兴趣的文档:

--结束END--

本文标题: ORACLE 控制文件(Control Files)概述

本文链接: https://www.lsjlt.com/news/45791.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • ORACLE 控制文件(Control Files)概述
    <h3 style="background-color:#FFFFFF;color:#222222;font-family:Tahoma, sans-serif;font-size:19.7...
    99+
    2022-10-18
  • 【翻译】控制文件管理(Managing Control Files)
    原文所在的链接为:http://docs.oracle.com/cd/E11882_01/server.112/e25494/control.htm#ADMIN006 1. 控制文件管理 ...
    99+
    2022-10-18
  • Oracle 快照控制文件(snapshot control file)
    CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'C:\APP\ADMINISTRATOR\VIRTUAL\PRODUCT\12.2.0\DBHOME_2\DATABASE\S...
    99+
    2022-10-18
  • Oracle 控制文件
    <div style="font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;widows:auto;bac...
    99+
    2022-10-18
  • Oracle控制文件移动
    Oracle移动控制文件OS:Windowsoracle:10g移动控制文件即将当前的控制文件由当前位置迁移到另一个新位置。六步完成控制文件移动:1.获取控制文件名:SQL> select ...
    99+
    2022-10-18
  •  Oracle控制文件 
    在Oracle中,控制文件是数据库挂载时所使用的文件,控制文件丢失或损坏,实例会崩溃,其中参数文件记录控制文件的位置;在实例启动到nomount后,如果db_names参数与控制文件中记录的数据库名一致,才...
    99+
    2022-10-18
  • ORACLE之重建控制文件
    这里上传图片一直失败,想要查看详细信息和截图的可以下载附件首先看一下控制文件的理解:控制文件是一个二进制文件,用于记录数据库的物理结构。一个控制文件只属于一个数据库。创建数据库时,创建控制文件。当数据库的物...
    99+
    2022-10-18
  • Oracle Study之--Oracle RAC重建控制文件
    Oracle Study之--Oracle RAC重建控制文件系统环境:操作系统: AIX5.3Cluster:  Oracle 10gR2 CRSOracle:   Oracle 10...
    99+
    2022-10-18
  • oracle 10g rac 添加控制文件
    1、查看当前控制文件select * from v$controlfile;2、关闭数据库$srvctl stop database -d devdb -o immediate3、启动到nomou...
    99+
    2022-10-18
  • Oracle 11g R2 管理控制文件
    oracle数据库控制文件是非常重要的文件,它是数据库创建的时候自动生成的二进制文件,其中记录了数据库的状态信息,主要包括以下内容 Ø 数据库的名称,一个控制文件只能属于一个数据库 Ø 数据库创建时间 ...
    99+
    2022-10-18
  • Oracle如何重建控制文件
    小编给大家分享一下Oracle如何重建控制文件,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧! 这几...
    99+
    2022-10-19
  • Oracle 11g重建控制文件——控制文件全部丢失,从零开始
    控制文件(control file)是一个相当小的文件(最多能增长到64M左右),其中包含Oracle需要的其他文件的一个目录。参数文件告知实例控制文件的位置,控制文件则告知示例数据库和在线重做日志文件...
    99+
    2022-10-18
  • 从Oracle到PostgreSQL:最全控制文件
    原文: 从Oracle到PostgreSQL:最全控制文件(上) https://www.enmotech.com/web/detail/1/770/1.html 从Oracle到PostgreS...
    99+
    2022-10-18
  • oracle之 利用 controlfile trace文件重建控制文件
    一、 11g RAC 重建控制文件 1、 --"create controlfile"命令生成到追踪文件中: alter database backup controlfile to trace;...
    99+
    2022-10-18
  • Oracle RMAN备份之控制文件备份
    进入RMAN界面rman target / RMAN>修改控制文件备份方式为自动备份RMAN > configure controlfile&...
    99+
    2022-10-18
  • Oracle 控制文件损坏解决方案
    Oracle 控制文件损坏解决方案   故障一:丢失(损坏)一个控制文件 前台报错:ORA-00205:error in identifying control fil...
    99+
    2022-10-18
  • oracle的控制文件深入理解(一)
    Oracle的control文件 这里我们要实验的是数据库在open的状态下,破快控制文件,数据库会不会down   查看controlfiles的路径 SQL>...
    99+
    2022-10-18
  • Oracle怎么增加控制文件副本
    这篇文章主要介绍“Oracle怎么增加控制文件副本”,在日常操作中,相信很多人在Oracle怎么增加控制文件副本问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”Oracle怎么...
    99+
    2022-10-18
  • Oracle如何使用备份控制文件
    这篇文章主要为大家展示了“Oracle如何使用备份控制文件”,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下“Oracle如何使用备份控制文件”这篇文章吧。 ...
    99+
    2022-10-18
  • oracle如何快速重建控制文件
    小编给大家分享一下oracle如何快速重建控制文件,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!在pfile参数文件中添加下面隐...
    99+
    2022-10-18
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作