溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

介質(zhì)恢復(fù) 和 實例恢復(fù)

發(fā)布時間:2020-08-07 22:14:00 來源:ITPUB博客 閱讀:158 作者:不一樣的天空w 欄目:建站服務(wù)器

介質(zhì)恢復(fù) 實例恢復(fù)

以下全是個人理解,不代表oracle 官方意思.請仔細(xì)考慮.有錯誤請指正.兩個名詞個人意思解析:什么是介質(zhì)恢復(fù):什么是介質(zhì),介質(zhì)就是數(shù)據(jù)文件.介質(zhì)恢復(fù)就是對數(shù)據(jù)文件恢復(fù).什么實例恢復(fù): 什么是實例,實例就是內(nèi)存和進(jìn)程.就是數(shù)據(jù)庫把redo中需要恢復(fù)的數(shù)據(jù)讀入內(nèi)存.數(shù)據(jù)文件可能不變化.當(dāng)然也有可能變化.

1
、系統(tǒng)正常關(guān)閉:
system scn=datafile scn=start scn=stop scn
1)system scn=datafile scn=start scn
,不需要介質(zhì)恢復(fù)
2)stopscn not null,
不需要實例恢復(fù)

2
、系統(tǒng)異常關(guān)閉:
system scn=datafile scn=start scn
,stop scn null
1)system scn=datafile scn=start scn
,不需要介質(zhì)恢復(fù)
2)stopscn null,
需要實例恢復(fù)((說白了就是可能要去讀在線日志進(jìn)行前滾)

3
、舊數(shù)據(jù)文件
system scn=datafile scn>start scn
stop scn null/notnull
1)system scn=datafile scn>start scn
,需要介質(zhì)恢復(fù)成system scn=datafile scn=start scn((說白很有可能用的是備份控制文件.或者控制文件是最新的,但是數(shù)據(jù)文件是從全備份恢復(fù)的.)
2)stopscn null,
需要實例恢復(fù),not null 不需要實例恢復(fù)

4
、備份控制文件
system scn=datafile scn<=start scn(
當(dāng)數(shù)據(jù)文件為舊的相等)stop scn notnull/null
1)system scn=datafile scn<=start scn
,需要使用using backup controlfile介質(zhì)恢復(fù)成system scn=datafile scn=start scn=current log scn(當(dāng)前日志最大SCN)
2)
為保證上一次恢復(fù)沒有用到log日志不被使用,必須resetlogs
5
、重建noresetlogs控制文件控制文件中 datafile Checkpoint來自Online logs中的Current log
current log scn=system scn=datafile scn>=start scn,stop scn not null/null
1)current log scn=system scn=datafile scn>=start scn
,需要介質(zhì)恢復(fù)成system scn=datafile scn=start scn=redolog scn(當(dāng)前日志最大SCN),stop scn not null
2)stopscn not null
不需要實例恢復(fù)

6
、重建resetlogs控制文件控制文件中datafile Checkpoint來自各數(shù)據(jù)文件頭。
system scn>=datafile scn=start scn,stop scn not null/null
1)system scn>=datafile scn=start scn
,需要使用using backup controlfile介質(zhì)恢復(fù)成system scn=datafile scn=start scn(當(dāng)前日志最大SCN),stop scn not null


向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI