【kingsql分享】將RAC資料庫異機恢復到單例項(Ⅰ)
本文將陸續講述如何將一個RAC資料庫,異機恢復到單例項
實驗的大致思路是,備份一個RAC資料庫,把RMAN備份集複製到一個單機,然後透過RMAN做異機恢復,恢復成單例項資料庫
本實驗的意義在於,當只剩下一個節點或者資料庫全癱瘓的狀態下,應急恢復業務
1.建立測試使用者
建立一個使用者hongzhuohui,賦予DBA許可權,用於建立測試表
SYS@testora2%10gR2> create user hongzhuohui identified by oracle;
User created.
SYS@testora2%10gR2> grant dba to hongzhuohui;
Grant succeeded.
2.檢視例項名
登入第二個節點的資料庫,檢視例項名為testora2,那麼資料庫名其實是testora
SYS@testora2%10gR2> select instance_name from v$instance;
INSTANCE_NAME
----------------
testora2
3.建立測試表
在hongzhuohui使用者裡建立測試表,那麼做全備份之後,恢復之後,如果資料庫裡有這個表,則證明實驗成功
SYS@testora2%10gR2> conn hongzhuohui/oracle
Connected.
SYS@testora2%10gR2> create table test001 (x int);
Table created.
SYS@testora2%10gR2> insert into test001 values (99);
1 row created.
SYS@testora2%10gR2> commit;
Commit complete.
SYS@testora2%10gR2> select * from test001;
X
----------
99
SYS@testora2%10gR2> show user;
USER is "hongzhuohui"
4.備份資料庫
對testora2做全備份,記錄資料庫DBID 676818789使用者恢復
[oracle@rac2 ~]$ rman target /
Recovery Manager: Release 10.2.0.1.0 - Production on Sun Nov 9 22:18:58 2014
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: TESTORA (DBID=676818789)
RMAN> run
{
allocate channel d1 type disk maxpiecesize 4000m ;
backup as compressed backupset incremental level = 0 database
format '/home/oracle/xpg/db_%d_%s_%p_%T'
plus archivelog skip inaccessible delete all input
format '/home/oracle/xpg/log_%d_%s_%p_%T';
SYS@testora2%10gR2 'alter system archive log current';
release channel d1;
}2> 3> 4> 5> 6> 7> 8> 9> 10>
using target database control file instead of recovery catalog
allocated channel: d1
channel d1: sid=141 instance=testora2 devtype=DISK
Starting backup at 09-NOV-14
current log archived
channel d1: starting compressed archive log backupset
channel d1: specifying archive log(s) in backup set
input archive log thread=1 sequence=42 recid=27 stamp=863192962
input archive log thread=1 sequence=43 recid=30 stamp=863216434
input archive log thread=2 sequence=15 recid=28 stamp=863192967
input archive log thread=2 sequence=16 recid=29 stamp=863216065
input archive log thread=2 sequence=17 recid=31 stamp=863216438
channel d1: starting piece 1 at 09-NOV-14
channel d1: finished piece 1 at 09-NOV-14
piece handle=/home/oracle/xpg/log_TESTORA_5_1_20141109 tag=TAG20141109T222038 comment=NONE
channel d1: backup set complete, elapsed time: 00:00:02
channel d1: deleting archive log(s)
archive log filename=+DATA/testora/1_42_854718629.dbf recid=27 stamp=863192962
archive log filename=+DATA/testora/1_43_854718629.dbf recid=30 stamp=863216434
archive log filename=+DATA/testora/2_15_854718629.dbf recid=28 stamp=863192967
archive log filename=+DATA/testora/2_16_854718629.dbf recid=29 stamp=863216065
archive log filename=+DATA/testora/2_17_854718629.dbf recid=31 stamp=863216438
Finished backup at 09-NOV-14
Starting backup at 09-NOV-14
channel d1: starting compressed incremental level 0 datafile backupset
channel d1: specifying datafile(s) in backupset
input datafile fno=00001 name=+DATA/testora/datafile/system.259.854718649
input datafile fno=00002 name=+DATA/testora/datafile/undotbs1.260.854718659
input datafile fno=00003 name=+DATA/testora/datafile/sysaux.261.854718665
input datafile fno=00004 name=+DATA/testora/datafile/undotbs2.263.854718673
input datafile fno=00005 name=+DATA/testora/datafile/users.264.854718679
channel d1: starting piece 1 at 09-NOV-14
channel d1: finished piece 1 at 09-NOV-14
piece handle=/home/oracle/xpg/db_TESTORA_6_1_20141109 tag=TAG20141109T222042 comment=NONE
channel d1: backup set complete, elapsed time: 00:01:05
channel d1: starting compressed incremental level 0 datafile backupset
channel d1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel d1: starting piece 1 at 09-NOV-14
channel d1: finished piece 1 at 09-NOV-14
piece handle=/home/oracle/xpg/db_TESTORA_7_1_20141109 tag=TAG20141109T222042 comment=NONE
channel d1: backup set complete, elapsed time: 00:00:05
Finished backup at 09-NOV-14
Starting backup at 09-NOV-14
current log archived
channel d1: starting compressed archive log backupset
channel d1: specifying archive log(s) in backup set
input archive log thread=1 sequence=44 recid=32 stamp=863216513
input archive log thread=2 sequence=18 recid=33 stamp=863216513
channel d1: starting piece 1 at 09-NOV-14
channel d1: finished piece 1 at 09-NOV-14
piece handle=/home/oracle/xpg/log_TESTORA_8_1_20141109 tag=TAG20141109T222153 comment=NONE
channel d1: backup set complete, elapsed time: 00:00:02
channel d1: deleting archive log(s)
archive log filename=+DATA/testora/1_44_854718629.dbf recid=32 stamp=863216513
archive log filename=+DATA/testora/2_18_854718629.dbf recid=33 stamp=863216513
Finished backup at 09-NOV-14
SQL statement: alter system archive log current
released channel: d1
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28389881/viewspace-1329370/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- RMAN異機恢復:RAC到單例項單例
- RAC資料庫恢復到單例項資料庫資料庫單例
- 恢復RAC資料庫到單例項(ASM)資料庫單例ASM
- 【RAC】將單例項備份集恢復為rac資料庫單例資料庫
- 【RAC】將RAC備份集恢復為單例項資料庫單例資料庫
- 將RAC備份集恢復為單例項資料庫單例資料庫
- rac恢復到單例項單例
- Oracle 11.2.0.4 從單例項,使用RMAN 異機恢復到RACOracle單例
- RAC asm恢復到單例項ASM單例
- RAC從帶庫到單例項的恢復單例
- 單例項恢復RAC資料庫步驟(三)單例資料庫
- 單例項恢復RAC資料庫步驟(二)單例資料庫
- 單例項恢復RAC資料庫步驟(一)單例資料庫
- RAC 資料庫恢復到單例項下並且基於時間點恢復資料庫單例
- RAC資料庫的RMAN備份異機恢復到單節點資料庫資料庫
- rac到單例項的rman恢復單例
- rac asm 恢復到 單例項 1ASM單例
- rac asm 恢復到 單例項 2ASM單例
- RAC恢復到單例項節點上單例
- 恢復rac db(raw)到單例項下單例
- 單例項備份集恢復到RAC單例
- 11G RAC 異機恢復至單例項測試單例
- 單例項環境利用備份恢復RAC資料庫(四)單例資料庫
- 單例項環境利用備份恢復RAC資料庫(三)單例資料庫
- 單例項環境利用備份恢復RAC資料庫(二)單例資料庫
- 單例項環境利用備份恢復RAC資料庫(一)單例資料庫
- 單例項恢復至RAC單例
- 記錄一次Oracle 11.2.0.4 RAC異地恢復到單例項Oracle單例
- 10g rac asm 恢復到 單例項(二)ASM單例
- 10g rac asm 恢復到 單例項(一)ASM單例
- 【kingsql分享】RAC11G 恢復OCRSQL
- 將Oracle 10g RAC庫用rman 的方式備份並恢復到異機單機Oracle 10g
- DM7 RAC資料庫恢復成單機資料庫資料庫
- 將Oracle 10g RAC庫用rman 的方式備份並恢復到異機單機-3Oracle 10g
- 將Oracle 10g RAC庫用rman 的方式備份並恢復到異機單機 -2Oracle 10g
- 單例項備份恢復成RAC單例
- 【實驗】Oracle 10g RAC生產資料庫RMAN方式恢復到異地單機資料庫全程記錄Oracle 10g資料庫
- 資料庫異機冷備恢復資料庫