RMAN Catalog環境下異機全庫恢復例項
Step0 建立初始環境: 建立Linux 環境 安裝Oracle 10.2.0.1並打補丁到10.2.0.4 建立掛載點,並掛載NFS卷 mount -o rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,vers=3,timeo=600,actimeo=0 10.192.28.245:/data/rmandata /rmandata/ Step1 建立密碼檔案與初始化檔案: rmancd \u01\product\oracle\dbs rman$orapwd file=orapwytedi password=password entries=5 rman$cat > initytedi.ora db_name=ytedi rman$cat initytedi.ora db_name=ytedi step2 恢復spfile: rman$rman target / catalog rmaner/rmaner@catalog Recovery Manager: Release 10.2.0.4.0 - Production on Tue Apr 10 17:12:18 2012 Copyright (c) 1982, 2007, Oracle. All rights reserved. connected to target database (not started) connected to recovery catalog database RMAN> startup nomount; Oracle instance started Total System Global Area 113246208 bytes Fixed Size 1266080 bytes Variable Size 58723936 bytes Database Buffers 50331648 bytes Redo Buffers 2924544 bytes RMAN> RMAN> restore spfile; Starting restore at 10-APR-12 allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=36 devtype=DISK channel ORA_DISK_1: starting datafile backupset restore channel ORA_DISK_1: restoring SPFILE output filename=/u01/product/oracle/dbs/spfileytedi.ora channel ORA_DISK_1: reading from backup piece /rmandata/10.192.29.56/ytedi_l2_201204090310_c-480066880-20120409-00 channel ORA_DISK_1: restored backup piece 1 piece handle=/rmandata/10.192.29.56/ytedi_l2_201204090310_c-480066880-20120409-00 tag=TAG20120409T150631 channel ORA_DISK_1: restore complete, elapsed time: 00:00:02 Finished restore at 10-APR-12 RMAN> exit Recovery Manager complete. Step3 重新使用spfile啟動到nomount狀態: rman$sqlplus / as sysdba SQL*Plus: Release 10.2.0.4.0 - Production on Tue Apr 10 17:19:56 2012 Copyright (c) 1982, 2007, Oracle. All Rights Reserved. Connected to: Oracle Database Enterprise Edition Release 10.2.0.4.0 - Production With the Partitioning, Oracle Label Security, OLAP, Mining Scoring Engine and Real Application Testing options SQL> shutdown abort ORACLE instance shut down. SQL> startup nomount ORACLE instance started. Total System Global Area 608174080 bytes Fixed Size 1268920 bytes Variable Size 176161608 bytes Database Buffers 427819008 bytes Redo Buffers 2924544 bytes SQL> Step4 根據spfile內容建立所需的目錄: SQL> create pfile from spfile SQL> ! rman$cd /u01/product/oracle/dbs/ rman$cat initytedi.ora ytedi.__db_cache_size=427819008 ytedi.__java_pool_size=4194304 ytedi.__large_pool_size=4194304 ytedi.__shared_pool_size=159383552 ytedi.__streams_pool_size=8388608 *.audit_file_dest='/u01/product/admin/ytedi/adump' *.audit_trail='DB' *.background_dump_dest='/u01/product/admin/ytedi/bdump' *.compatible='10.2.0.3.0' *.control_files='/u01/product/oradata/ytedi/control01.ctl','/u01/product/oradata/ytedi/control02.ctl','/u01/product/oradata/ytedi/control03.ctl','/data/ytedi/control04.ctl'#RestoreControlfile *.core_dump_dest='/u01/product/admin/ytedi/cdump' *.db_block_size=8192 *.db_domain='' *.db_file_multiblock_read_count=16 *.db_name='ytedi' *.db_recovery_file_dest='/u01/product/flash_recovery_area' *.db_recovery_file_dest_size=2147483648 *.dg_broker_start=FALSE *.dispatchers='(PROTOCOL=TCP) (SERVICE=ytediXDB)' *.job_queue_processes=10 *.log_archive_dest_1='LOCATION=/data/ytedi/arch' *.log_archive_dest_2='' *.log_archive_format='%t_%s_%r.arc' *.open_cursors=300 *.pga_aggregate_target=201326592 *.processes=500 *.remote_login_passwordfile='EXCLUSIVE' *.sessions=555 *.sga_target=605028352 *.undo_management='AUTO' *.undo_retention=10800 *.undo_tablespace='UNDOTBS1' *.user_dump_dest='/u01/product/admin/ytedi/udump' rman$ rman$mkdir -p /u01/product/oradata/ytedi/ rman$mkdir -p /u01/product/admin/ytedi/bdump/ rman$mkdir -p /u01/product/admin/ytedi/adump/ rman$mkdir -p /u01/product/admin/ytedi/cdump/ rman$mkdir -p /u01/product/flash_recovery_area rman$mkdir -p /data/ytedi rman$exit exit SQL> exit Step5 控制檔案: rman$rman target / catalog rmaner/rmaner@catalog Recovery Manager: Release 10.2.0.4.0 - Production on Tue Apr 10 17:24:20 2012 Copyright (c) 1982, 2007, Oracle. All rights reserved. connected to target database: ytedi (not mounted) connected to recovery catalog database RMAN> restore controlfile; Starting restore at 10-APR-12 allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=541 devtype=DISK channel ORA_DISK_1: starting datafile backupset restore channel ORA_DISK_1: restoring control file channel ORA_DISK_1: reading from backup piece /rmandata/10.192.29.56/ytedi_l2_201204100310_c-480066880-20120410-00 channel ORA_DISK_1: restored backup piece 1 piece handle=/rmandata/10.192.29.56/ytedi_l2_201204100310_c-480066880-20120410-00 tag=TAG20120410T033015 channel ORA_DISK_1: restore complete, elapsed time: 00:00:15 output filename=/u01/product/oradata/ytedi/control01.ctl output filename=/u01/product/oradata/ytedi/control02.ctl output filename=/u01/product/oradata/ytedi/control03.ctl output filename=/data/ytedi/control04.ctl Finished restore at 10-APR-12 RMAN> Step6 使用新恢復的控制檔案mount資料庫: RMAN> alter database mount; database mounted released channel: ORA_DISK_1 RMAN> Step7 Restore資料庫: RMAN> restore database; Starting restore at 10-APR-12 Starting implicit crosscheck backup at 10-APR-12 allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=541 devtype=DISK Crosschecked 94 objects Finished implicit crosscheck backup at 10-APR-12 Starting implicit crosscheck copy at 10-APR-12 using channel ORA_DISK_1 Finished implicit crosscheck copy at 10-APR-12 searching for all files in the recovery area cataloging files... no files cataloged using channel ORA_DISK_1 channel ORA_DISK_1: starting datafile backupset restore channel ORA_DISK_1: specifying datafile(s) to restore from backup set restoring datafile 00001 to /u01/product/oradata/ytedi/system01.dbf restoring datafile 00003 to /u01/product/oradata/ytedi/sysaux01.dbf restoring datafile 00004 to /u01/product/oradata/ytedi/users01.dbf restoring datafile 00005 to /data/ytedi/edibase_data01.dbf restoring datafile 00007 to /data/ytedi/edilog_index01.dbf channel ORA_DISK_1: reading from backup piece /rmandata/10.192.29.56/ytedi_l0_201204080310_p2n7skl7 ...... piece handle=/rmandata/10.192.29.56/ytedi_l0_201204080310_p8n7slmo tag=YTEDI_L0_201204080310 channel ORA_DISK_1: restore complete, elapsed time: 00:02:56 channel ORA_DISK_1: starting datafile backupset restore channel ORA_DISK_1: specifying datafile(s) to restore from backup set restoring datafile 00002 to /u01/product/oradata/ytedi/undotbs01.dbf restoring datafile 00006 to /data/ytedi/edibase_data02.dbf channel ORA_DISK_1: reading from backup piece /rmandata/10.192.29.56/ytedi_l0_201204080310_p9n7slt5 channel ORA_DISK_1: restored backup piece 1 piece handle=/rmandata/10.192.29.56/ytedi_l0_201204080310_p9n7slt5 tag=YTEDI_L0_201204080310 channel ORA_DISK_1: restore complete, elapsed time: 00:00:37 Finished restore at 10-APR-12 Step8 Recover資料庫: RMAN> recover database; Starting recover at 10-APR-12 using channel ORA_DISK_1 channel ORA_DISK_1: starting incremental datafile backupset restore channel ORA_DISK_1: specifying datafile(s) to restore from backup set destination for restore of datafile 00001: /u01/product/oradata/ytedi/system01.dbf destination for restore of datafile 00003: /u01/product/oradata/ytedi/sysaux01.dbf destination for restore of datafile 00004: /u01/product/oradata/ytedi/users01.dbf destination for restore of datafile 00005: /data/ytedi/edibase_data01.dbf destination for restore of datafile 00007: /data/ytedi/edilog_index01.dbf ...... channel ORA_DISK_1: starting archive log restore to default destination channel ORA_DISK_1: restoring archive log archive log thread=1 sequence=7910 channel ORA_DISK_1: reading from backup piece /rmandata/10.192.29.56/ytedi_l2_201204100310_arc_q0n81ui4 channel ORA_DISK_1: restored backup piece 1 piece handle=/rmandata/10.192.29.56/ytedi_l2_201204100310_arc_q0n81ui4 tag=YTEDI_ARC_201204100310 channel ORA_DISK_1: restore complete, elapsed time: 00:00:02 archive log filename=/data/ytedi/arch1_7910_708618624.arc thread=1 sequence=7910 unable to find archive log archive log thread=1 sequence=7911 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of recover command at 04/10/2012 20:16:40 RMAN-06054: media recovery requesting unknown log: thread 1 seq 7911 lowscn 11859098336858 RMAN> Step9 使用Resetlogs選項開啟資料庫: RMAN> alter database open resetlogs; database opened new incarnation of database registered in recovery catalog starting full resync of recovery catalog full resync complete RMAN> |
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/196700/viewspace-739826/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- RMAN備份異機恢復
- Oracle 備份恢復篇之RMAN catalogOracle
- 【RMAN】在多租戶環境下的RMAN備份及恢復
- RMAN備份恢復典型案例——異機恢復未知DBID
- rman備份異機恢復(原創)
- 備份恢復Lesson 04.Using the RMAN Recovery Catalog
- ORACLE 11.2.0.4 RAC RMAN異機恢復之ORA-15001Oracle
- RMAN資料庫恢復異常報錯ORA-01180資料庫
- 【資料庫資料恢復】LINUX環境下ORACLE資料庫誤刪除的資料恢復資料庫資料恢復LinuxOracle
- RMAN增量恢復
- 通過rman為客戶實現linux下oracle11.2.0.4到windows下oracle同版本資料庫的異機恢復。LinuxOracleWindows資料庫
- ORACLE DG從庫 Rman備份恢復Oracle
- rac恢復到單例項單例
- 透過搭建恢復目錄實現RMAN異地備份和恢復
- oracle 異機恢復Oracle
- 【12c 庫異機恢復】實驗
- G017-ORACLE-MIGRATION-01 RMAN備份異機不完全恢復Oracle
- 【伺服器虛擬化資料恢復】Xen Server環境下資料庫資料恢復案例伺服器資料恢復Server資料庫
- RMAN恢復實踐
- 記錄一次Oracle 11.2.0.4 RAC異地恢復到單例項Oracle單例
- RMAN恢復之RMAN-06555處理
- 【資料庫資料恢復】ASM例項不能掛載的Oracle資料庫資料恢復案例資料庫資料恢復ASMOracle
- 將RAC備份集恢復為單例項資料庫單例資料庫
- oracle資料庫跨平臺(AIX)從RAC恢復至(linux)下的單例項Oracle資料庫AILinux單例
- RMAN備份恢復技巧
- Oracle RMAN恢復測試Oracle
- rman 增量備份恢復
- 【資料庫資料恢復】Oracle ASM例項無法掛載的資料恢復案例資料庫資料恢復OracleASM
- Oracle ADG環境下的RMAN備份策略Oracle
- RMAN備份恢復典型案例——資料庫卡頓資料庫
- 【資料庫資料恢復】mdb_catalog.wt檔案丟失的MongoDB資料恢復案例資料庫資料恢復MongoDB
- 從nub備份恢復(同平臺)恢復RAC至單例項單例
- 查詢RMAN恢復進度
- Oracle RMAN 表空間恢復Oracle
- RMAN之環境配置(一)
- 兩篇oracle異機恢復文章Oracle
- mysql資料庫恢復一例MySql資料庫
- 【伺服器資料恢復】AIX系統環境下LV被破壞如何恢復資料?伺服器資料恢復AI
- 【伺服器資料恢復】Linux環境下RAID6磁碟陣列資料恢復案例伺服器資料恢復LinuxAI陣列