<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
        主站蜘蛛池模板: 午夜成人无码福利免费视频| 亚洲视频在线观看不卡| 无码天堂亚洲国产AV| 成人免费无码大片A毛片抽搐色欲| 91在线亚洲精品专区| 97av免费视频| 亚洲婷婷综合色高清在线| 久久久久av无码免费网| 国产精品亚洲片夜色在线| 成年性午夜免费视频网站不卡| 天堂亚洲国产中文在线| 免费看国产一级片| yellow视频免费看| 亚洲AV乱码久久精品蜜桃| 免费人成在线观看网站品爱网| 亚洲春色在线观看| 成人免费看黄20分钟| 黄页视频在线观看免费| 亚洲AV无码乱码国产麻豆穿越| 色欲国产麻豆一精品一AV一免费 | 毛片基地免费观看| 亚洲AV无码成人精品区日韩| 亚洲欧洲久久久精品| 在线人成免费视频69国产| 亚洲剧情在线观看| 四虎影院永久免费观看| 中文字幕免费在线视频| 91亚洲国产在人线播放午夜| 国产自产拍精品视频免费看| 久久国产一片免费观看| 亚洲美女激情视频| 波多野结衣中文一区二区免费| 在线成人精品国产区免费| 亚洲乱码一二三四区乱码| 亚洲国产午夜福利在线播放| 99精品视频在线观看免费播放| 中日韩亚洲人成无码网站| 国产精品亚洲综合一区| 亚洲精品视频免费在线观看| 高潮内射免费看片| 91亚洲性爱在线视频|