自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Oracle數(shù)據(jù)庫Redo故障的恢復(fù)

數(shù)據(jù)庫 Oracle
oracle數(shù)據(jù)庫是一種大型數(shù)據(jù)庫系統(tǒng),一般應(yīng)用于商業(yè),政府部門,它的功能很強(qiáng)大,能夠處理大批量的數(shù)據(jù),在網(wǎng)絡(luò)方面也用的非常多。那么Oracle數(shù)據(jù)庫Redo故障該如何恢復(fù)呢?

Oracle數(shù)據(jù)庫功能性很好,應(yīng)用也很廣泛,在進(jìn)行Oracle數(shù)據(jù)庫的操作時難免會出現(xiàn)一些故障,本文主要為大家介紹Oracle數(shù)據(jù)庫Redo故障的恢復(fù)。

一.丟失inactive日志文件組的恢復(fù):

  由于inactive日志文件組表示已經(jīng)完成了檢查點(diǎn)(dirty數(shù)據(jù)已經(jīng)被寫入數(shù)據(jù)文件)。數(shù)據(jù)庫本身不會發(fā)生數(shù)據(jù)庫丟失,如果在這個時候相應(yīng)的redo丟失/損壞,可以通過clear重建日志文件組恢復(fù)。

  通過命令:

  alter database clear logfile group n

  如果數(shù)據(jù)庫模式是archived的,則需要強(qiáng)制清除

  alter database clear unarchived logfile group n

  二.丟失active或current日志文件組的恢復(fù):

  丟失情況分兩種:

  一個是正常關(guān)閉數(shù)據(jù)庫(如shutdown immediate)

  另一個是異常關(guān)閉數(shù)據(jù)庫(如shutdown abort)

  1.在損失當(dāng)前日志時,數(shù)據(jù)庫是正常關(guān)閉狀態(tài)。

  由于shutdown immediate會執(zhí)行全面的checkpoint,所以當(dāng)前日志在實(shí)例恢復(fù)時可以不需要redo

  在Oracle 8i中我們完全可以通過alter database clear logfile group n來進(jìn)行恢復(fù).

  但是在Oracle 9i中,則可能無法對current的redo日志進(jìn)行clear,需要通過recoverdatabaseuntil cancel恢復(fù)后(必須要做的)

  用resetlogs選項打開。

  比如:

  alter database clear logfile group n

  recover database until cancel;

  alter database open resetlogs;

  2.在損失當(dāng)前日志時,數(shù)據(jù)庫是異常關(guān)閉的:

  這種情況下,由于沒有在執(zhí)行全面檢查點(diǎn)時,數(shù)據(jù)庫就已經(jīng)關(guān)閉了,那么Oracle在進(jìn)行實(shí)例恢復(fù)的時候必須要求當(dāng)前的日志,否則Oracle數(shù)據(jù)庫將無法open.

  這樣的情況下,我們通常需要從備份中恢復(fù)數(shù)據(jù)文件,通過應(yīng)用歸檔日志進(jìn)行向前推演。直到***一個完好的日志文件,然后可以通過resetlogs啟動數(shù)據(jù)庫完成恢復(fù)。那么丟失的數(shù)據(jù)則是被損壞的日志文件中的數(shù)據(jù)。

  注意:_allow_resetlogs_corruption是Oracle中的一個隱含參數(shù),如果系統(tǒng)實(shí)在不能resetlogs方式打開的后只能出此下策,在pfile進(jìn)行相應(yīng)設(shè)置打開數(shù)據(jù)庫。該函數(shù)的含義是,允許在破壞一致性的情況下強(qiáng)制重置日志,打開數(shù)據(jù)庫。_allow_resetlogs_corruption將使用所有數(shù)據(jù)文件最舊的SCN打開數(shù)據(jù)庫,所以通常來講需要保證SYSTEM表空間擁有最舊的SCN。在強(qiáng)制打開數(shù)據(jù)庫之后,可能因為各種原因會有ora-600。

上文介紹的知識Oracle數(shù)據(jù)庫Redo故障恢復(fù)的部分方法,如果大家知道更好更有效的恢復(fù)方法,歡迎與大家分享。

【編輯推薦】

  1. Oracle數(shù)據(jù)庫索引創(chuàng)建要做到三個適當(dāng)
  2. 如何將Oracle數(shù)據(jù)庫的普通表轉(zhuǎn)換成分區(qū)表
  3. 講解Oracle數(shù)據(jù)庫提供的多種安全性措施

 

責(zé)任編輯:迎迎 來源: IT專家網(wǎng)
相關(guān)推薦

2011-05-26 09:36:07

Oracle數(shù)據(jù)庫Redo故障

2009-05-12 10:36:38

OracleREDO恢復(fù)

2011-05-11 13:25:57

Oracle數(shù)據(jù)庫后備恢復(fù)

2009-11-20 13:29:59

Oracle數(shù)據(jù)庫恢復(fù)

2011-02-28 13:31:17

Oracle數(shù)據(jù)庫

2011-05-26 10:01:16

Oracle數(shù)據(jù)庫ODU

2011-04-12 15:44:08

Oracle數(shù)據(jù)庫

2010-04-12 10:40:49

Oracle數(shù)據(jù)庫

2019-05-06 15:27:48

Oracle數(shù)據(jù)庫數(shù)據(jù)

2011-08-29 16:41:14

OracleRMAN恢復(fù)數(shù)據(jù)文件的恢復(fù)

2009-04-03 10:54:49

Oracle備份恢復(fù)

2010-04-12 14:19:00

Oracle數(shù)據(jù)庫備份

2010-04-13 11:09:21

Oracle數(shù)據(jù)庫

2011-04-11 13:46:17

Oracle數(shù)據(jù)庫備份

2009-04-17 11:28:16

Oracle備份恢復(fù)

2010-04-12 14:25:04

Oracle備份

2009-10-13 09:43:43

Oracle數(shù)據(jù)庫備份

2011-05-24 10:26:12

Oracle數(shù)據(jù)庫日志文件

2011-03-04 14:59:16

Raidoracle數(shù)據(jù)庫

2011-05-17 11:33:43

oracle數(shù)據(jù)庫
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號