<span id="mktg5"></span>

<i id="mktg5"><meter id="mktg5"></meter></i>

        <label id="mktg5"><meter id="mktg5"></meter></label>
        最新文章專(zhuān)題視頻專(zhuān)題問(wèn)答1問(wèn)答10問(wèn)答100問(wèn)答1000問(wèn)答2000關(guān)鍵字專(zhuān)題1關(guān)鍵字專(zhuān)題50關(guān)鍵字專(zhuān)題500關(guān)鍵字專(zhuān)題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關(guān)鍵字專(zhuān)題關(guān)鍵字專(zhuān)題tag2tag3文章專(zhuān)題文章專(zhuān)題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專(zhuān)題3
        問(wèn)答文章1 問(wèn)答文章501 問(wèn)答文章1001 問(wèn)答文章1501 問(wèn)答文章2001 問(wèn)答文章2501 問(wèn)答文章3001 問(wèn)答文章3501 問(wèn)答文章4001 問(wèn)答文章4501 問(wèn)答文章5001 問(wèn)答文章5501 問(wèn)答文章6001 問(wèn)答文章6501 問(wèn)答文章7001 問(wèn)答文章7501 問(wèn)答文章8001 問(wèn)答文章8501 問(wèn)答文章9001 問(wèn)答文章9501
        當(dāng)前位置: 首頁(yè) - 科技 - 知識(shí)百科 - 正文

        Oracle學(xué)習(xí).數(shù)據(jù)文件、控制文件、重做日志文件的理解

        來(lái)源:懂視網(wǎng) 責(zé)編:小采 時(shí)間:2020-11-09 15:41:37
        文檔

        Oracle學(xué)習(xí).數(shù)據(jù)文件、控制文件、重做日志文件的理解

        Oracle學(xué)習(xí).數(shù)據(jù)文件、控制文件、重做日志文件的理解:什么是數(shù)據(jù)文件、控制文件、重做日志文件? 首先從Oracle的官方文檔里摘錄下面內(nèi)容: The following divs explain the physical database structures of an Oracle database, including datafiles, redo log files
        推薦度:
        導(dǎo)讀Oracle學(xué)習(xí).數(shù)據(jù)文件、控制文件、重做日志文件的理解:什么是數(shù)據(jù)文件、控制文件、重做日志文件? 首先從Oracle的官方文檔里摘錄下面內(nèi)容: The following divs explain the physical database structures of an Oracle database, including datafiles, redo log files

        什么是數(shù)據(jù)文件、控制文件、重做日志文件? 首先從Oracle的官方文檔里摘錄下面內(nèi)容: The following divs explain the physical database structures of an Oracle database, including datafiles, redo log files, and control files 下面幾段內(nèi)容將解釋一

        什么是數(shù)據(jù)文件、控制文件、重做日志文件?


        首先從Oracle的官方文檔里摘錄下面內(nèi)容:

        The following divs explain the physical database structures of an Oracle database, including datafiles, redo log files, and control files

        下面幾段內(nèi)容將解釋一下,Oracle數(shù)據(jù)庫(kù)的物理結(jié)構(gòu)是什么?包括數(shù)據(jù)文件、控制文件和重做日志文件。

        Datafiles


        Every Oracle database has one or more physical datafiles. The datafiles contain all the database data. The data of logical database structures, such as tables and indexes, is physically stored in the datafiles allocated for a database.

        The characteristics of datafiles are:

      1. A datafile can be associated with only one database.

      2. Datafiles can have certain characteristics set to let them automatically extend when the database runs out of space.

      3. One or more datafiles form a logical unit of database storage called a tablespace.

      4. Data in a datafile is read, as needed, during normal database operation and stored in the memory cache of Oracle. For example, assume that a user wants to access some data in a table of a database. If the requested information is not already in the memory cache for the database, then it is read from the appropriate datafiles and stored in memory.

        Modified or new data is not necessarily written to a datafile immediately. To reduce the amount of disk access and to increase performance, data is pooled in memory and written to the appropriate datafiles all at once, as determined by the database writer process (DBWn) background process.

        數(shù)據(jù)文件:

        每一個(gè)Oracle數(shù)據(jù)庫(kù)都要有一個(gè)或者多個(gè)物理的數(shù)據(jù)文件,這些數(shù)據(jù)文件里存儲(chǔ)的就是Oracle數(shù)據(jù)庫(kù)里的數(shù)據(jù)。就好比你有一個(gè)文件夾,里面有幾個(gè)txt的文本文件,文本文件里記錄的你這個(gè)月的每一筆花銷(xiāo)。如果把文件夾看做是數(shù)據(jù)庫(kù),那么txt文件就是數(shù)據(jù)文件,而txt文件里面記錄的每一筆花銷(xiāo)就是數(shù)據(jù)了。

        然而表、索引等等其實(shí)都是數(shù)據(jù)庫(kù)的邏輯結(jié)構(gòu),這些表、索引都被物理的存儲(chǔ)在了數(shù)據(jù)文件里面。

        數(shù)據(jù)文件有三個(gè)特性:

        1、一個(gè)數(shù)據(jù)文件只能屬于一個(gè)數(shù)據(jù)庫(kù)。

        2、數(shù)據(jù)庫(kù)中的數(shù)據(jù)文件可以被設(shè)置成自動(dòng)的增長(zhǎng)。(當(dāng)數(shù)據(jù)庫(kù)的空間用完的時(shí)候,數(shù)據(jù)庫(kù)中的數(shù)據(jù)文件就會(huì)自動(dòng)增長(zhǎng),比如原來(lái)1G的數(shù)據(jù)文件自動(dòng)變成了2G的數(shù)據(jù)文件)

        3、一個(gè)或者多個(gè)數(shù)據(jù)文件就組成了數(shù)據(jù)庫(kù)的一個(gè)邏輯單元叫做---表空間。

        (就比如記錄流水賬,那這個(gè)月的賬目就組成了一個(gè)表空間,下個(gè)月的就是另外一個(gè)表空間。)

        數(shù)據(jù)文件里的數(shù)據(jù),在需要的時(shí)候就會(huì)被讀取到內(nèi)容Oracle的緩沖區(qū)中,比如當(dāng)我們想查看一天數(shù)據(jù)時(shí),而這條數(shù)據(jù)恰好又不在Oracle的緩沖區(qū)中,那么Oracle就會(huì)把這條數(shù)據(jù)從數(shù)據(jù)文件中讀取到Oracle的緩沖區(qū)中來(lái)。

        當(dāng)更改或者新增一天數(shù)據(jù)時(shí),也不是馬上就寫(xiě)到數(shù)據(jù)文件里面,這么做是為了減少對(duì)磁盤(pán)的訪問(wèn),提高效率,數(shù)據(jù)先存儲(chǔ)在緩沖區(qū),然后在一次都寫(xiě)入數(shù)據(jù)文件,這個(gè)過(guò)程有一個(gè)dbwn后臺(tái)進(jìn)程來(lái)控制。


        Control Files
         
        Every Oracle database has a control file. A control file contains entries that specify the physical structure of the database. For example, it contains the following information:

        Database name

        Names and locations of datafiles and redo log files

        Time stamp of database creation

        Oracle can multiplex the control file, that is, simultaneously maintain a number of identical control file copies, to protect against a failure involving the control file.

        Every time an instance of an Oracle database is started, its control file identifies the database and redo log files that must be opened for database operation to proceed. If the physical makeup of the database is altered (for example, if a new datafile or redo log file is created), then the control file is automatically modified by Oracle to reflect the change. A control file is also used in database recovery.

        控制文件:

        每一個(gè)數(shù)據(jù)庫(kù)都擁有控制文件(它和數(shù)據(jù)文件一樣重要),控制文件里記錄的是對(duì)數(shù)據(jù)庫(kù)物理結(jié)構(gòu)的詳細(xì)信息,例如它包括如下三個(gè)信息:
        1、數(shù)據(jù)庫(kù)的名稱(chēng)
        2、數(shù)據(jù)文件的名字和存在位置,重做日志文件的名字和存儲(chǔ)位置
        3、數(shù)據(jù)庫(kù)創(chuàng)建的時(shí)間標(biāo)識(shí)

        Oracle可以使用多重的控制文件,也就是說(shuō)它可以同時(shí)維護(hù)多個(gè)完全一樣的控制文件,這么做就是為了防止數(shù)據(jù)文件損壞而造成的數(shù)據(jù)庫(kù)故障。比如Oracle同時(shí)維護(hù)3個(gè)控制文件,當(dāng)其中有1個(gè)控制文件出問(wèn)題了,就比較好解決,把出問(wèn)題的刪了,在復(fù)制一份沒(méi)有問(wèn)題的就可以了。

        每當(dāng)Oracle數(shù)據(jù)庫(kù)的實(shí)例啟動(dòng)的時(shí)候,它就會(huì)通過(guò)控制文件來(lái)識(shí)別,要想執(zhí)行數(shù)據(jù)庫(kù)的一些操作,必須需要哪些數(shù)據(jù)文件和重做日志文件,以及這些數(shù)據(jù)文件和重做日志文件都存在在什么位置。當(dāng)數(shù)據(jù)庫(kù)的物理構(gòu)成發(fā)生改變的時(shí)候,比如新增加了一個(gè)數(shù)據(jù)文件或者重做日志文件,那么控制文件就會(huì)自動(dòng)的更新來(lái)記錄這些變化。另外在數(shù)據(jù)庫(kù)恢復(fù)的時(shí)候也會(huì)用到控制文件。


        Redo Log Files
         
        Every Oracle database has a set of two or more redo log files. The set of redo log files is collectively known as the redo log for the database. A redo log is made up of redo entries (also called redo records).

        The primary function of the redo log is to record all changes made to data. If a failure prevents modified data from being permanently written to the datafiles, then the changes can be obtained from the redo log, so work is never lost.
         
        To protect against a failure involving the redo log itself, Oracle allows a multiplexed redo log so that two or more copies of the redo log can be maintained on different disks.

        The information in a redo log file is used only to recover the database from a system or media failure that prevents database data from being written to the datafiles. For example, if an unexpected power outage terminates database operation, then data in memory cannot be written to the datafiles, and the data is lost. However, lost data can be recovered when the database is opened, after power is restored. By applying the information in the most recent redo log files to the database datafiles, Oracle restores the database to the time at which the power failure occurred.

        The process of applying the redo log during a recovery operation is called rolling forward.

        重做日志文件:
        每個(gè)Oracle數(shù)據(jù)庫(kù)都擁有一組文件,其中包括2個(gè)或者多個(gè)重做日志文件(其實(shí)也可以擁有多組,用途跟多個(gè)控制文件一樣)。這組文件整體被稱(chēng)為數(shù)據(jù)庫(kù)的重做日志,而重做日志又是由一條一條的重做記錄組成的,所有也被稱(chēng)為重做記錄。
        重做日志的主要作用就是記錄所有的數(shù)據(jù)變化,當(dāng)一個(gè)故障導(dǎo)致被修改過(guò)的數(shù)據(jù)沒(méi)有從內(nèi)存中永久的寫(xiě)到數(shù)據(jù)文件里,那么數(shù)據(jù)的變化是可以從重做日志中獲得的,從而保證了對(duì)數(shù)據(jù)修改的不丟失。
        為了防止重做日志自身的問(wèn)題導(dǎo)致故障,所以O(shè)racle擁有多重重做日志功能,也就是可以同時(shí)保存多組完全相同的重做日志在不同的磁盤(pán)上。
        重做日志里的信息只是用于恢復(fù)由于系統(tǒng)或者介質(zhì)故障所引起的數(shù)據(jù)沒(méi)法寫(xiě)入數(shù)據(jù)文件的數(shù)據(jù)。比如突然斷電導(dǎo)致數(shù)據(jù)庫(kù)的關(guān)閉,那么內(nèi)存中的數(shù)據(jù)就不能寫(xiě)入到數(shù)據(jù)文件中,內(nèi)存中的數(shù)據(jù)就會(huì)丟失。但當(dāng)數(shù)據(jù)庫(kù)重新啟動(dòng)時(shí)丟失的數(shù)據(jù)是可以被恢復(fù)的,可以從最近的重做日志中讀取丟失信息然后應(yīng)用到數(shù)據(jù)文件中,這樣就把數(shù)據(jù)庫(kù)恢復(fù)到斷電前的狀態(tài)。
        在恢復(fù)操作中恢復(fù)重做日志信息的過(guò)程叫做回滾。

        聲明:本網(wǎng)頁(yè)內(nèi)容旨在傳播知識(shí),若有侵權(quán)等問(wèn)題請(qǐng)及時(shí)與本網(wǎng)聯(lián)系,我們將在第一時(shí)間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

        文檔

        Oracle學(xué)習(xí).數(shù)據(jù)文件、控制文件、重做日志文件的理解

        Oracle學(xué)習(xí).數(shù)據(jù)文件、控制文件、重做日志文件的理解:什么是數(shù)據(jù)文件、控制文件、重做日志文件? 首先從Oracle的官方文檔里摘錄下面內(nèi)容: The following divs explain the physical database structures of an Oracle database, including datafiles, redo log files
        推薦度:
        標(biāo)簽: 控制 文件 數(shù)據(jù)
        • 熱門(mén)焦點(diǎn)

        最新推薦

        猜你喜歡

        熱門(mén)推薦

        專(zhuān)題
        Top
        主站蜘蛛池模板: 中文字幕永久免费| 国产精品国产亚洲区艳妇糸列短篇| fc2免费人成为视频| 亚洲av日韩片在线观看| 亚洲AV无码成人精品区日韩| 国产精品麻豆免费版| 国产亚洲精品2021自在线| 国产小视频免费观看| 色窝窝亚洲AV网在线观看| 一本久久综合亚洲鲁鲁五月天| 最好2018中文免费视频| 亚洲精品成人无限看| 久久w5ww成w人免费| 亚洲人成电影在线观看网| 99视频在线精品免费观看6| 一本天堂ⅴ无码亚洲道久久| 四虎成人免费大片在线| 免费国产黄网站在线观看动图| 亚洲人成无码www久久久| 免费国产成人午夜在线观看| 亚洲国产精品一区二区久| 毛片免费在线播放| 日本黄页网址在线看免费不卡| 国产精品亚洲αv天堂无码| 无码少妇精品一区二区免费动态 | 亚洲国产成人爱av在线播放| 一区二区三区免费在线观看| 久久精品国产99精品国产亚洲性色| 亚洲免费视频观看| 狼人大香伊蕉国产WWW亚洲| 亚洲人成人一区二区三区| 97国产免费全部免费观看| 成人亚洲国产精品久久| 久久久久亚洲精品成人网小说| 精品久久久久国产免费| 成在线人免费无码高潮喷水| 亚洲国产成人久久| 亚洲一区二区三区AV无码| 日韩av无码成人无码免费| 中文毛片无遮挡高清免费| ww亚洲ww在线观看国产|