




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、1. 檢查數(shù)據(jù)庫模式: sqlplus /nolog conn /as sysdba archive log list (查看數(shù)據(jù)庫是否處于歸檔模式中) 若為非歸檔,則修改數(shù)據(jù)庫歸檔模式。 startup mount alter database archivelog alter database open2.連接到target數(shù)據(jù)庫命令: connect target / (connect target system/oracleora10g,如果數(shù)據(jù)庫沒有起來,也可要直接在rman命令下用startup進(jìn)行啟動(dòng)數(shù)據(jù)庫) 可以連接到target database.(rman 一邊連接到tar
2、get數(shù)據(jù)庫,另外一邊連接到control file(nocatalog mode),control file 中存儲(chǔ)rman 的備份信息)3.用list backupset 命令查看有沒有備份4. 常用備份命令: 備份全庫:RMAN> backup database plus archivelog delete input; (備份全庫及控制文件、服務(wù)器參數(shù)文件與所有歸檔的重做日志,并刪除舊的歸檔日志)備份表空間:RMAN> backup tablespace system plus archivelog delete input; (備份指定表空間及歸檔的重做日志,并刪除舊的歸
3、檔日志)_備份歸檔日志:RMAN> backup archivelog all delete input;1. 全庫備份(備份數(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ù)庫,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. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(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ì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 10-03矩陣及其運(yùn)算章節(jié)課件
- 幼兒園小班體育教案好玩的彩帶
- 2024北京北師大實(shí)驗(yàn)中學(xué)高二10月月考數(shù)學(xué)試題及答案
- 2025年國際關(guān)系與外交學(xué)考試試題及答案
- 2025年公共衛(wèi)生服務(wù)與健康教育考試試題及答案
- 秩序維護(hù)部半年工作總結(jié)
- 火災(zāi)動(dòng)力學(xué)FD05a-爆炸常識(shí)
- 直腸癌中醫(yī)護(hù)理
- 高考?xì)v史考前沖刺-心理調(diào)適 課件
- 2025年網(wǎng)絡(luò)經(jīng)濟(jì)與在線商業(yè)模式考試題及答案
- 東營市廣饒縣2025屆五年級(jí)數(shù)學(xué)第二學(xué)期期末學(xué)業(yè)水平測(cè)試模擬試題含答案
- 自行車智能化發(fā)展趨勢(shì)-深度研究
- 2022火電廠鐵路專用線安全管理標(biāo)準(zhǔn)
- 《2025年煤礦開工第一課培訓(xùn)》專題講座
- 食品檢驗(yàn)員持證上崗培訓(xùn)課件
- 2025年中國速凍水餃行業(yè)供需態(tài)勢(shì)、競(jìng)爭格局及投資前景分析報(bào)告(智研咨詢)
- 臨床教學(xué)師資培訓(xùn)
- 弱電工程項(xiàng)目經(jīng)理職責(zé)
- 青馬工程培訓(xùn)班培訓(xùn)課件
- 雙碳知識(shí)培訓(xùn)
- 新交際英語(2024新版)一年級(jí)上冊(cè)Unit 1~6全冊(cè)教案
評(píng)論
0/150
提交評(píng)論