




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、使用RMAN恢復(fù)Oracle 10g RAC庫至異機(jī)主RAC庫:2個(gè)節(jié)點(diǎn)rac1(68,rac2(68 采用ASM+RAW備機(jī)standby(88 文件系統(tǒng)一。在rac庫備份:rac1- crs_stat -tName Type Target State Host-ora.SM1.asm application ONLINE ONLINE rac1ora.C1.lsnr application ONLINE ONLINE rac1ora.rac1.gsd application ONLINE ONLINE rac1o
2、ra.rac1.ons application ONLINE ONLINE rac1ora.rac1.vip application ONLINE ONLINE rac1ora.SM2.asm application ONLINE ONLINE rac2ora.C2.lsnr application ONLINE ONLINE rac2ora.rac2.gsd application ONLINE ONLINE rac2ora.rac2.ons application ONLINE ONLINE rac2ora.rac2.vip application ONLINE ONLINE rac2or
3、a.racdb.db application ONLINE ONLINE rac1ora.b1.inst application ONLINE ONLINE rac1ora.b2.inst application ONLINE ONLINE rac2rac1-rac1- export ORACLE_SID=racdb1rac1- rman target / nocatalogRMAN run2 allocate CHANNEL ch00 type DISK CONNECT sys/oracleracdb1;3 allocate CHANNEL ch01 type DISK CONNECT sy
4、s/oracleracdb2;4 backup database format /rmanset/racdb_full_%d%t%s%p tag fullbackup;5 BACKUP FORMAT /rmanset/%d_arch_%s_%p_%h ARCHIVELOG ALL;6 backup format /rmanset/cf_%d_%s_%p7 (current controlfile;8 RELEASE CHANNEL ch00;9 RELEASE CHANNEL ch01;10 allocated channel: ch00channel ch00: sid=148 instan
5、ce=racdb1 devtype=DISKallocated channel: ch01channel ch01: sid=148 instance=racdb2 devtype=DISKStarting backup at 02-NOV-08channel ch00: starting full datafile backupsetchannel ch00: specifying datafile(s in backupsetinput datafile fno=00001 name=+RACDATA/racdb/datafile/system.259.669487425input dat
6、afile fno=00005 name=+RACDATA/racdb/datafile/users.264.669487561input datafile fno=00004 name=+RACDATA/racdb/datafile/undotbs2.263.669487539 channel ch00: starting piece 1 at 02-NOV-08channel ch01: starting full datafile backupsetchannel ch01: specifying datafile(s in backupsetinput datafile fno=000
7、03 name=+RACDATA/racdb/datafile/sysaux.261.669487497input datafile fno=00002 name=+RACDATA/racdb/datafile/undotbs1.260.669487479 channel ch01: starting piece 1 at 02-NOV-08channel ch00: finished piece 1 at 02-NOV-08piece handle=/rmanset/racdb_full_RACDB669769770931 tag=FULLBACKUP comment=NONE channe
8、l ch00: backup set complete, elapsed time: 00:02:19channel ch00: starting full datafile backupsetchannel ch00: specifying datafile(s in backupsetincluding current control file in backupsetchannel ch00: starting piece 1 at 02-NOV-08channel ch01: finished piece 1 at 02-NOV-08piece handle=/rmanset/racd
9、b_full_RACDB669769784941 tag=FULLBACKUP comment=NONE channel ch01: backup set complete, elapsed time: 00:02:28channel ch01: starting full datafile backupsetchannel ch01: specifying datafile(s in backupsetincluding current SPFILE in backupsetchannel ch01: starting piece 1 at 02-NOV-08channel ch00: fi
10、nished piece 1 at 02-NOV-08piece handle=/rmanset/racdb_full_RACDB669769914951 tag=FULLBACKUP comment=NONE channel ch00: backup set complete, elapsed time: 00:00:11channel ch01: finished piece 1 at 02-NOV-08piece handle=/rmanset/racdb_full_RACDB669769933961 tag=FULLBACKUP comment=NONE channel ch01: b
11、ackup set complete, elapsed time: 00:00:05Finished backup at 02-NOV-08Starting backup at 02-NOV-08current log archivedchannel ch00: starting archive log backupsetchannel ch00: specifying archive log(s in backup setinput archive log thread=1 sequence=42 recid=141 stamp=669603048input archive log thre
12、ad=1 sequence=44 recid=149 stamp=669640424input archive log thread=1 sequence=45 recid=151 stamp=669675778input archive log thread=1 sequence=46 recid=152 stamp=669679426input archive log thread=1 sequence=47 recid=156 stamp=669690456channel ch00: starting piece 1 at 02-NOV-08channel ch01: starting
13、archive log backupsetchannel ch01: specifying archive log(s in backup setinput archive log thread=1 sequence=53 recid=170 stamp=669767346input archive log thread=1 sequence=54 recid=172 stamp=669769357input archive log thread=2 sequence=44 recid=165 stamp=669764276input archive log thread=2 sequence
14、=45 recid=167 stamp=669765472input archive log thread=2 sequence=46 recid=168 stamp=669765474input archive log thread=2 sequence=47 recid=169 stamp=669767345input archive log thread=2 sequence=48 recid=171 stamp=669769352input archive log thread=2 sequence=49 recid=175 stamp=669769944channel ch01: s
15、tarting piece 1 at 02-NOV-08channel ch01: finished piece 1 at 02-NOV-08piece handle=/rmanset/RACDB_arch_98_1_2 tag=TAG20081102T231211 comment=NONE channel ch01: backup set complete, elapsed time: 00:00:04channel ch00: finished piece 1 at 02-NOV-08piece handle=/rmanset/RACDB_arch_97_1_1 tag=TAG200811
16、02T231211 comment=NONE channel ch00: backup set complete, elapsed time: 00:00:11channel ch00: starting archive log backupsetchannel ch00: specifying archive log(s in backup setinput archive log thread=1 sequence=48 recid=158 stamp=669690550input archive log thread=1 sequence=49 recid=160 stamp=66969
17、1146input archive log thread=1 sequence=50 recid=162 stamp=669755973input archive log thread=1 sequence=51 recid=163 stamp=669757116input archive log thread=1 sequence=52 recid=166 stamp=669764278input archive log thread=1 sequence=55 recid=173 stamp=669769375input archive log thread=1 sequence=56 r
18、ecid=174 stamp=669769928channel ch00: starting piece 1 at 02-NOV-08channel ch00: finished piece 1 at 02-NOV-08piece handle=/rmanset/RACDB_arch_99_1_1 tag=TAG20081102T231211 comment=NONE channel ch00: backup set complete, elapsed time: 00:00:08Finished backup at 02-NOV-08Starting backup at 02-NOV-08c
19、hannel ch00: starting full datafile backupsetchannel ch00: specifying datafile(s in backupsetincluding current control file in backupsetchannel ch00: starting piece 1 at 02-NOV-08channel ch00: finished piece 1 at 02-NOV-08piece handle=/rmanset/cf_RACDB_100_1 tag=TAG20081102T231235 comment=NONE chann
20、el ch00: backup set complete, elapsed time: 00:00:07Finished backup at 02-NOV-08released channel: ch00released channel: ch012. 在rac庫上創(chuàng)建pfileSQL create pfile=/rmanset/initracdb.ora from spfile;將rac1,rac2上的備份出來的rman文件和pfile ftp 至standby 主機(jī)二:standby 主機(jī)做恢復(fù)的過程:0.修改ftp過來的pfile,主要是rac中一些參數(shù)去掉:#*.cluster_dat
21、abase_instances=2*.cluster_database=false#racdb2.instance_number=2#racdb1.instance_number=1#racdb2.thread=2#racdb1.thread=1#racdb2.undo_tablespace=UNDOTBS2#*.db_file_name_convert=+RACDATA/racdb/datafile/,/oradata/racdb/#*.fal_client=RACDB#*.fal_server=STANDBY#*.log_archive_config=DG_CONFIG=(racdb,st
22、andby#racdb2.log_archive_dest_1=LOCATION=/racdb2_arch VALID_FOR=(ALL_LOGFILES,ALL_ROLES DB_UNIQUE_NAME=racdb #*.log_archive_dest_2=SERVICE=standby LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLEDB_UNIQUE_NAME=standby#*.log_archive_dest_state_2=ENABLE#*.log_file_name_convert=+RACDATA/racdb/onlinel
23、og/,/oradata/racdb/#*.remote_listener=LISTENERS_RACDB#*.standby_file_management=AUTO1.數(shù)據(jù)庫啟動(dòng)到nomount2.restore controlfile3.restore archivelog4.recover database5.改變logfile 的位置,重新建redo6.drop 一個(gè)undo tablespace.7.add a temp tablespace8. 配tnsnames.ora 和listener.ora下為操作的過程:standby- rman target /Recovery Ma
24、nager: Release .0 - Production on Sun Nov 2 14:22:39 2008 Copyright (c 1982, 2005, Oracle. All rights reserved.connected to target database: racdb (not mounted-恢復(fù)controlfileRMAN restore controlfile from /rmanset/cf_RACDB_100_1;Starting restore at 02-NOV-08using channel ORA_DISK_1channel ORA_
25、DISK_1: restoring control filechannel ORA_DISK_1: restore complete, elapsed time: 00:00:05output filename=/oradata/racdb/control01.ctlFinished restore at 02-NOV-08-restore datafile and archive logRMAN sql alter database mount;sql statement: alter database mountreleased channel: ORA_DISK_1RMAN run2 s
26、et until sequence 57 thread 1;3 set newname for datafile 1 to /oradata/racdb/system01.dbf;4 set newname for datafile 2 to /oradata/racdb/undotbs01.dbf;5 set newname for datafile 3 to /oradata/racdb/sysaux01.dbf;6 set newname for datafile 4 to /oradata/racdb/users01.dbf;7 set newname for datafile 5 t
27、o /oradata/racdb/undotbs02.dbf;8 restore database;9 switch datafile all;10 executing command: SET until clauseexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEStarting restore at 02-NOV-08allocated c
28、hannel: ORA_DISK_1channel ORA_DISK_1: sid=155 devtype=DISKchannel ORA_DISK_1: starting datafile backupset restorechannel ORA_DISK_1: specifying datafile(s to restore from backup set restoring datafile 00001 to /oradata/racdb/system01.dbfrestoring datafile 00004 to /oradata/racdb/users01.dbfrestoring
29、 datafile 00005 to /oradata/racdb/undotbs02.dbfchannel ORA_DISK_1: reading from backup piece /rmanset/racdb_full_RACDB669769770931 channel ORA_DISK_1: restored backup piece 1piece handle=/rmanset/racdb_full_RACDB669769770931 tag=FULLBACKUPchannel ORA_DISK_1: restore complete, elapsed time: 00:00:36c
30、hannel ORA_DISK_1: starting datafile backupset restorechannel ORA_DISK_1: specifying datafile(s to restore from backup setrestoring datafile 00002 to /oradata/racdb/undotbs01.dbfrestoring datafile 00003 to /oradata/racdb/sysaux01.dbfchannel ORA_DISK_1: reading from backup piece /rmanset/racdb_full_R
31、ACDB669769784941 channel ORA_DISK_1: restored backup piece 1piece handle=/rmanset/racdb_full_RACDB669769784941 tag=FULLBACKUPchannel ORA_DISK_1: restore complete, elapsed time: 00:00:35Finished restore at 02-NOV-08datafile 1 switched to datafile copyinput datafile copy recid=10 stamp=669738296 filen
32、ame=/oradata/racdb/system01.dbf datafile 2 switched to datafile copyinput datafile copy recid=11 stamp=669738296 filename=/oradata/racdb/undotbs01.dbf datafile 3 switched to datafile copyinput datafile copy recid=12 stamp=669738296 filename=/oradata/racdb/sysaux01.dbf datafile 4 switched to datafile
33、 copyinput datafile copy recid=13 stamp=669738297 filename=/oradata/racdb/users01.dbf datafile 5 switched to datafile copyinput datafile copy recid=14 stamp=669738297 filename=/oradata/racdb/undotbs02.dbf RMAN-列出備份的archivelog:RMAN list backup of archivelog all;using target database control file inst
34、ead of recovery catalogList of Backup Sets=BS Key Size Device Type Elapsed Time Completion Time- - - - -89 2.44M DISK 00:00:03 02-NOV-08BP Key: 89 Status: AVAILABLE Compressed: NO Tag: TAG20081102T231211 Piece Name: /rmanset/RACDB_arch_98_1_2List of Archived Logs in backup set 89Thrd Seq Low SCN Low
35、 Time Next SCN Next Time- - - - - -1 53 356353 02-NOV-08 396535 02-NOV-081 54 396535 02-NOV-08 398232 02-NOV-082 44 350717 02-NOV-08 356350 02-NOV-082 45 356350 02-NOV-08 376487 02-NOV-082 46 376487 02-NOV-08 396536 02-NOV-082 47 396536 02-NOV-08 397820 02-NOV-082 48 397820 02-NOV-08 398228 02-NOV-0
36、82 49 398228 02-NOV-08 398963 02-NOV-08BS Key Size Device Type Elapsed Time Completion Time- - - - -90 17.42M DISK 00:00:07 02-NOV-08BP Key: 90 Status: AVAILABLE Compressed: NO Tag: TAG20081102T231211 Piece Name: /rmanset/RACDB_arch_97_1_1List of Archived Logs in backup set 90Thrd Seq Low SCN Low Ti
37、me Next SCN Next Time- - - - - -1 42 285767 01-NOV-08 285925 01-NOV-081 44 286441 01-NOV-08 286516 01-NOV-081 45 286516 01-NOV-08 308174 01-NOV-081 46 308174 01-NOV-08 312441 01-NOV-081 47 312441 01-NOV-08 324657 02-NOV-08BS Key Size Device Type Elapsed Time Completion Time- - - - -91 9.69M DISK 00:
38、00:04 02-NOV-08BP Key: 91 Status: AVAILABLE Compressed: NO Tag: TAG20081102T231211 Piece Name: /rmanset/RACDB_arch_99_1_1List of Archived Logs in backup set 91Thrd Seq Low SCN Low Time Next SCN Next Time- - - - - -1 48 324657 02-NOV-08 324727 02-NOV-081 49 324727 02-NOV-08 325613 02-NOV-081 50 32561
39、3 02-NOV-08 349040 02-NOV-081 51 349040 02-NOV-08 350714 02-NOV-081 52 350714 02-NOV-08 356353 02-NOV-081 55 398232 02-NOV-08 398433 02-NOV-081 56 398433 02-NOV-08 398960 02-NOV-08-restore archivelog and recover database.RMANRMAN run2 set archivelog destination to /racdb_arch;3 restore archivelog fr
40、om sequence 49 thread 2;4executing command: SET ARCHIVELOG DESTINATIONStarting restore at 02-NOV-08using channel ORA_DISK_1channel ORA_DISK_1: starting archive log restore to user-specified destination archive log destination=/racdb_archchannel ORA_DISK_1: restoring archive logarchive log thread=2 s
41、equence=49channel ORA_DISK_1: reading from backup piece /rmanset/RACDB_arch_98_1_2 channel ORA_DISK_1: restored backup piece 1piece handle=/rmanset/RACDB_arch_98_1_2 tag=TAG20081102T231211 channel ORA_DISK_1: restore complete, elapsed time: 00:00:02Finished restore at 02-NOV-08RMANRMANRMAN run2 set
42、archivelog destination to /racdb_arch;3 restore archivelog from sequence 44 thread 2;4 executing command: SET ARCHIVELOG DESTINATIONStarting restore at 02-NOV-08using channel ORA_DISK_1archive log thread 2 sequence 49 is already on disk as file /racdb_arch/2_49_669487401.dbf channel ORA_DISK_1: star
43、ting archive log restore to user-specified destinationarchive log destination=/racdb_archchannel ORA_DISK_1: restoring archive logarchive log thread=2 sequence=44channel ORA_DISK_1: restoring archive logarchive log thread=2 sequence=45channel ORA_DISK_1: restoring archive logarchive log thread=2 seq
44、uence=46channel ORA_DISK_1: restoring archive logarchive log thread=2 sequence=47channel ORA_DISK_1: restoring archive logarchive log thread=2 sequence=48channel ORA_DISK_1: reading from backup piece /rmanset/RACDB_arch_98_1_2channel ORA_DISK_1: restored backup piece 1piece handle=/rmanset/RACDB_arc
45、h_98_1_2 tag=TAG20081102T231211channel ORA_DISK_1: restore complete, elapsed time: 00:00:02Finished restore at 02-NOV-08RMAN run2 set until sequence 57 thread 1;3 recover database;4 executing command: SET until clauseStarting recover at 02-NOV-08using channel ORA_DISK_1starting media recoveryarchive
46、 log thread 2 sequence 49 is already on disk as file /racdb_arch/2_49_669487401.dbfchannel ORA_DISK_1: starting archive log restore to default destinationchannel ORA_DISK_1: restoring archive logarchive log thread=1 sequence=56channel ORA_DISK_1: reading from backup piece /rmanset/RACDB_arch_99_1_1c
47、hannel ORA_DISK_1: restored backup piece 1piece handle=/rmanset/RACDB_arch_99_1_1 tag=TAG20081102T231211channel ORA_DISK_1: restore complete, elapsed time: 00:00:02archive log filename=/racdb_arch/1_56_669487401.dbf thread=1 sequence=56archive log filename=/racdb_arch/2_49_669487401.dbf thread=2 seq
48、uence=49media recovery complete, elapsed time: 00:00:01Finished recover at 02-NOV-08-對(duì)redo 作修改:alter database rename file +RACDATA/racdb/onlinelog/group_1.257.669487411 to /oradata/racdb/redo1; alter database rename file +RACDATA/racdb/onlinelog/group_2.258.669487419 to /oradata/racdb/redo2; alter d
49、atabase rename file +RACDATA/racdb/onlinelog/group_3.265.669489319 to /oradata/racdb/redo3; alter database rename file +RACDATA/racdb/onlinelog/group_4.266.669489327 to /oradata/racdb/redo4;SQL select member from v$logfile;MEMBER-+RACDATA/racdb/onlinelog/group_1.257.669487411+RACDATA/racdb/onlinelog
50、/group_2.258.669487419+RACDATA/racdb/onlinelog/group_3.265.669489319+RACDATA/racdb/onlinelog/group_4.266.669489327SQL alter database rename file +RACDATA/racdb/onlinelog/group_1.257.669487411 to /oradata/racdb/redo1; Database altered.SQL alter database rename file +RACDATA/racdb/onlinelog/group_2.25
51、8.669487419 to /oradata/racdb/redo2; alter database rename file +RACDATA/racdb/onlinelog/group_3.265.669489319 to /oradata/racdb/redo3;alter database rename file +RACDATA/racdb/onlinelog/group_4.266.669489327 to /oradata/racdb/redo4; Database altered.SQLDatabase altered.SQLDatabase altered.SQL alter
52、 database open resetlogs;Database altered.SQLSQLSQL select THREAD#, STATUS, ENABLED from v$thread;THREAD# STATUS ENABLED- - -1 OPEN PUBLIC2 CLOSED PUBLICSQLSQL select group# from v$log where THREAD#=2;GROUP#-34SQL alter database disable thread 2;Database altered.SQL alter database drop logfile group 4;alter database drop logfile group 4*ERROR at line 1:ORA-00350: log 4 of instance racdb2 (thread 2 needs
溫馨提示
- 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ì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 縣級(jí)疾病預(yù)防控制機(jī)構(gòu)慢病預(yù)防控制工作規(guī)范
- 2025年甲基六氫苯酐項(xiàng)目發(fā)展計(jì)劃
- 2025年加工羽毛(絨)項(xiàng)目建議書
- 2025年高性能傳輸線纜項(xiàng)目合作計(jì)劃書
- 2025年電視制式轉(zhuǎn)換器項(xiàng)目發(fā)展計(jì)劃
- 2025年動(dòng)態(tài)心電圖監(jiān)測系統(tǒng)設(shè)備合作協(xié)議書
- 2025年汽車內(nèi)外飾件項(xiàng)目發(fā)展計(jì)劃
- 2025年文化產(chǎn)業(yè)專項(xiàng)資金申請(qǐng)報(bào)告:文化產(chǎn)業(yè)發(fā)展專項(xiàng)資金分配機(jī)制研究
- 智能投顧平臺(tái)風(fēng)控合規(guī)運(yùn)營風(fēng)險(xiǎn)管理策略與合規(guī)執(zhí)行風(fēng)險(xiǎn)預(yù)警系統(tǒng)應(yīng)用報(bào)告
- 制造業(yè)數(shù)字化轉(zhuǎn)型數(shù)據(jù)治理在2025年的創(chuàng)新路徑與挑戰(zhàn)應(yīng)對(duì)策略分析
- 四年級(jí)上冊(cè) 口算題 1000題
- 九上道法知識(shí)點(diǎn)梳理(全冊(cè))-九年級(jí)道德與法治上冊(cè)必備知識(shí)梳理總結(jié)(部編版)
- YB/T 5202.1-2003不定形耐火材料試樣制備方法第1部分:耐火澆注料
- GB/T 700-2006碳素結(jié)構(gòu)鋼
- GB/T 41419-2022數(shù)字化試衣虛擬人體用術(shù)語和定義
- GB/T 24218.1-2009紡織品非織造布試驗(yàn)方法第1部分:單位面積質(zhì)量的測定
- GB/T 1633-2000熱塑性塑料維卡軟化溫度(VST)的測定
- 《病毒學(xué)》(研究生)全冊(cè)配套完整課件
- 第十七章其他熔化焊接與熱切割作業(yè)課件
- 腧穴總論 2特定穴課件
- 數(shù)顯壓力表說明書
評(píng)論
0/150
提交評(píng)論