oracle rac在裸裝置下的恢復
上一篇已經介紹了oracle rac在裸裝置下的備份,這一篇介紹在oracle rac在裸裝置下的恢復
首先備份並刪除上次全備份以來的歸檔日誌,然後準備開始恢復:
RMAN> run
2> {
3> allocate channel c1 device type disk format '/oradata/%U' connect ;
4> allocate channel c2 device type disk format '/oradata/%U' connect ;
5> backup archivelog all delete all input;
6> }
然後兩個節點都啟動到mount狀態:
rac1
rman target /
startup mount;
rac2
rman target /
startup mount;
如果只啟動其中一個節點,恢復資料檔案會不成功
RMAN> run
2> {
3> allocate channel c1 device type disk format '/oradata/U%' connect ;
4> allocate channel c2 device type disk format '/oradata/U%' connect ;
5> restore database;
6> }
allocated channel: c1
channel c1: sid=145 instance=rac1 devtype=DISK
allocated channel: c2
channel c2: sid=144 instance=rac2 devtype=DISK
Starting restore at 04-JAN-09
channel c1: starting datafile backupset restore
channel c1: specifying datafile(s) to restore from backup set
restoring datafile 00002 to +DISKGROUP/rac/datafile/undotbs1.269.669804571
restoring datafile 00003 to +DISKGROUP/rac/datafile/sysaux.270.669804585
restoring datafile 00005 to +DISKGROUP/rac/datafile/users.278.672888597
restoring datafile 00007 to /oradata/paul01.dbf
channel c1: reading from backup piece /oradata/19k3trip_1_1
channel c2: starting datafile backupset restore
channel c2: specifying datafile(s) to restore from backup set
restoring datafile 00001 to +DISKGROUP/rac/datafile/system.268.669804533
channel c2: reading from backup piece /oradata/1ak3trjc_1_1
channel c1: restored backup piece 1
piece handle=/oradata/19k3trip_1_1 tag=TAG20090103T230808
channel c1: restore complete, elapsed time: 00:00:52
channel c1: starting datafile backupset restore
channel c1: specifying datafile(s) to restore from backup set
restoring datafile 00004 to +DISKGROUP/rac/datafile/undotbs2.272.669804611
channel c1: reading from backup piece /oradata/1bk3trjr_1_1
channel c2: restored backup piece 1
piece handle=/oradata/1ak3trjc_1_1 tag=TAG20090103T230808
channel c2: restore complete, elapsed time: 00:00:54
channel c1: restored backup piece 1
piece handle=/oradata/1bk3trjr_1_1 tag=TAG20090103T230808
channel c1: restore complete, elapsed time: 00:00:20
channel c1: starting datafile backupset restore
channel c1: specifying datafile(s) to restore from backup set
restoring datafile 00006 to +DISKGROUP/rac/datafile/test.277.669863437
channel c1: reading from backup piece /oradata/1ck3trk0_1_1
channel c1: restored backup piece 1
piece handle=/oradata/1ck3trk0_1_1 tag=TAG20090103T230808
channel c1: restore complete, elapsed time: 00:00:07
Finished restore at 04-JAN-09
released channel: c1
released channel: c2
現在連線到兩個例項恢復歸檔日誌檔案
RMAN> run
2> {
3> allocate channel c1 device type disk format '/oradata/U%' connect ;
allocate channel c2 device type disk format '/oradata/U%' connect ;
restore (archivelog sequence between 9 and 11 thread 1)
(archivelog sequence between 9 and 11 thread 2);4> 5> 6>
7> }
allocated channel: c1
channel c1: sid=145 instance=rac1 devtype=DISK
allocated channel: c2
channel c2: sid=144 instance=rac2 devtype=DISK
Starting restore at 04-JAN-09
channel c1: starting archive log restore to default destination
channel c1: restoring archive log
archive log thread=1 sequence=9
channel c1: restoring archive log
archive log thread=1 sequence=10
channel c1: restoring archive log
archive log thread=1 sequence=11
channel c1: reading from backup piece /oradata/1gk3u31j_1_1
channel c2: starting archive log restore to default destination
channel c2: restoring archive log
archive log thread=2 sequence=9
channel c2: restoring archive log
archive log thread=2 sequence=10
channel c2: reading from backup piece /oradata/1hk3u311_1_1
channel c1: restored backup piece 1
piece handle=/oradata/1gk3u31j_1_1 tag=TAG20090104T011530
channel c1: restore complete, elapsed time: 00:00:04
channel c2: restored backup piece 1
piece handle=/oradata/1hk3u311_1_1 tag=TAG20090104T011530
channel c2: restore complete, elapsed time: 00:00:05
channel c2: starting archive log restore to default destination
channel c2: restoring archive log
archive log thread=2 sequence=11
channel c2: reading from backup piece /oradata/1ik3u318_1_1
channel c2: restored backup piece 1
piece handle=/oradata/1ik3u318_1_1 tag=TAG20090104T011530
channel c2: restore complete, elapsed time: 00:00:00
Finished restore at 04-JAN-09
released channel: c1
released channel: c2
介質恢復
RMAN> run
{
allocate channel c1 device type disk format '/oradata/U%' connect ;
allocate channel c2 device type disk format '/oradata/U%' connect ; 2> 3> 4>
5> recover database;
6> }
allocated channel: c1
channel c1: sid=145 instance=rac1 devtype=DISK
allocated channel: c2
channel c2: sid=144 instance=rac2 devtype=DISK
Starting recover at 04-JAN-09
starting media recovery
archive log thread 1 sequence 9 is already on disk as file /arch/1_9_675209275.dbf
archive log thread 1 sequence 10 is already on disk as file /arch/1_10_675209275.dbf
archive log thread 1 sequence 11 is already on disk as file /arch/1_11_675209275.dbf
channel c1: starting archive log restore to default destination
channel c1: restoring archive log
archive log thread=1 sequence=8
channel c1: reading from backup piece /oradata/1dk3trkt_1_1
channel c1: restored backup piece 1
piece handle=/oradata/1dk3trkt_1_1 tag=TAG20090103T230917
channel c1: restore complete, elapsed time: 00:00:01
archive log filename=/arch/1_8_675209275.dbf thread=1 sequence=8
channel c2: starting archive log restore to default destination
channel c1: starting archive log restore to default destination
channel c2: restoring archive log
archive log thread=2 sequence=9
channel c1: restoring archive log
archive log thread=2 sequence=8
channel c1: reading from backup piece /oradata/1ek3trkv_1_1
channel c2: restoring archive log
archive log thread=2 sequence=10
channel c2: reading from backup piece /oradata/1hk3u311_1_1
channel c1: restored backup piece 1
piece handle=/oradata/1ek3trkv_1_1 tag=TAG20090103T230917
channel c1: restore complete, elapsed time: 00:00:02
archive log filename=/arch/2_8_675209275.dbf thread=2 sequence=8
archive log filename=/arch/1_9_675209275.dbf thread=1 sequence=9
channel c2: restored backup piece 1
piece handle=/oradata/1hk3u311_1_1 tag=TAG20090104T011530
channel c2: restore complete, elapsed time: 00:00:03
failover to previous backup
archive log filename=/arch/2_9_675209275.dbf thread=2 sequence=9
released channel: c1
released channel: c2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 01/04/2009 01:38:24
RMAN-11003: failure during parse/execution of SQL statement: alter database recover logfile '/arch/2_9_675209275.dbf'
ORA-00308: cannot open archived log '/arch/2_9_675209275.dbf'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
但是對於恢復(RECOVER)操作,只能一個例項完成。
這是因為一個例項必須能同時看到兩個例項的歸檔日誌,這裡採用最簡單的方法,將節點2上的歸檔複製到節點1的歸檔目錄下。 拷過去恢復就可以了
RMAN> run
{
allocate channel c1 device type disk format '/oradata/U%' connect ;
allocate channel c2 device type disk format '/oradata/U%' connect ; 2> 3> 4>
5> recover database;
6> }
allocated channel: c1
channel c1: sid=145 instance=rac1 devtype=DISK
allocated channel: c2
channel c2: sid=144 instance=rac2 devtype=DISK
Starting recover at 04-JAN-09
starting media recovery
archive log thread 1 sequence 9 is already on disk as file /arch/1_9_675209275.dbf
archive log thread 1 sequence 10 is already on disk as file /arch/1_10_675209275.dbf
archive log thread 1 sequence 11 is already on disk as file /arch/1_11_675209275.dbf
archive log thread 2 sequence 9 is already on disk as file /arch/2_9_675209275.dbf
archive log thread 2 sequence 10 is already on disk as file /arch/2_10_675209275.dbf
archive log thread 2 sequence 11 is already on disk as file /arch/2_11_675209275.dbf
archive log filename=/arch/2_9_675209275.dbf thread=2 sequence=9
archive log filename=/arch/1_9_675209275.dbf thread=1 sequence=9
archive log filename=/arch/2_10_675209275.dbf thread=2 sequence=10
archive log filename=/arch/1_10_675209275.dbf thread=1 sequence=10
media recovery complete, elapsed time: 00:00:15
Finished recover at 04-JAN-09
released channel: c1
released channel: c2
RMAN> alter database open;
database opened
RMAN> exit
Recovery Manager complete.
sql[oracle@rac1 arch]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Sun Jan 4 01:49:53 2009
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
SQL> select count(*) from t;
COUNT(*)
----------
3856515
SQL>
恢復完成
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7199859/viewspace-526491/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- vmware + 裸裝置 + crs + oracle10g RAC搭建步驟(二):安裝linuxOracleLinux
- Networker恢復oracle rac到單機Oracle
- AIX中的裸裝置AI
- raw 裸裝置資料檔案更改其他raw裸裝置位置
- ORACLE 11.2.0.4 RAC RMAN異機恢復之ORA-15001Oracle
- oracle資料庫跨平臺(AIX)從RAC恢復至(linux)下的單例項Oracle資料庫AILinux單例
- Solaris下Oracle RAC 11.2.0.4 安裝方法Oracle
- Linux裸裝置總結Linux
- RAC安裝目錄許可權快速恢復
- RAC恢復到單機
- iOS裝置資料恢復軟體iOS資料恢復
- Linux下Oracle 11.2.0.1 RAC安裝筆記LinuxOracle筆記
- 一次難忘的協助解決Oracle RAC恢復過程Oracle
- RAC備份恢復之Voting備份與恢復
- linux udev裸裝置繫結Linuxdev
- 安卓裝置資料恢復軟體安卓資料恢復
- rac恢復到單例項單例
- Oracle Database 12c RAC損壞ocr和votedisk恢復實驗OracleDatabase
- NBU恢復oracleOracle
- 談談WINDOWS下重灌系統後oracle的恢復WindowsOracle
- HUAWEI網路裝置恢復Console口密碼密碼
- Linux下基於裸裝置建立10g資料庫Linux資料庫
- 【伺服器儲存裝置資料恢復】EMC儲存裝置POOL上的資料卷被刪除的資料恢復案例伺服器資料恢復
- 記錄一次Oracle 11.2.0.4 RAC異地恢復到單例項Oracle單例
- Oracle案例12——NBU Oracle恢復Oracle
- DM7使用裸裝置搭建DMRAC
- DM8 使用裸裝置搭建DMRAC
- oracle冷備恢復Oracle
- oracle 異機恢復Oracle
- emc cx500上的基於linux的3節點rac上的裸裝置的使用和效能測試Linux
- oracle rac資料庫的安裝Oracle資料庫
- linux下恢復誤刪除oracle的資料檔案LinuxOracle
- DG:11.2.0.4 RAC線上duplicate恢復DG
- 從nub備份恢復(同平臺)恢復RAC至單例項單例
- 基於裸裝置的ASM磁碟組擴容方案ASM
- 【伺服器資料恢復】某品牌V7000儲存裝置資料恢復案例伺服器資料恢復
- Oracle RMAN恢復測試Oracle
- Oracle 不完全恢復Oracle
- Oracle RAC 環境下的連線管理Oracle