ORACLE 10G ASM非歸檔模式下使用RMAN遷移一例
遷移源和目標系統均為AIX系統上的ORACLE 10.2.0.4版本的ASM,系統由生產中心,遷移到資料中心;
非歸檔
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination /oracle/product/10.2.0/db/dbs/arch
Oldest online log sequence 194644
Current log sequence 194646
RMAN> show all;
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/orabak/racbak/rac_%d_%t_%U';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL 1 DEVICE TYPE DISK MAXPIECESIZE 10 G FORMAT '/orabak/racbak/rac_%d_%t_%U';
CONFIGURE CHANNEL DEVICE TYPE DISK MAXPIECESIZE 10 G FORMAT '/orabak/racbak/rac_%d_%t_%U';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
ecovery Manager: Release 10.2.0.4.0 -
Production on Fri Jun 20 18:28:59 2014
RMAN> run{
2> allocate channel c1 type disk format '/backup/db_t%t_s%s_p%p'
maxpiecesize 2000m;
3> allocate channel c2 type disk format '/backup/db_t%t_s%s_p%p'
maxpiecesize 2000m;
4> allocate channel c3 type disk format '/backup/db_t%t_s%s_p%p' maxpiecesize
2000m;
5> allocate channel c4 type disk format '/backup/db_t%t_s%s_p%p'
maxpiecesize 2000m;
6> backup full database include current controlfile;
7> release channel c1;
8> release channel c2;
9> release channel c3;
10> release channel c4;
11> }
。。。。。。。
channel c2: specifying datafile(s) in backupset
including current
control file in backupset
channel c2: starting piece 1 at 20-JUN-14
channel c2: finished piece 1 at 20-JUN-14
piece handle=/backup/db_t850766333_s29_p1 tag=TAG20140620T182905 comment=NONE
channel c2: backup set complete, elapsed time: 00:00:02
channel c1:
finished piece 99 at 20-JUN-14
piece handle=/backup/db_t850760950_s25_p99 tag=TAG20140620T182905 comment=NONE
channel c1: starting piece 100 at 20-JUN-14
。。。。。。
piece handle=/backup/db_t850760956_s28_p110
tag=TAG20140620T182905 comment=NONE
channel c4: backup set complete, elapsed time: 01:37:17
channel c3: finished piece 111 at 20-JUN-14
piece handle=/backup/db_t850760955_s27_p111 tag=TAG20140620T182905 comment=NONE
channel c3: backup set complete, elapsed time: 01:37:43
Finished backup at 20-JUN-14
Starting Control
File and SPFILE Autobackup at 20-JUN-14
released channel: c1
released channel: c2
released channel: c3
released channel: c4
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of Control File and SPFILE Autobackup command on c1 channel
at 06/20/2014 20:06:59
ORA-19504: failed to create file
"/orabak/racbak/auto_c-3221084262-20140620-00"
ORA-27040: file create error, unable to create file
IBM AIX RISC System/6000 Error: 2: No such file or directory
Recovery Manager complete.
由於CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/orabak/racbak/rac_%d_%t_%U';
指定的目錄'/orabak/racbak/不存在因此Control File and SPFILE Autobackup報錯;
但是備份成功完成了,並且備份裡包含control file;
備份資料透過HDS HUR盤陣複製技術傳輸至遠端目標系統;
恢復過程:
SQL> startup nomount pfile='/backup/pfile.ora';
ORACLE instance started.
Total System Global Area 2.2549E+10 bytes
Fixed Size 2124528 bytes
Variable Size 2164262160 bytes
Database Buffers 2.0368E+10 bytes
Redo Buffers 14651392 bytes
RMAN> SET DBID 4221064232;
executing command: SET DBID
RMAN> RESTORE CONTROLFILE FROM '/backup/db_t850766333_s29_p1';
Finished restore at 20-JUN-14
SQL> create spfile= '+XXXX/xxxx/spfilexxxx.ora' from pfile='/backup/pfile.ora';
File created.
SQL> shutdown immediate;
ORA-01507: database not mounted
ORACLE instance shut down.
SQL> exit
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 2.2549E+10 bytes
Fixed Size 2124528 bytes
Variable Size 2164262160 bytes
Database Buffers 2.0368E+10 bytes
Redo Buffers 14651392 bytes
SQL> show parameter spfile;
NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
spfile string
+XXXX/xxxx/spfilexxxx.ora
SQL> alter database mount;
alter database mount
*
ERROR at line 1:
ORA-00205: error in identifying control file, check alert log for more info
SQL> alter system set control_files='+XXXX/xxxx/controlfile/current.256.850768855' scope=spfile;
SQL> shutdown immediate;
ORA-01507: database not mounted
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 2.2549E+10 bytes
Fixed Size 2124528 bytes
Variable Size 2164262160 bytes
Database Buffers 2.0368E+10 bytes
Redo Buffers 14651392 bytes
Database mounted.
RMAN> run{
2> allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
allocate channel c4 type disk;
restore database;
release channel c1;
3> 4> 5> 6> 7> 8> release channel c2;
release channel c3;
release channel c4;
}9> 10> 11>
using target database control file instead of recovery catalog
restoring datafile 00177 to +DWDG/tjdw/datafile/tjdw_data_155.dbf
restoring datafile 00181 to +DWDG/tjdw/datafile/tjdw_data_159.dbf
restoring datafile 00185 to +DWDG/tjdw/datafile/tjdw_data_163.dbf
restoring datafile 00189 to +DWDG/tjdw/datafile/tjdw_data_167.dbf
channel c3: reading from backup piece /backup/db_t850760951_s26_p1
ORA-19870: error reading backup piece /orabak/racbak/rac_TJDW_724253548_0llimerc_1_1
ORA-19505: failed to identify file "/orabak/racbak/rac_TJDW_724253548_0llimerc_1_1"
ORA-27037: unable to obtain file status
IBM AIX RISC System/6000 Error: 2: No such file or directory
Additional information: 3
ORA-19870: error reading backup piece /orabak/racbak/rac_TJDW_724253548_0mlimerc_1_1
ORA-19505: failed to identify file "/orabak/racbak/rac_TJDW_724253548_0mlimerc_1_1"
ORA-27037: unable to obtain file status
IBM AIX RISC System/6000 Error: 2: No such file or directory
Additional information: 3
恢復時居然還去找之前過期的備份;
RMAN> crosscheck backup;
RMAN> delete noprompt expired backup;
之後再執行
RMAN> run{
2> allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
allocate channel c4 type disk;
restore database;
release channel c1;
3> 4> 5> 6> 7> 8> release channel c2;
release channel c3;
release channel c4;
}9> 10> 11>
。。。。。。。。。
channel c2: restored backup piece 105
piece handle=/backup/db_t850760950_s25_p105 tag=TAG20140620T182905
channel c2: restore complete, elapsed time: 00:46:24
Finished restore at 21-JUN-14
恢復成功!
RMAN> recover database noredo;
Starting recover at 21-JUN-14
using channel ORA_DISK_1
Finished recover at 21-JUN-14
RMAN> alter database open resetlogs;
database opened
RMAN> exit
srvctl add database -d XXXX -o /oracle/product/10.2.0/db
srvctl add instance -d XXXX -i XXXX1 -n YYYY1
srvctl add instance -d XXXX -i XXXX2 -n YYYY2
alter system set local_listener='(ADDRESS = (PROTOCOL = TCP)(HOST = IP)(PORT = 1521))' sid='XXXX1';
alter system set local_listener='(ADDRESS = (PROTOCOL = TCP)(HOST = IP)(PORT = 1521))' sid='XXXX2';
修改listener.ora,tnsnames.ora,可以提前先改好。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/527318/viewspace-1190660/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 非歸檔模式下遷移10g單機庫到新的儲存上模式
- 使用RMAN執行oracle ASM資料遷移OracleASM
- Oracle歸檔模式和非歸檔模式Oracle模式
- 用RMAN遷移檔案到ASM或從ASM遷出ASM
- ORACLE RAC模式下歸檔模式和非歸檔模式的切換方法Oracle模式
- 利用RMAN將非ASM檔案移動到ASM裡 - [ASM]ASM
- Oracle歸檔模式與非歸檔模式設定Oracle模式
- ASM下遷移控制檔案ASM
- rman 非歸檔模式下停庫備份與恢復模式
- 使用RMAN遷移檔案系統資料庫到ASM資料庫ASM
- Oracle歸檔模式和非歸檔模式的區別Oracle模式
- redhat enterprise 4下遷移oracle 10g到asmRedhatOracle 10gASM
- Oracle 歸檔與非歸檔模式的更改Oracle模式
- rman 非歸檔模式下open庫備份與mount恢復模式
- Oracle的奇葩設定之非歸檔模式與RMAN備份Oracle模式
- HA(FAILSAFE)模式下ORACLE 10g 設為歸檔模式AI模式Oracle 10g
- oracle RMAN 非歸檔資料庫恢復Oracle資料庫
- 非歸檔模式改為歸檔模式模式
- 【資料遷移】RMAN遷移資料庫到ASM(二)切換資料檔案到ASM資料庫ASM
- oracle 歸檔/非歸檔Oracle
- oracle 10g rac ocfs或者asm 修改為歸檔模式操作步驟Oracle 10gASM模式
- oracle10g 歸檔模式和非歸檔模式的轉換Oracle模式
- ASM下遷移spfileASM
- Oracle 歸檔和非歸檔模式之間的切換Oracle模式
- 【資料遷移】RMAN遷移資料庫到ASM(三)遷移onlinelog等到ASM資料庫ASM
- 【資料遷移】RMAN遷移資料庫到ASM(一)建立ASM磁碟組資料庫ASM
- ORACLE非歸檔下的恢復Oracle
- 歸檔模式與非歸檔模式的切換模式
- oracle 10g rac 啟用歸檔模式Oracle 10g模式
- Oracle怎麼從歸檔模式變成非歸檔模式,詳細步驟Oracle模式
- Oracle怎麼從非歸檔模式變成歸檔模式,詳細步驟Oracle模式
- 【遷移】使用rman遷移資料庫資料庫
- 用rman從檔案系統遷移資料庫到asm資料庫ASM
- RAC(ASM)歸檔模式修改ASM模式
- 非歸檔模式下的資料備份模式
- oracle 10g rac下啟動關閉與更改歸檔模式Oracle 10g模式
- 使用rman在oracle ASM磁碟組之間移動資料檔案OracleASM
- 遷移檔案系統管理下的db到asm下ASM