oracle 11C rman 恢復到單例項
下面是我的一次從Oracle 11g R2 RAC到單例項間透過RMAN恢復備份集的過程,記錄在此。
有些人以此方法作為RMAN備份有效性校驗,當然我不反對這個說法,但我也相信RMAN提供的備份有效性校驗方法,參考我整理的博文:《》
操作環境:
- Source DB: 2-Node Oracle Database 11g R2 RAC On Linux(11.2.0.1 with ASM)
- Target DB: Single Instance Database 11g R2 On Linux(11.2.0.1 with FileSystem)
目標端資料庫環境介紹:
[root@luocs ~]# hostname
luocs.com
[root@luocs ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/cciss/c0d0p1 388G 9.1G 359G 3% /
/dev/cciss/c0d0p3 421G 2.6G 397G 1% /data
tmpfs 5.9G 0 5.9G 0% /dev/shm
– 目標端磁碟空間需要充足,至少要比源端所有資料檔案大小還大。
源端與目標端環境已準備好,下面開始進入操作。
1.將源端的一個FULL BACKUPSET複製到目標端
我在目標端建立/data/bak目錄,將備份檔案放於這裡 [root@luocs ~]# mkdir /data/bak [root@luocs ~]# chown -R oracle.oinstall /data/bak/ 異機複製使用scp或者ftp方式都可以,略。 我這裡備份檔案已打包,所以在目標端進行解壓 [oracle@luocs bak]$ tar zxvf fulldb20121211.tgz [oracle@luocs bak]$ tar zxvf ArchFile20121211.tgz
2.從備份中恢復引數檔案
我的一貫作風,在動現場之前保留一份原始檔 [oracle@luocs dbs]$ pwd /u01/app/oracle/product/11.2.0/dbhome_1/dbs [oracle@luocs dbs]$ cp -p spfilehkrt.ora spfilehkrt.ora.bak 將資料庫啟動到nomount狀態 SQL> startup nomount ORACLE instance started. Total System Global Area 5077495808 bytes Fixed Size 2212976 bytes Variable Size 3288337296 bytes Database Buffers 1744830464 bytes Redo Buffers 42115072 bytes 透過RMAN工具還原出引數檔案,還原出初始化引數檔案 RMAN> restore spfile to pfile '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/inithkrt.ora' from '/data/bak/full_HKRT_1mnsi77q_1_1'; Starting restore at 12-DEC-2012 00:21:03 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=1 device type=DISK channel ORA_DISK_1: restoring spfile from AUTOBACKUP /data/bak/full_HKRT_1mnsi77q_1_1 channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete Finished restore at 12-DEC-2012 00:21:05
3.編輯初始化引數檔案,相應地建立所需目錄
[oracle@luocs dbs]$ cp -p inithkrt.ora inithkrt.ora.bak 我們恢復過來的引數檔案是RAC的,所以我們要改成符合單例項資料庫 [oracle@luocs dbs]$ cat inithkrt.ora #hkrt1.__db_cache_size=4362076160 #hkrt2.__db_cache_size=5972688896 #hkrt1.__java_pool_size=67108864 #hkrt2.__java_pool_size=67108864 #hkrt1.__large_pool_size=67108864 #hkrt2.__large_pool_size=67108864 #hkrt1.__pga_aggregate_target=7381975040 #hkrt2.__pga_aggregate_target=6710886400 #hkrt1.__sga_target=9395240960 #hkrt2.__sga_target=10066329600 #hkrt1.__shared_io_pool_size=0 #hkrt2.__shared_io_pool_size=0 #hkrt1.__shared_pool_size=4630511616 #hkrt2.__shared_pool_size=3825205248 #hkrt2.__streams_pool_size=0 #hkrt1.__streams_pool_size=134217728 *.audit_file_dest='/u01/app/oracle/admin/hkrt/adump' *.audit_trail='db' #*.cluster_database=true *.compatible='11.2.0.0.0' *.control_files='/u01/app/oracle/oradata/hkrt/control01.dbf','/u01/app/oracle/oradata/hkrt/control02.dbf' *.db_block_size=8192 #*.db_create_file_dest='+ASMDATA' *.db_domain='' *.db_name='hkrt' #*.db_recovery_file_dest='+RECOVERY' #*.db_recovery_file_dest_size=47185920000 *.diagnostic_dest='/u01/app/oracle' *.dispatchers='(PROTOCOL=TCP) (SERVICE=hkrtXDB)' #hkrt2.instance_number=2 #hkrt1.instance_number=1 #hkrt1.local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=rac01-vip.hkrt.com)(PORT=1521))))' #hkrt2.local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=rac02-vip.hkrt.com)(PORT=1521))))' *.log_archive_dest_1='LOCATION=/u01/arch' #*.log_archive_dest_2='LOCATION=+ARCH' *.log_archive_format='%t_%s_%r.dbf' *.memory_target=5034213376 *.open_cursors=300 *.processes=400 #*.remote_listener='scan-cluster:1521' *.remote_login_passwordfile='exclusive' #hkrt2.thread=2 #hkrt1.thread=1 #hkrt1.undo_tablespace='UNDOTBS1' #hkrt2.undo_tablespace='UNDOTBS2' *.undo_tablespace='UNDOTBS1' 建立相應的目錄 [root@luocs ~]# mkdir /u01/arch [root@luocs ~]# chown oracle.oinstall /u01/arch -- 存放歸檔日誌檔案 [root@luocs ~]# mkdir /u01/app/oracle/admin/hkrt/adump -p [root@luocs ~]# chown -R oracle.oinstall /u01/app/oracle/admin/hkrt -- 存放審計跟蹤檔案 [root@luocs ~]# mkdir /u01/app/oracle/oradata/hkrt/ [root@luocs ~]# chown oracle.oinstall /u01/app/oracle/oradata/hkrt/ -- 存放資料檔案
4.透過編輯好的初始化引數重啟資料庫到NOMOUNT
SQL> shutdown immediate ORA-01507: database not mounted ORACLE instance shut down. SQL> create spfile from pfile; File created. SQL> startup nomount ORACLE instance started. Total System Global Area 5077495808 bytes Fixed Size 2212976 bytes Variable Size 3288337296 bytes Database Buffers 1744830464 bytes Redo Buffers 42115072 bytes
5.從備份集還原控制檔案
我們從備份集裡還原出控制檔案 RMAN> restore controlfile from '/data/bak/full_HKRT_1lnsi77o_1_1'; Starting restore at 12-DEC-2012 00:35:22 using channel ORA_DISK_1 channel ORA_DISK_1: restoring control file channel ORA_DISK_1: restore complete, elapsed time: 00:00:01 output file name=/u01/app/oracle/oradata/hkrt/control01.dbf output file name=/u01/app/oracle/oradata/hkrt/control02.dbf Finished restore at 12-DEC-2012 00:35:23 將資料庫啟動到MOUNT狀態 RMAN> mount database; database mounted released channel: ORA_DISK_1
6.將備份集註冊進控制檔案裡
RMAN> catalog start with '/data/bak/'; searching for all files that match the pattern /data/bak/ List of Files Unknown to the Database ===================================== File Name: /data/bak/full_HKRT_1mnsi77q_1_1 File Name: /data/bak/arch_HKRT_1onsi78l_1_1 File Name: /data/bak/ArchFile20121211.tgz File Name: /data/bak/full_HKRT_1knsi76k_1_1 File Name: /data/bak/full_HKRT_1lnsi77o_1_1 File Name: /data/bak/full_HKRT_1jnsi76k_1_1 File Name: /data/bak/arch_HKRT_1nnsi78j_1_1 File Name: /data/bak/arch_HKRT_1pnsi7ha_1_1 File Name: /data/bak/fulldb20121211.tgz Do you really want to catalog the above files (enter YES or NO)? yes cataloging files... cataloging done List of Cataloged Files ======================= File Name: /data/bak/full_HKRT_1mnsi77q_1_1 File Name: /data/bak/arch_HKRT_1onsi78l_1_1 File Name: /data/bak/full_HKRT_1knsi76k_1_1 File Name: /data/bak/full_HKRT_1lnsi77o_1_1 File Name: /data/bak/full_HKRT_1jnsi76k_1_1 File Name: /data/bak/arch_HKRT_1nnsi78j_1_1 File Name: /data/bak/arch_HKRT_1pnsi7ha_1_1 List of Files Which Where Not Cataloged ======================================= File Name: /data/bak/ArchFile20121211.tgz RMAN-07517: Reason: The file header is corrupted File Name: /data/bak/fulldb20121211.tgz RMAN-07517: Reason: The file header is corrupted
可以透過list backup;檢視,略。
7.確認資料檔案、聯機日誌檔案、臨時檔案路徑
SQL> set pagesize 9999 SQL> col NAME for a65 SQL> select file#,name from v$datafile; FILE# NAME ---------- ----------------------------------------------------------------- 1 +ASMDATA/hkrt/datafile/system.260.781033387 2 +ASMDATA/hkrt/datafile/sysaux.269.781033387 3 +ASMDATA/hkrt/datafile/undotbs1.264.781033387 4 +ASMDATA/hkrt/datafile/users.268.781033387 5 +ASMDATA/hkrt/datafile/undotbs2.265.781033679 6 +ASMDATA/hkrt/datafile/sell.270.786630869 7 +ASMDATA/hkrt/datafile/proxy.271.786631115 8 +ASMDATA/hkrt/datafile/pay.272.786631367 9 +ASMDATA/hkrt/datafile/payment.273.786631689 10 +ASMDATA/hkrt/datafile/cms.274.786724997 11 +ASMDATA/hkrt/datafile/itrusradb.276.787063121 12 +ASMDATA/hkrt/datafile/itruscadb.275.787061395 13 +ASMDATA/hkrt/datafile/ob2c.277.789750069 13 rows selected. SQL> col MEMBER for a65 SQL> select member from v$logfile; MEMBER ------------------------------------------------------------------------------------------------------------------------------------------------------ +ASMDATA/hkrt/onlinelog/group_5.262.781033549 +RECOVERY/hkrt/onlinelog/group_5.259.781033555 +ASMDATA/hkrt/onlinelog/group_2.266.781033537 +RECOVERY/hkrt/onlinelog/group_2.258.781033543 +ASMDATA/hkrt/onlinelog/group_1.267.781033527 +RECOVERY/hkrt/onlinelog/group_1.257.781033533 +ASMDATA/hkrt/onlinelog/group_3.259.781033803 +RECOVERY/hkrt/onlinelog/group_3.260.781033809 +ASMDATA/hkrt/onlinelog/group_4.258.781033815 +RECOVERY/hkrt/onlinelog/group_4.261.781033821 +ASMDATA/hkrt/onlinelog/group_6.257.781033825 +RECOVERY/hkrt/onlinelog/group_6.262.781033831 12 rows selected. SQL> select name from v$tempfile; NAME -------------------------------------------------------------------------------- +ASMDATA/hkrt/tempfile/temp.261.781033565
8.透過RMAN重新命名資料檔案和臨時檔案,進行還原
RMAN> RUN { 2> SET NEWNAME FOR DATAFILE 1 to '/u01/app/oracle/oradata/hkrt/system01.dbf'; 3> SET NEWNAME FOR DATAFILE 2 to '/u01/app/oracle/oradata/hkrt/sysaux01.dbf'; SET NEWNAME FOR DATAFILE 3 to '/u01/app/oracle/oradata/hkrt/undotbs1.dbf'; SET NEWNAME FOR DATAFILE 4 to '/u01/app/oracle/oradata/hkrt/users01.dbf'; 6> SET NEWNAME FOR DATAFILE 5 to '/u01/app/oracle/oradata/hkrt/undotbs2.dbf'; SET NEWNAME FOR DATAFILE 6 to '/u01/app/oracle/oradata/hkrt/sell01.dbf'; SET NEWNAME FOR DATAFILE 7 to '/u01/app/oracle/oradata/hkrt/proxy01.dbf'; 9> SET NEWNAME FOR DATAFILE 8 to '/u01/app/oracle/oradata/hkrt/pay01.dbf'; 10> SET NEWNAME FOR DATAFILE 9 to '/u01/app/oracle/oradata/hkrt/payment01.dbf'; SET NEWNAME FOR DATAFILE 10 to '/u01/app/oracle/oradata/hkrt/cms01.dbf'; SET NEWNAME FOR DATAFILE 11 to '/u01/app/oracle/oradata/hkrt/itrusradb01.dbf'; SET NEWNAME FOR DATAFILE 12 to '/u01/app/oracle/oradata/hkrt/itruscadb01.dbf'; 14> SET NEWNAME FOR DATAFILE 13 to '/u01/app/oracle/oradata/hkrt/ob2c01.dbf'; SET NEWNAME FOR TEMPFILE 1 to '/u01/app/oracle/oradata/hkrt/temp01.dbf'; RESTORE DATABASE; 17> SWITCH DATAFILE ALL; SWITCH TEMPFILE ALL; 19> 20> } executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME Starting restore at 12-DEC-2012 00:37:38 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=1 device type=DISK channel ORA_DISK_1: starting datafile backup set restore channel ORA_DISK_1: specifying datafile(s) to restore from backup set channel ORA_DISK_1: restoring datafile 00001 to /u01/app/oracle/oradata/hkrt/system01.dbf channel ORA_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/hkrt/undotbs1.dbf channel ORA_DISK_1: restoring datafile 00006 to /u01/app/oracle/oradata/hkrt/sell01.dbf channel ORA_DISK_1: restoring datafile 00008 to /u01/app/oracle/oradata/hkrt/pay01.dbf channel ORA_DISK_1: restoring datafile 00010 to /u01/app/oracle/oradata/hkrt/cms01.dbf channel ORA_DISK_1: restoring datafile 00011 to /u01/app/oracle/oradata/hkrt/itrusradb01.dbf channel ORA_DISK_1: reading from backup piece /u01/bak/rman_bk/full_HKRT_1knsi76k_1_1 channel ORA_DISK_1: errors found reading piece handle=/u01/bak/rman_bk/full_HKRT_1knsi76k_1_1 channel ORA_DISK_1: failover to piece handle=/data/bak/full_HKRT_1knsi76k_1_1 tag=BACKUPDATABASE channel ORA_DISK_1: restored backup piece 1 channel ORA_DISK_1: restore complete, elapsed time: 00:06:16 channel ORA_DISK_1: starting datafile backup set restore channel ORA_DISK_1: specifying datafile(s) to restore from backup set channel ORA_DISK_1: restoring datafile 00002 to /u01/app/oracle/oradata/hkrt/sysaux01.dbf channel ORA_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/hkrt/users01.dbf channel ORA_DISK_1: restoring datafile 00005 to /u01/app/oracle/oradata/hkrt/undotbs2.dbf channel ORA_DISK_1: restoring datafile 00007 to /u01/app/oracle/oradata/hkrt/proxy01.dbf channel ORA_DISK_1: restoring datafile 00009 to /u01/app/oracle/oradata/hkrt/payment01.dbf channel ORA_DISK_1: restoring datafile 00012 to /u01/app/oracle/oradata/hkrt/itruscadb01.dbf channel ORA_DISK_1: restoring datafile 00013 to /u01/app/oracle/oradata/hkrt/ob2c01.dbf channel ORA_DISK_1: reading from backup piece /data/bak/full_HKRT_1jnsi76k_1_1 channel ORA_DISK_1: piece handle=/data/bak/full_HKRT_1jnsi76k_1_1 tag=BACKUPDATABASE channel ORA_DISK_1: restored backup piece 1 channel ORA_DISK_1: restore complete, elapsed time: 00:06:05 Finished restore at 12-DEC-2012 00:50:01 datafile 1 switched to datafile copy input datafile copy RECID=14 STAMP=801795002 file name=/u01/app/oracle/oradata/hkrt/system01.dbf datafile 2 switched to datafile copy input datafile copy RECID=15 STAMP=801795002 file name=/u01/app/oracle/oradata/hkrt/sysaux01.dbf datafile 3 switched to datafile copy input datafile copy RECID=16 STAMP=801795002 file name=/u01/app/oracle/oradata/hkrt/undotbs1.dbf datafile 4 switched to datafile copy input datafile copy RECID=17 STAMP=801795002 file name=/u01/app/oracle/oradata/hkrt/users01.dbf datafile 5 switched to datafile copy input datafile copy RECID=18 STAMP=801795002 file name=/u01/app/oracle/oradata/hkrt/undotbs2.dbf datafile 6 switched to datafile copy input datafile copy RECID=19 STAMP=801795002 file name=/u01/app/oracle/oradata/hkrt/sell01.dbf datafile 7 switched to datafile copy input datafile copy RECID=20 STAMP=801795002 file name=/u01/app/oracle/oradata/hkrt/proxy01.dbf datafile 8 switched to datafile copy input datafile copy RECID=21 STAMP=801795002 file name=/u01/app/oracle/oradata/hkrt/pay01.dbf datafile 9 switched to datafile copy input datafile copy RECID=22 STAMP=801795002 file name=/u01/app/oracle/oradata/hkrt/payment01.dbf datafile 10 switched to datafile copy input datafile copy RECID=23 STAMP=801795002 file name=/u01/app/oracle/oradata/hkrt/cms01.dbf datafile 11 switched to datafile copy input datafile copy RECID=24 STAMP=801795002 file name=/u01/app/oracle/oradata/hkrt/itrusradb01.dbf datafile 12 switched to datafile copy input datafile copy RECID=25 STAMP=801795002 file name=/u01/app/oracle/oradata/hkrt/itruscadb01.dbf datafile 13 switched to datafile copy input datafile copy RECID=26 STAMP=801795002 file name=/u01/app/oracle/oradata/hkrt/ob2c01.dbf renamed tempfile 1 to /u01/app/oracle/oradata/hkrt/temp01.dbf in control file
9.修改聯機日誌檔案的路徑
alter database rename file '+ASMDATA/hkrt/onlinelog/group_1.267.781033527' to '/u01/app/oracle/oradata/hkrt/redo1_1.log'; alter database rename file '+RECOVERY/hkrt/onlinelog/group_1.257.781033533' to '/u01/app/oracle/oradata/hkrt/redo1_2.log'; alter database rename file '+ASMDATA/hkrt/onlinelog/group_2.266.781033537' to '/u01/app/oracle/oradata/hkrt/redo2_1.log'; alter database rename file '+RECOVERY/hkrt/onlinelog/group_2.258.781033543' to '/u01/app/oracle/oradata/hkrt/redo2_2.log'; alter database rename file '+ASMDATA/hkrt/onlinelog/group_3.259.781033803' to '/u01/app/oracle/oradata/hkrt/redo3_1.log'; alter database rename file '+RECOVERY/hkrt/onlinelog/group_3.260.781033809' to '/u01/app/oracle/oradata/hkrt/redo3_2.log'; alter database rename file '+ASMDATA/hkrt/onlinelog/group_4.258.781033815' to '/u01/app/oracle/oradata/hkrt/redo4_1.log'; alter database rename file '+RECOVERY/hkrt/onlinelog/group_4.261.781033821' to '/u01/app/oracle/oradata/hkrt/redo4_2.log'; alter database rename file '+ASMDATA/hkrt/onlinelog/group_5.262.781033549' to '/u01/app/oracle/oradata/hkrt/redo5_1.log'; alter database rename file '+RECOVERY/hkrt/onlinelog/group_5.259.781033555' to '/u01/app/oracle/oradata/hkrt/redo5_2.log'; alter database rename file '+ASMDATA/hkrt/onlinelog/group_6.257.781033825' to '/u01/app/oracle/oradata/hkrt/redo6_1.log'; alter database rename file '+RECOVERY/hkrt/onlinelog/group_6.262.781033831' to '/u01/app/oracle/oradata/hkrt/redo6_2.log'; -- 上面操作在執行的時候會報ERROR,類似如下: SQL> alter database rename file '+ASMDATA/hkrt/onlinelog/group_6.257.781033825' to '/u01/app/oracle/oradata/hkrt/redo6_1.log'; alter database rename file '+ASMDATA/hkrt/onlinelog/group_6.257.781033825' to '/u01/app/oracle/oradata/hkrt/redo6_1.log' * ERROR at line 1: ORA-03113: end-of-file on communication channel Process ID: 14779 Session ID: 158 Serial number: 3 -- 可見報錯後session被斷開,我們需要重新連線例項繼續往下執行 聯機日誌檔案修改之後檢視 SQL> set pagesize 9999 SQL> select member from v$logfile; MEMBER -------------------------------------------------------------------------------- /u01/app/oracle/oradata/hkrt/redo5_1.log /u01/app/oracle/oradata/hkrt/redo5_2.log /u01/app/oracle/oradata/hkrt/redo2_1.log /u01/app/oracle/oradata/hkrt/redo2_2.log /u01/app/oracle/oradata/hkrt/redo1_1.log /u01/app/oracle/oradata/hkrt/redo1_2.log /u01/app/oracle/oradata/hkrt/redo3_1.log /u01/app/oracle/oradata/hkrt/redo3_2.log /u01/app/oracle/oradata/hkrt/redo4_1.log /u01/app/oracle/oradata/hkrt/redo4_2.log /u01/app/oracle/oradata/hkrt/redo6_1.log /u01/app/oracle/oradata/hkrt/redo6_2.log 12 rows selected.
10.恢復資料庫
RMAN> recover database; Starting recover at 12-DEC-2012 01:07:39 using channel ORA_DISK_1 starting media recovery channel ORA_DISK_1: starting archived log restore to default destination channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=515 channel ORA_DISK_1: restoring archived log archived log thread=2 sequence=506 channel ORA_DISK_1: reading from backup piece /data/bak/arch_HKRT_1onsi78l_1_1 channel ORA_DISK_1: piece handle=/data/bak/arch_HKRT_1onsi78l_1_1 tag=BACKUPARCH channel ORA_DISK_1: restored backup piece 1 channel ORA_DISK_1: restore complete, elapsed time: 00:03:35 archived log file name=/u01/arch/1_515_781033526.dbf thread=1 sequence=515 archived log file name=/u01/arch/2_506_781033526.dbf thread=2 sequence=506 channel ORA_DISK_1: starting archived log restore to default destination channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=516 channel ORA_DISK_1: restoring archived log archived log thread=2 sequence=507 channel ORA_DISK_1: reading from backup piece /data/bak/arch_HKRT_1pnsi7ha_1_1 channel ORA_DISK_1: piece handle=/data/bak/arch_HKRT_1pnsi7ha_1_1 tag=BACKUPARCH channel ORA_DISK_1: restored backup piece 1 channel ORA_DISK_1: restore complete, elapsed time: 00:00:01 archived log file name=/u01/arch/1_516_781033526.dbf thread=1 sequence=516 archived log file name=/u01/arch/2_507_781033526.dbf thread=2 sequence=507 unable to find archived log archived log thread=2 sequence=508 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of recover command at 12/12/2012 01:11:21 RMAN-06054: media recovery requesting unknown archived log for thread 2 with sequence 508 and starting SCN of 121279435
11.RESETLOGS開啟資料庫
SQL> alter database open resetlogs; Database altered. 完整輸出日誌內容: alter database open resetlogs Errors in file /u01/app/oracle/diag/rdbms/hkrt/hkrt/trace/hkrt_ora_14794.trc: ORA-00313: open failed for members of log group 1 of thread 1 ORA-00312: online log 1 thread 1: '/u01/app/oracle/oradata/hkrt/redo1_2.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 ORA-00312: online log 1 thread 1: '/u01/app/oracle/oradata/hkrt/redo1_1.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 Errors in file /u01/app/oracle/diag/rdbms/hkrt/hkrt/trace/hkrt_ora_14794.trc: ORA-00313: open failed for members of log group 1 of thread 1 ORA-00312: online log 1 thread 1: '/u01/app/oracle/oradata/hkrt/redo1_2.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 ORA-00312: online log 1 thread 1: '/u01/app/oracle/oradata/hkrt/redo1_1.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 Errors in file /u01/app/oracle/diag/rdbms/hkrt/hkrt/trace/hkrt_ora_14794.trc: ORA-00313: open failed for members of log group 2 of thread 1 ORA-00312: online log 2 thread 1: '/u01/app/oracle/oradata/hkrt/redo2_2.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 ORA-00312: online log 2 thread 1: '/u01/app/oracle/oradata/hkrt/redo2_1.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 Errors in file /u01/app/oracle/diag/rdbms/hkrt/hkrt/trace/hkrt_ora_14794.trc: ORA-00313: open failed for members of log group 2 of thread 1 ORA-00312: online log 2 thread 1: '/u01/app/oracle/oradata/hkrt/redo2_2.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 ORA-00312: online log 2 thread 1: '/u01/app/oracle/oradata/hkrt/redo2_1.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 Errors in file /u01/app/oracle/diag/rdbms/hkrt/hkrt/trace/hkrt_ora_14794.trc: ORA-00313: open failed for members of log group 3 of thread 2 ORA-00312: online log 3 thread 2: '/u01/app/oracle/oradata/hkrt/redo3_2.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 ORA-00312: online log 3 thread 2: '/u01/app/oracle/oradata/hkrt/redo3_1.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 Errors in file /u01/app/oracle/diag/rdbms/hkrt/hkrt/trace/hkrt_ora_14794.trc: ORA-00313: open failed for members of log group 3 of thread 2 ORA-00312: online log 3 thread 2: '/u01/app/oracle/oradata/hkrt/redo3_2.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 ORA-00312: online log 3 thread 2: '/u01/app/oracle/oradata/hkrt/redo3_1.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 Errors in file /u01/app/oracle/diag/rdbms/hkrt/hkrt/trace/hkrt_ora_14794.trc: ORA-00313: open failed for members of log group 4 of thread 2 ORA-00312: online log 4 thread 2: '/u01/app/oracle/oradata/hkrt/redo4_2.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 ORA-00312: online log 4 thread 2: '/u01/app/oracle/oradata/hkrt/redo4_1.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 Errors in file /u01/app/oracle/diag/rdbms/hkrt/hkrt/trace/hkrt_ora_14794.trc: ORA-00313: open failed for members of log group 4 of thread 2 ORA-00312: online log 4 thread 2: '/u01/app/oracle/oradata/hkrt/redo4_2.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 ORA-00312: online log 4 thread 2: '/u01/app/oracle/oradata/hkrt/redo4_1.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 Errors in file /u01/app/oracle/diag/rdbms/hkrt/hkrt/trace/hkrt_ora_14794.trc: ORA-00313: open failed for members of log group 5 of thread 1 ORA-00312: online log 5 thread 1: '/u01/app/oracle/oradata/hkrt/redo5_2.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 ORA-00312: online log 5 thread 1: '/u01/app/oracle/oradata/hkrt/redo5_1.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 Errors in file /u01/app/oracle/diag/rdbms/hkrt/hkrt/trace/hkrt_ora_14794.trc: ORA-00313: open failed for members of log group 5 of thread 1 ORA-00312: online log 5 thread 1: '/u01/app/oracle/oradata/hkrt/redo5_2.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 ORA-00312: online log 5 thread 1: '/u01/app/oracle/oradata/hkrt/redo5_1.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 Errors in file /u01/app/oracle/diag/rdbms/hkrt/hkrt/trace/hkrt_ora_14794.trc: ORA-00313: open failed for members of log group 6 of thread 2 ORA-00312: online log 6 thread 2: '/u01/app/oracle/oradata/hkrt/redo6_2.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 ORA-00312: online log 6 thread 2: '/u01/app/oracle/oradata/hkrt/redo6_1.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 Errors in file /u01/app/oracle/diag/rdbms/hkrt/hkrt/trace/hkrt_ora_14794.trc: ORA-00313: open failed for members of log group 6 of thread 2 ORA-00312: online log 6 thread 2: '/u01/app/oracle/oradata/hkrt/redo6_2.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 ORA-00312: online log 6 thread 2: '/u01/app/oracle/oradata/hkrt/redo6_1.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 RESETLOGS after incomplete recovery UNTIL CHANGE 121279435 Resetting resetlogs activation ID 3199883568 (0xbeba5930) Errors in file /u01/app/oracle/diag/rdbms/hkrt/hkrt/trace/hkrt_ora_14794.trc: ORA-00313: open failed for members of log group 1 of thread 1 ORA-00312: online log 1 thread 1: '/u01/app/oracle/oradata/hkrt/redo1_2.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 ORA-00312: online log 1 thread 1: '/u01/app/oracle/oradata/hkrt/redo1_1.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 Errors in file /u01/app/oracle/diag/rdbms/hkrt/hkrt/trace/hkrt_ora_14794.trc: ORA-00313: open failed for members of log group 1 of thread 1 ORA-00312: online log 1 thread 1: '/u01/app/oracle/oradata/hkrt/redo1_2.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 ORA-00312: online log 1 thread 1: '/u01/app/oracle/oradata/hkrt/redo1_1.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 Errors in file /u01/app/oracle/diag/rdbms/hkrt/hkrt/trace/hkrt_ora_14794.trc: ORA-00313: open failed for members of log group 2 of thread 1 ORA-00312: online log 2 thread 1: '/u01/app/oracle/oradata/hkrt/redo2_2.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 ORA-00312: online log 2 thread 1: '/u01/app/oracle/oradata/hkrt/redo2_1.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 Errors in file /u01/app/oracle/diag/rdbms/hkrt/hkrt/trace/hkrt_ora_14794.trc: ORA-00313: open failed for members of log group 2 of thread 1 ORA-00312: online log 2 thread 1: '/u01/app/oracle/oradata/hkrt/redo2_2.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 ORA-00312: online log 2 thread 1: '/u01/app/oracle/oradata/hkrt/redo2_1.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 Errors in file /u01/app/oracle/diag/rdbms/hkrt/hkrt/trace/hkrt_ora_14794.trc: ORA-00313: open failed for members of log group 3 of thread 2 ORA-00312: online log 3 thread 2: '/u01/app/oracle/oradata/hkrt/redo3_2.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 ORA-00312: online log 3 thread 2: '/u01/app/oracle/oradata/hkrt/redo3_1.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 Errors in file /u01/app/oracle/diag/rdbms/hkrt/hkrt/trace/hkrt_ora_14794.trc: ORA-00313: open failed for members of log group 3 of thread 2 ORA-00312: online log 3 thread 2: '/u01/app/oracle/oradata/hkrt/redo3_2.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 ORA-00312: online log 3 thread 2: '/u01/app/oracle/oradata/hkrt/redo3_1.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 Wed Dec 12 01:13:12 2012 Errors in file /u01/app/oracle/diag/rdbms/hkrt/hkrt/trace/hkrt_ora_14794.trc: ORA-00313: open failed for members of log group 4 of thread 2 ORA-00312: online log 4 thread 2: '/u01/app/oracle/oradata/hkrt/redo4_2.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 ORA-00312: online log 4 thread 2: '/u01/app/oracle/oradata/hkrt/redo4_1.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 Errors in file /u01/app/oracle/diag/rdbms/hkrt/hkrt/trace/hkrt_ora_14794.trc: ORA-00313: open failed for members of log group 4 of thread 2 ORA-00312: online log 4 thread 2: '/u01/app/oracle/oradata/hkrt/redo4_2.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 ORA-00312: online log 4 thread 2: '/u01/app/oracle/oradata/hkrt/redo4_1.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 Errors in file /u01/app/oracle/diag/rdbms/hkrt/hkrt/trace/hkrt_ora_14794.trc: ORA-00313: open failed for members of log group 5 of thread 1 ORA-00312: online log 5 thread 1: '/u01/app/oracle/oradata/hkrt/redo5_2.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 ORA-00312: online log 5 thread 1: '/u01/app/oracle/oradata/hkrt/redo5_1.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 Errors in file /u01/app/oracle/diag/rdbms/hkrt/hkrt/trace/hkrt_ora_14794.trc: ORA-00313: open failed for members of log group 5 of thread 1 ORA-00312: online log 5 thread 1: '/u01/app/oracle/oradata/hkrt/redo5_2.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 ORA-00312: online log 5 thread 1: '/u01/app/oracle/oradata/hkrt/redo5_1.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 Errors in file /u01/app/oracle/diag/rdbms/hkrt/hkrt/trace/hkrt_ora_14794.trc: ORA-00313: open failed for members of log group 6 of thread 2 ORA-00312: online log 6 thread 2: '/u01/app/oracle/oradata/hkrt/redo6_2.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 ORA-00312: online log 6 thread 2: '/u01/app/oracle/oradata/hkrt/redo6_1.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 Errors in file /u01/app/oracle/diag/rdbms/hkrt/hkrt/trace/hkrt_ora_14794.trc: ORA-00313: open failed for members of log group 6 of thread 2 ORA-00312: online log 6 thread 2: '/u01/app/oracle/oradata/hkrt/redo6_2.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 ORA-00312: online log 6 thread 2: '/u01/app/oracle/oradata/hkrt/redo6_1.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 Wed Dec 12 01:13:25 2012 Setting recovery target incarnation to 3 Wed Dec 12 01:13:25 2012 Assigning activation ID 3220640364 (0xbff7126c) LGWR: STARTING ARCH PROCESSES Wed Dec 12 01:13:25 2012 ARC0 started with pid=21, OS id=14930 ARC0: Archival started LGWR: STARTING ARCH PROCESSES COMPLETE ARC0: STARTING ARCH PROCESSES Wed Dec 12 01:13:26 2012 ARC1 started with pid=25, OS id=14934 Wed Dec 12 01:13:26 2012 ARC2 started with pid=26, OS id=14938 Wed Dec 12 01:13:26 2012 ARC3 started with pid=27, OS id=14942 ARC1: Archival started ARC2: Archival started ARC1: Becoming the 'no FAL' ARCH ARC1: Becoming the 'no SRL' ARCH ARC2: Becoming the heartbeat ARCH Thread 1 opened at log sequence 1 Current log# 1 seq# 1 mem# 0: /u01/app/oracle/oradata/hkrt/redo1_1.log Current log# 1 seq# 1 mem# 1: /u01/app/oracle/oradata/hkrt/redo1_2.log Successful open of redo thread 1 Wed Dec 12 01:13:26 2012 MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set Wed Dec 12 01:13:26 2012 SMON: enabling cache recovery ARC3: Archival started ARC0: STARTING ARCH PROCESSES COMPLETE Redo thread 2 internally disabled at seq 1 (CKPT) ARC3: Archiving disabled thread 2 sequence 1 Archived Log entry 1974 added for thread 2 sequence 1 ID 0x0 dest 1: Successfully onlined Undo Tablespace 2. Dictionary check beginning Wed Dec 12 01:13:31 2012 Errors in file /u01/app/oracle/diag/rdbms/hkrt/hkrt/trace/hkrt_dbw0_14440.trc: ORA-01157: cannot identify/lock data file 201 - see DBWR trace file ORA-01110: data file 201: '/u01/app/oracle/oradata/hkrt/temp01.dbf' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 Errors in file /u01/app/oracle/diag/rdbms/hkrt/hkrt/trace/hkrt_dbw0_14440.trc: ORA-01186: file 201 failed verification tests ORA-01157: cannot identify/lock data file 201 - see DBWR trace file ORA-01110: data file 201: '/u01/app/oracle/oradata/hkrt/temp01.dbf' File 201 not verified due to error ORA-01157 Dictionary check complete Verifying file header compatibility for 11g tablespace encryption.. Verifying 11g file header compatibility for tablespace encryption completed SMON: enabling tx recovery Re-creating tempfile /u01/app/oracle/oradata/hkrt/temp01.dbf Database Characterset is AL32UTF8 No Resource Manager plan active replication_dependency_tracking turned off (no async multimaster replication found) Wed Dec 12 01:13:38 2012 Starting background process QMNC Wed Dec 12 01:13:38 2012 QMNC started with pid=28, OS id=14950 LOGSTDBY: Validating controlfile with logical metadata LOGSTDBY: Validation complete Completed: alter database open resetlogs Wed Dec 12 01:13:52 2012 Starting background process CJQ0 Wed Dec 12 01:13:52 2012 CJQ0 started with pid=34, OS id=14982
12.後續檢查
到這裡RAC到單例項備份恢復已經完畢,我們可以簡單檢查下
到這裡RAC到單例項備份恢復已經完畢,我們可以簡單檢查下 SQL> select thread#,status,enabled from v$thread; THREAD# STATUS ENABLED ---------- ------------ ---------------- 1 OPEN PUBLIC 2 CLOSED PUBLIC SQL> select group#,thread#,archived,status from v$log; GROUP# THREAD# ARCHIV STATUS ---------- ---------- ------ -------------------------------- 1 1 NO CURRENT 2 1 YES UNUSED 3 2 YES ACTIVE 4 2 YES UNUSED 5 1 YES UNUSED 6 2 YES UNUSED 6 rows selected. SQL> archive log list Database log mode Archive Mode Automatic archival Enabled Archive destination /u01/arch Oldest online log sequence 1 Next log sequence to archive 1 Current log sequence 1
最後聊一下從full backupset裡如何找出引數檔案和控制檔案備份集的方法
[oracle@luocs bak]$ ls -l total 10951248 -rw-r--r-- 1 oracle oinstall 3393916104 Dec 11 08:22 ArchFile20121211.tgz -rw-r----- 1 oracle oinstall 1953459712 Dec 11 01:06 arch_HKRT_1nnsi78j_1_1 -rw-r----- 1 oracle oinstall 1887318528 Dec 11 01:06 arch_HKRT_1onsi78l_1_1 -rw-r----- 1 oracle oinstall 32256 Dec 11 01:06 arch_HKRT_1pnsi7ha_1_1 -rw-r--r-- 1 oracle oinstall 569727216 Dec 11 08:21 fulldb20121211.tgz -rw-r----- 1 oracle oinstall 1928757248 Dec 11 01:01 full_HKRT_1jnsi76k_1_1 -rw-r----- 1 oracle oinstall 1450770432 Dec 11 01:01 full_HKRT_1knsi76k_1_1 -rw-r----- 1 oracle oinstall 18972672 Dec 11 01:01 full_HKRT_1lnsi77o_1_1 -rw-r----- 1 oracle oinstall 98304 Dec 11 01:01 full_HKRT_1mnsi77q_1_1
這裡以full開頭的就是資料檔案+引數檔案+控制檔案的備份集,分辨方法非常簡單,看大小即可。
一般最小的為引數檔案備份集,大的是資料檔案備份集。
如果你難以確定,直接到RMAN裡嘗試下就可以。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/196700/viewspace-1061212/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- rac到單例項的rman恢復單例
- RMAN異機恢復:RAC到單例項單例
- Oracle 11.2.0.4 從單例項,使用RMAN 異機恢復到RACOracle單例
- rac恢復到單例項單例
- Rman 單例項filesystem(Windows)恢復到ASM環境(Linux)單例WindowsASMLinux
- RAC asm恢復到單例項ASM單例
- rac asm 恢復到 單例項 1ASM單例
- rac asm 恢復到 單例項 2ASM單例
- oracle 10g rac 單例項恢復至ORACLE10G RAC RMANOracle 10g單例
- Oracle例項恢復Oracle
- RAC恢復到單例項節點上單例
- 恢復rac db(raw)到單例項下單例
- 單例項備份集恢復到RAC單例
- RAC從帶庫到單例項的恢復單例
- 恢復RAC資料庫到單例項(ASM)資料庫單例ASM
- Oracle例項恢復和介質恢復Oracle
- 單例項恢復至RAC單例
- 10g rac asm 恢復到 單例項(二)ASM單例
- 10g rac asm 恢復到 單例項(一)ASM單例
- RMAN例項備份與恢復詳解
- Oracle例項恢復機制Oracle
- Oracle 例項恢復詳解Oracle
- oracle database 例項恢復和介質恢復OracleDatabase
- 記錄一次Oracle 11.2.0.4 RAC異地恢復到單例項Oracle單例
- ORACLE主從中斷後,如何恢復(單例項)Oracle單例
- RAC資料庫恢復到單例項資料庫資料庫單例
- Oracle 11g 例項恢復Oracle
- 單例項備份恢復成RAC單例
- RMAN跨版本恢復--從Oracle10.2.0.5恢復到Oracle11.2.0.4Oracle
- RAC 資料庫恢復到單例項下並且基於時間點恢復資料庫單例
- oracle例項恢復的學習理解Oracle
- RMAN恢復簡單操作
- rman恢復方案和oracle異機恢復Oracle
- oracle實驗記錄 (恢復-rman恢復)Oracle
- oracle instance recovery例項恢復小記Oracle
- 一次dataguard備份恢復到單例項的故障記錄單例
- 【kingsql分享】將RAC資料庫異機恢復到單例項(Ⅰ)SQL資料庫單例
- Oracle RMAN恢復測試Oracle