oracle數(shù)據(jù)庫(kù)全備份和增量備份_第1頁(yè)
oracle數(shù)據(jù)庫(kù)全備份和增量備份_第2頁(yè)
oracle數(shù)據(jù)庫(kù)全備份和增量備份_第3頁(yè)
oracle數(shù)據(jù)庫(kù)全備份和增量備份_第4頁(yè)
oracle數(shù)據(jù)庫(kù)全備份和增量備份_第5頁(yè)
已閱讀5頁(yè),還剩2頁(yè)未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、1. 檢查數(shù)據(jù)庫(kù)模式: sqlplus /nolog conn /as sysdba archive log list (查看數(shù)據(jù)庫(kù)是否處于歸檔模式中) 若為非歸檔,則修改數(shù)據(jù)庫(kù)歸檔模式。 startup mount alter database archivelog alter database open2.連接到target數(shù)據(jù)庫(kù)命令: connect target / (connect target system/oracleora10g,如果數(shù)據(jù)庫(kù)沒(méi)有起來(lái),也可要直接在rman命令下用startup進(jìn)行啟動(dòng)數(shù)據(jù)庫(kù)) 可以連接到target database.(rman 一邊連接到tar

2、get數(shù)據(jù)庫(kù),另外一邊連接到control file(nocatalog mode),control file 中存儲(chǔ)rman 的備份信息)3.用list backupset 命令查看有沒(méi)有備份4. 常用備份命令: 備份全庫(kù):RMAN> backup database plus archivelog delete input; (備份全庫(kù)及控制文件、服務(wù)器參數(shù)文件與所有歸檔的重做日志,并刪除舊的歸檔日志)備份表空間:RMAN> backup tablespace system plus archivelog delete input; (備份指定表空間及歸檔的重做日志,并刪除舊的歸

3、檔日志)_備份歸檔日志:RMAN> backup archivelog all delete input;1. 全庫(kù)備份(備份數(shù)據(jù)文件中有數(shù)據(jù)的,有數(shù)據(jù)文件,控制文件,歸檔日志文件,spfile文件,不備份聯(lián)機(jī)重做日志文件或臨時(shí)文件)RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON; -控制文件自動(dòng)備份RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 2 backup type to compressed backupset; -壓縮RMAN> CONFIGURE channel DEVICE T

4、YPE DISK format 'D:APPrmanfull_%s.bk' -備份的路徑RMAN>BACKUP DATABASE; -全備份RMAN>list backup of database; -檢查備份信息RMAN>backup archivelog all delete input; -備份歸檔日志并刪除歸檔日志RMAN> list backup of archivelog all; -檢查歸檔日志2. 差異增量備份 RMAN> backup incremental level 0 database; -0級(jí)全備份RMAN> bac

5、kup incremental level 2 database;-2級(jí)備份RMAN> list backup of database; -檢查備份信息3. 累積增量備份(2c 不做參照對(duì)象)RMAN> backup incremental level 2 cumulative database;中心數(shù)據(jù)庫(kù),RMAN一周備份方案=0.星期天晚上 -level 0 backup performed(全備份)1.星期一晚上 -level 2 backup performed2.星期二晚上 -level 2 backup performed3.星期三晚上 -level 1 backup

6、performed4.星期四晚上 -level 2 backup performed5.星期五晚上 -level 2 backup performed6.星期六晚上 -level 2 backup performed如果星期二需要恢復(fù)的話,只需要0+1,如果星期四需要恢復(fù)的話,只需要0+3,如果星期五需要恢復(fù)的話,只需要0+3+4,如果星期六需要恢復(fù)的話,只需要0+3+4+5具體步驟:1. 創(chuàng)建0,1,2級(jí)備份腳本 D:rman_bak_scriptrunallocate channel c1 type disk;allocate channel c2 type disk;allocate c

7、hannel c3 type disk;backup as compressed backupset incremental level 0 tag 'db_level0' database format 'H:RMAN_BAKlevel0_%u_%s_%p.bak'sql 'alter system archive log current'backup as compressed backupset archivelog all format 'H:ARCHIVELOG_BAKarch0_%u_%s_%p' delete inp

8、ut;delete noprompt obsolete;release channel c1;release channel c2;release channel c3;runallocate channel c1 type disk;allocate channel c2 type disk;allocate channel c3 type disk;backup as compressed backupset incremental level 1 tag 'db_level1' database format 'H:RMAN_BAKlevel1_%u_%s_%p.

9、bak'sql 'alter system archive log current'backup as compressed backupset archivelog all format 'H:ARCHIVELOG_BAKarch1_%u_%s_%p' delete input;delete noprompt obsolete;release channel c1;release channel c2;release channel c3;runallocate channel c1 type disk;allocate channel c2 type

10、 disk;allocate channel c3 type disk;backup as compressed backupset incremental level 2 tag 'db_level2' database format 'H:RMAN_BAKlevel2_%u_%s_%p.bak'sql 'alter system archive log current'backup as compressed backupset archivelog all format 'H:ARCHIVELOG_BAKarch2_%u_%s_%p

11、' delete input;delete noprompt obsolete;release channel c1;release channel c2;release channel c3;2. 創(chuàng)建周日至周六執(zhí)行的批處理文件 D:rman_bak_script MonSun星期天 rman target / log D:rman_bak_scriptSunrmanlog_Sun%date:0,4%_%date:5,2%_%date:8,2%.txt cmdfile=D:rman_bak_scriptrman_level0.cmd星期一 rman target / log D:rm

12、an_bak_scriptMonrmanlog_Mon%date:0,4%_%date:5,2%_%date:8,2%.txt cmdfile=D:rman_bak_scriptrman_level2.cmd星期二 rman target / log D:rman_bak_scriptTuermanlog_Tue%date:0,4%_%date:5,2%_%date:8,2%.txt cmdfile=D:rman_bak_scriptrman_level2.cmd星期三 rman target / log D:rman_bak_scriptWenrmanlog_Wen%date:0,4%_%date:5,2%_%date:8,2%.txt cmdfile=D:rman_bak_scriptrman_level1.cmd星期四 rman target / log D:rman_bak_scriptThurmanlog_Thu%date:0,4%_%date:5,2%_%date:8,2%.txt cmdfile=D:rman_bak_scriptrman_level2.cmd星期五 rman target / log D:rman_bak_scriptFrirmanlog_Fri%date:0,4%_%d

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論