rac到單例項的rman恢復
1.建立單例項pfile檔案,對應db_name引數,dbs下對應sid
11.建立臨時表空間
create temporary tablespace temp tempfile 'xxxxxx' size 512m;
*.audit_file_dest='/u01/app/oracle/admin/cn100db/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/u01/app/oracle/oradata/cn100db/control01.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='cn100db'
*.db_recovery_file_dest='/u01/app/oracle/recovery_area'
*.db_recovery_file_dest_size=4070572032
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=cn100dbXDB)'
*.log_archive_dest_1='location=/u01/app/oracle/archlog'
*.memory_target=8206107648
*.open_cursors=300
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.undo_tablespace='UNDOTBS1'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/u01/app/oracle/oradata/cn100db/control01.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='cn100db'
*.db_recovery_file_dest='/u01/app/oracle/recovery_area'
*.db_recovery_file_dest_size=4070572032
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=cn100dbXDB)'
*.log_archive_dest_1='location=/u01/app/oracle/archlog'
*.memory_target=8206107648
*.open_cursors=300
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.undo_tablespace='UNDOTBS1'
2.啟動到nomout
SQL> startup nomout
SQL> startup nomout
3.將rac的rman備份資料庫與每個節點的歸檔日子,拷貝到單例項
scp xxxx xxxxxx
scp xxxx xxxxxx
4.恢復controlfile檔案從備份中
RMAN> restore controfile from '/backjup/xxxx';
RMAN> restore controfile from '/backjup/xxxx';
5.啟動到mount,檢視控制檔案中備份
SQL> alter datbase mount;
RMAN> list backupset;
SQL> alter datbase mount;
RMAN> list backupset;
6.還原資料檔案,並rename到新目錄
RMAN>
run{
set newname for datafile 1 to '/u01/app/oracle/oradata/system01.dbf';
set newname for datafile 2 to '/u01/app/oracle/oradata/sysaux01.dbf';
set newname for datafile 3 to '/u01/app/oracle/oradata/undotbs01.dbf';
set newname for datafile 4 to '/u01/app/oracle/oradata/users01.dbf';
set newname for datafile 5 to '/u01/app/oracle/oradata/undotbs02.dbf';
set newname for datafile 6 to '/u01/app/oracle/oradata/lunar.274.796133339';
set newname for datafile 7 to '/u01/app/oracle/oradata/space_data_order_01_01.dbf';
set newname for datafile 8 to '/u01/app/oracle/oradata/space_data_order_02_01.dbf';
set newname for datafile 9 to '/u01/app/oracle/oradata/space_data_order_03_01.dbf';
set newname for datafile 10 to '/u01/app/oracle/oradata/system02.dbf';
set newname for datafile 11 to '/u01/app/oracle/oradata/sysaux02.dbf';
restore database;
switch datafile all;
}
RMAN>
run{
set newname for datafile 1 to '/u01/app/oracle/oradata/system01.dbf';
set newname for datafile 2 to '/u01/app/oracle/oradata/sysaux01.dbf';
set newname for datafile 3 to '/u01/app/oracle/oradata/undotbs01.dbf';
set newname for datafile 4 to '/u01/app/oracle/oradata/users01.dbf';
set newname for datafile 5 to '/u01/app/oracle/oradata/undotbs02.dbf';
set newname for datafile 6 to '/u01/app/oracle/oradata/lunar.274.796133339';
set newname for datafile 7 to '/u01/app/oracle/oradata/space_data_order_01_01.dbf';
set newname for datafile 8 to '/u01/app/oracle/oradata/space_data_order_02_01.dbf';
set newname for datafile 9 to '/u01/app/oracle/oradata/space_data_order_03_01.dbf';
set newname for datafile 10 to '/u01/app/oracle/oradata/system02.dbf';
set newname for datafile 11 to '/u01/app/oracle/oradata/sysaux02.dbf';
restore database;
switch datafile all;
}
7.還原歸檔,對應list backupset的sequence及thread
RMAN>
run
{allocate channel c1 type disk;
set archivelog destination to '/u01/app/oracle';
restore archivelog sequence between 225 and 226 thread 1;
allocate channel c2 type disk;
set archivelog destination to '/u01/app/oracle';
restore archivelog sequence between 164 and 165 thread=2;
release channel c1;
release channel c2;
}
RMAN>
run
{allocate channel c1 type disk;
set archivelog destination to '/u01/app/oracle';
restore archivelog sequence between 225 and 226 thread 1;
allocate channel c2 type disk;
set archivelog destination to '/u01/app/oracle';
restore archivelog sequence between 164 and 165 thread=2;
release channel c1;
release channel c2;
}
8.恢復到最新歸檔
SQL> recover database until cancel;
SQL> recover database until cancel;
9.由於rac環境的redolog在asm中,需要重建controlfile重定向redolog檔案路徑.
SQL> alter database backup controlfile to trace;
SQL> shutdown immediate
SQL> alter database backup controlfile to trace;
SQL> shutdown immediate
10.查詢controlfile trace 修改redolog對應位置
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "CN100DB" RESETLOGS ARCHIVELOG
MAXLOGFILES 192
MAXLOGMEMBERS 3
MAXDATAFILES 1024
MAXINSTANCES 32
MAXLOGHISTORY 292
LOGFILE
GROUP 1 '/u01/app/oracle/oradata/redo01.log' SIZE 100M BLOCKSIZE 512,
GROUP 2 '/u01/app/oracle/oradata/redo02.log' SIZE 100M BLOCKSIZE 512,
GROUP 5 '/u01/app/oracle/oradata/redo03.log' SIZE 300M BLOCKSIZE 512,
GROUP 6 '/u01/app/oracle/oradata/redo04.log' SIZE 100M BLOCKSIZE 512
DATAFILE
'/u01/app/oracle/oradata/system01.dbf',
'/u01/app/oracle/oradata/sysaux01.dbf',
'/u01/app/oracle/oradata/undotbs01.dbf',
'/u01/app/oracle/oradata/users01.dbf',
'/u01/app/oracle/oradata/undotbs02.dbf',
'/u01/app/oracle/oradata/lunar.274.796133339',
'/u01/app/oracle/oradata/space_data_order_01_01.dbf',
'/u01/app/oracle/oradata/space_data_order_02_01.dbf',
'/u01/app/oracle/oradata/space_data_order_03_01.dbf',
'/u01/app/oracle/oradata/space_data_order_04_01.dbf',
'/u01/app/oracle/oradata/system02.dbf',
'/u01/app/oracle/oradata/sysaux02.dbf'
CHARACTER SET ZHS16GBK
;
CREATE CONTROLFILE REUSE DATABASE "CN100DB" RESETLOGS ARCHIVELOG
MAXLOGFILES 192
MAXLOGMEMBERS 3
MAXDATAFILES 1024
MAXINSTANCES 32
MAXLOGHISTORY 292
LOGFILE
GROUP 1 '/u01/app/oracle/oradata/redo01.log' SIZE 100M BLOCKSIZE 512,
GROUP 2 '/u01/app/oracle/oradata/redo02.log' SIZE 100M BLOCKSIZE 512,
GROUP 5 '/u01/app/oracle/oradata/redo03.log' SIZE 300M BLOCKSIZE 512,
GROUP 6 '/u01/app/oracle/oradata/redo04.log' SIZE 100M BLOCKSIZE 512
DATAFILE
'/u01/app/oracle/oradata/system01.dbf',
'/u01/app/oracle/oradata/sysaux01.dbf',
'/u01/app/oracle/oradata/undotbs01.dbf',
'/u01/app/oracle/oradata/users01.dbf',
'/u01/app/oracle/oradata/undotbs02.dbf',
'/u01/app/oracle/oradata/lunar.274.796133339',
'/u01/app/oracle/oradata/space_data_order_01_01.dbf',
'/u01/app/oracle/oradata/space_data_order_02_01.dbf',
'/u01/app/oracle/oradata/space_data_order_03_01.dbf',
'/u01/app/oracle/oradata/space_data_order_04_01.dbf',
'/u01/app/oracle/oradata/system02.dbf',
'/u01/app/oracle/oradata/sysaux02.dbf'
CHARACTER SET ZHS16GBK
;
-- Database can now be opened zeroing the online logs.
ALTER DATABASE OPEN RESETLOGS;
ALTER DATABASE OPEN RESETLOGS;
11.建立臨時表空間
create temporary tablespace temp tempfile 'xxxxxx' size 512m;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22990797/viewspace-749970/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- RMAN異機恢復:RAC到單例項單例
- rac恢復到單例項單例
- RAC asm恢復到單例項ASM單例
- rac asm 恢復到 單例項 1ASM單例
- rac asm 恢復到 單例項 2ASM單例
- Oracle 11.2.0.4 從單例項,使用RMAN 異機恢復到RACOracle單例
- RAC從帶庫到單例項的恢復單例
- RAC恢復到單例項節點上單例
- 恢復rac db(raw)到單例項下單例
- 單例項備份集恢復到RAC單例
- oracle 11C rman 恢復到單例項Oracle單例
- 單例項恢復至RAC單例
- 恢復RAC資料庫到單例項(ASM)資料庫單例ASM
- 10g rac asm 恢復到 單例項(二)ASM單例
- 10g rac asm 恢復到 單例項(一)ASM單例
- oracle 10g rac 單例項恢復至ORACLE10G RAC RMANOracle 10g單例
- RAC資料庫恢復到單例項資料庫資料庫單例
- 單例項備份恢復成RAC單例
- Rman 單例項filesystem(Windows)恢復到ASM環境(Linux)單例WindowsASMLinux
- RAC 資料庫恢復到單例項下並且基於時間點恢復資料庫單例
- 【kingsql分享】將RAC資料庫異機恢復到單例項(Ⅰ)SQL資料庫單例
- RAC 例項 遷移到 單例項 -- 使用RMAN Duplicate單例
- 從nub備份恢復(同平臺)恢復RAC至單例項單例
- 單例項恢復RAC資料庫步驟(三)單例資料庫
- 單例項恢復RAC資料庫步驟(二)單例資料庫
- 單例項恢復RAC資料庫步驟(一)單例資料庫
- 記錄一次Oracle 11.2.0.4 RAC異地恢復到單例項Oracle單例
- 【RAC】將單例項備份集恢復為rac資料庫單例資料庫
- 【RAC】將RAC備份集恢復為單例項資料庫單例資料庫
- 搭建RAC到單例項DG單例
- 使用RMAN將RAC+ASM複製到單例項+ASM上ASM單例
- RMAN例項備份與恢復詳解
- 將RAC備份集恢復為單例項資料庫單例資料庫
- 11G RAC 異機恢復至單例項測試單例
- OGG搭建(rac到-->單例項)單例
- 【RMAN】RAC資料恢復至單機環境資料恢復
- RAC12.1.0.2.161018PSU從RAC+ASM恢復到單例項非ASM遇到的BUGASM單例
- Networker恢復oracle rac到單機Oracle