Oracle 從備份的控制檔案進行完全恢複

來源:互聯網
上載者:User

SYS@orcl#shutdown abort;
 Oracle 常式已經關閉。
 SYS@orcl#
 oracle@oracle:~/product/10.2/db_1/dbs> rman target /
 
復原管理員: Release 11.1.0.6.0 - Production on 星期三 6月 5 23:13:10 2013
 
Copyright (c) 1982, 2007, Oracle.  All rights reserved.
 
已串連到目標資料庫 (未啟動)
 
RMAN> startup nomount;
 
Oracle 執行個體已啟動
 
系統全域地區總計    805875712 位元組
 
Fixed Size                    2148720 位元組
 Variable Size                520095376 位元組
 Database Buffers            276824064 位元組
 Redo Buffers                  6807552 位元組
 
RMAN> restore controlfile from '/opt/oracle/product/10.2/db_1/dbs/snapcf_orcl.f';
 
啟動 restore 於 05-6月 -13
 使用目標資料庫控制檔案替代恢複目錄
 分配的通道: ORA_DISK_1
 通道 ORA_DISK_1: SID=152 裝置類型=DISK
 
通道 ORA_DISK_1: 已複製控制檔案副本
 輸出檔案名=/opt/oracle/oradata/ORCL/controlfile/o1_mf_7q9c8orh_.ctl
 輸出檔案名=/opt/oracle/flash_recovery_area/ORCL/controlfile/o1_mf_7q9c8pcf_.ctl
 完成 restore 於 05-6月 -13
 
RMAN> exit
 SYS@orcl#select file#,creation_change#,checkpoint_change# from v$datafile_header;
 
    FILE# CREATION_CHANGE# CHECKPOINT_CHANGE#
 ---------- ---------------- ------------------
          1                7            4918372
          2            1490            4918372
          3          841603            4918372
          4            14607            4918372
          5          955886            4918372
          6          958063            4918372
          7          959259            4918372
          8          3975193            4918372
          9          3977982            4918372
        10          3978313            4918372
        11          4400356            4918372
 
    FILE# CREATION_CHANGE# CHECKPOINT_CHANGE#
 ---------- ---------------- ------------------
        12          4400418            4918372
 
已選擇12行。
 
SYS@orcl#select file#,creation_change#,checkpoint_change#,last_change# from v$datafile;
 
    FILE# CREATION_CHANGE# CHECKPOINT_CHANGE# LAST_CHANGE#
 ---------- ---------------- ------------------ ------------
          1                7            4393541
          2            1490            4393541
          3          841603            4393541
          4            14607            4393541
          5          955886            4393541
          6          958063            4393541
          7          959259            4393541
          8          3975193            4393541
          9          3977982            4393541
        10          3978313            4393541
        11          4400356            4400358
 
    FILE# CREATION_CHANGE# CHECKPOINT_CHANGE# LAST_CHANGE#
 ---------- ---------------- ------------------ ------------
        12          4400418            4400420
 
已選擇12行。
 
SYS@orcl#
 YS@orcl#alter database open;
 alter database open
 *
 第 1 行出現錯誤:
 ORA-01589: 要開啟資料庫則必須使用 RESETLOGS 或 NORESETLOGS 選項
 
 
 

SYS@orcl#alter database open resetlogs;
 alter database open resetlogs
 *
 第 1 行出現錯誤:
 ORA-01194: 檔案 1 需要更多的恢複來保持一致性
 ORA-01110: 資料檔案 1:
 '/opt/oracle/oradata/ORCL/datafile/o1_mf_system_8no75lqw_.dbf'
 

SYS@orcl#
 嘗試進行恢複:
 SYS@orcl#recover database using backup controlfile
 ORA-00279: 更改 4400440 (在 05/18/2013 16:04:12 產生) 對於線程 1 是必需的
 ORA-00289: 建議:
 /opt/oracle/flash_recovery_area/ORCL/archivelog/2013_05_18/o1_mf_1_81_8sh7pk32_.
 arc
 ORA-00280: 更改 4400440 (用於線程 1) 在序列 #81 中
 

指定日誌: {<RET>=suggested | filename | AUTO | CANCEL}
 auto
 ORA-00279: 更改 4419709 (在 05/18/2013 23:31:28 產生) 對於線程 1 是必需的
 ORA-00289: 建議:
 /opt/oracle/flash_recovery_area/ORCL/archivelog/2013_05_19/o1_mf_1_82_8sjsowfc_.
 arc
 ORA-00280: 更改 4419709 (用於線程 1) 在序列 #82 中
 ORA-00278: 此恢複不再需要記錄檔
 '/opt/oracle/flash_recovery_area/ORCL/archivelog/2013_05_18/o1_mf_1_81_8sh7pk32_
 .arc'
 

ORA-00279: 更改 4444358 (在 05/19/2013 13:44:27 產生) 對於線程 1 是必需的
 ORA-00289: 建議:
 /opt/oracle/flash_recovery_area/ORCL/archivelog/2013_05_20/o1_mf_1_83_8snczbm2_.
 arc
 ORA-00280: 更改 4444358 (用於線程 1) 在序列 #83 中
 ORA-00278: 此恢複不再需要記錄檔
 '/opt/oracle/flash_recovery_area/ORCL/archivelog/2013_05_19/o1_mf_1_82_8sjsowfc_
 .arc'
 

ORA-00279: 更改 4489193 (在 05/20/2013 22:15:06 產生) 對於線程 1 是必需的
 ORA-00289: 建議:
 /opt/oracle/flash_recovery_area/ORCL/archivelog/2013_05_20/o1_mf_1_84_8sngy53f_.
 arc
 ORA-00280: 更改 4489193 (用於線程 1) 在序列 #84 中
 ORA-00278: 此恢複不再需要記錄檔
 '/opt/oracle/flash_recovery_area/ORCL/archivelog/2013_05_20/o1_mf_1_83_8snczbm2_
 .arc'
 

ORA-00279: 更改 4491206 (在 05/20/2013 23:05:40 產生) 對於線程 1 是必需的
 ORA-00289: 建議:
 /opt/oracle/flash_recovery_area/ORCL/archivelog/2013_05_20/o1_mf_1_85_8sngyk4r_.
 arc
 ORA-00280: 更改 4491206 (用於線程 1) 在序列 #85 中
 ORA-00278: 此恢複不再需要記錄檔
 '/opt/oracle/flash_recovery_area/ORCL/archivelog/2013_05_20/o1_mf_1_84_8sngy53f_
 .arc'
 

ORA-00279: 更改 4491216 (在 05/20/2013 23:05:53 產生) 對於線程 1 是必需的
 ORA-00289: 建議:
 /opt/oracle/flash_recovery_area/ORCL/archivelog/2013_05_20/o1_mf_1_86_8snh06s7_.
 arc
 ORA-00280: 更改 4491216 (用於線程 1) 在序列 #86 中
 ORA-00278: 此恢複不再需要記錄檔
 '/opt/oracle/flash_recovery_area/ORCL/archivelog/2013_05_20/o1_mf_1_85_8sngyk4r_
 .arc'
 

ORA-00279: 更改 4491242 (在 05/20/2013 23:06:46 產生) 對於線程 1 是必需的
 ORA-00289: 建議:
 /opt/oracle/flash_recovery_area/ORCL/archivelog/2013_05_20/o1_mf_1_87_8snh0rpw_.
 arc
 ORA-00280: 更改 4491242 (用於線程 1) 在序列 #87 中
 ORA-00278: 此恢複不再需要記錄檔
 '/opt/oracle/flash_recovery_area/ORCL/archivelog/2013_05_20/o1_mf_1_86_8snh06s7_
 .arc'
 

ORA-00279: 更改 4491256 (在 05/20/2013 23:07:04 產生) 對於線程 1 是必需的
 ORA-00289: 建議:
 /opt/oracle/flash_recovery_area/ORCL/archivelog/2013_05_21/o1_mf_1_88_8sq3wv1s_.
 arc
 ORA-00280: 更改 4491256 (用於線程 1) 在序列 #88 中
 ORA-00278: 此恢複不再需要記錄檔
 '/opt/oracle/flash_recovery_area/ORCL/archivelog/2013_05_20/o1_mf_1_87_8snh0rpw_
 .arc'
 

ORA-00279: 更改 4518080 (在 05/21/2013 23:15:38 產生) 對於線程 1 是必需的
 ORA-00289: 建議:
 /opt/oracle/flash_recovery_area/ORCL/archivelog/2013_05_21/o1_mf_1_89_8sq48362_.
 arc
 ORA-00280: 更改 4518080 (用於線程 1) 在序列 #89 中
 ORA-00278: 此恢複不再需要記錄檔
 '/opt/oracle/flash_recovery_area/ORCL/archivelog/2013_05_21/o1_mf_1_88_8sq3wv1s_
 .arc'
 

ORA-00279: 更改 4538405 (在 05/21/2013 23:21:39 產生) 對於線程 1 是必需的
 ORA-00289: 建議:
 /opt/oracle/flash_recovery_area/ORCL/archivelog/2013_05_21/o1_mf_1_90_8sq4oryo_.
 arc
 ORA-00280: 更改 4538405 (用於線程 1) 在序列 #90 中
 ORA-00278: 此恢複不再需要記錄檔
 '/opt/oracle/flash_recovery_area/ORCL/archivelog/2013_05_21/o1_mf_1_89_8sq48362_
 .arc'
 

ORA-00279: 更改 4558870 (在 05/21/2013 23:28:56 產生) 對於線程 1 是必需的
 ORA-00289: 建議:
 /opt/oracle/flash_recovery_area/ORCL/archivelog/2013_05_21/o1_mf_1_91_8sq5026m_.
 arc
 ORA-00280: 更改 4558870 (用於線程 1) 在序列 #91 中
 ORA-00278: 此恢複不再需要記錄檔
 '/opt/oracle/flash_recovery_area/ORCL/archivelog/2013_05_21/o1_mf_1_90_8sq4oryo_
 .arc'
 

ORA-00279: 更改 4579214 (在 05/21/2013 23:34:26 產生) 對於線程 1 是必需的
 ORA-00289: 建議:
 /opt/oracle/flash_recovery_area/ORCL/archivelog/2013_05_26/o1_mf_1_92_8t36mf0h_.
 arc
 ORA-00280: 更改 4579214 (用於線程 1) 在序列 #92 中
 ORA-00278: 此恢複不再需要記錄檔
 '/opt/oracle/flash_recovery_area/ORCL/archivelog/2013_05_21/o1_mf_1_91_8sq5026m_
 .arc'
 

ORA-00279: 更改 4591978 (在 05/26/2013 13:15:24 產生) 對於線程 1 是必需的
 ORA-00289: 建議:
 /opt/oracle/flash_recovery_area/ORCL/archivelog/2013_05_26/o1_mf_1_93_8t3mjq4n_.
 arc
 ORA-00280: 更改 4591978 (用於線程 1) 在序列 #93 中
 ORA-00278: 此恢複不再需要記錄檔
 '/opt/oracle/flash_recovery_area/ORCL/archivelog/2013_05_26/o1_mf_1_92_8t36mf0h_
 .arc'
 

ORA-00279: 更改 4614777 (在 05/26/2013 16:55:50 產生) 對於線程 1 是必需的
 ORA-00289: 建議:
 /opt/oracle/flash_recovery_area/ORCL/archivelog/2013_05_27/o1_mf_1_94_8t6ns7c9_.
 arc
 ORA-00280: 更改 4614777 (用於線程 1) 在序列 #94 中
 ORA-00278: 此恢複不再需要記錄檔
 '/opt/oracle/flash_recovery_area/ORCL/archivelog/2013_05_26/o1_mf_1_93_8t3mjq4n_
 .arc'
 

ORA-00279: 更改 4652531 (在 05/27/2013 20:35:50 產生) 對於線程 1 是必需的
 ORA-00289: 建議:
 /opt/oracle/flash_recovery_area/ORCL/archivelog/2013_05_27/o1_mf_1_95_8t6wq99o_.
 arc
 ORA-00280: 更改 4652531 (用於線程 1) 在序列 #95 中
 ORA-00278: 此恢複不再需要記錄檔
 '/opt/oracle/flash_recovery_area/ORCL/archivelog/2013_05_27/o1_mf_1_94_8t6ns7c9_
 .arc'
 

ORA-00279: 更改 4672336 (在 05/27/2013 22:51:20 產生) 對於線程 1 是必需的
 ORA-00289: 建議:
 /opt/oracle/flash_recovery_area/ORCL/archivelog/2013_05_29/o1_mf_1_96_8td3yzv5_.
 arc
 ORA-00280: 更改 4672336 (用於線程 1) 在序列 #96 中
 ORA-00278: 此恢複不再需要記錄檔
 '/opt/oracle/flash_recovery_area/ORCL/archivelog/2013_05_27/o1_mf_1_95_8t6wq99o_
 .arc'
 

ORA-00279: 更改 4704486 (在 05/29/2013 22:25:35 產生) 對於線程 1 是必需的
 ORA-00289: 建議:
 /opt/oracle/flash_recovery_area/ORCL/archivelog/2013_05_30/o1_mf_1_97_8tgq14y8_.
 arc
 ORA-00280: 更改 4704486 (用於線程 1) 在序列 #97 中
 ORA-00278: 此恢複不再需要記錄檔
 '/opt/oracle/flash_recovery_area/ORCL/archivelog/2013_05_29/o1_mf_1_96_8td3yzv5_
 .arc'
 

ORA-00279: 更改 4733613 (在 05/30/2013 22:03:16 產生) 對於線程 1 是必需的
 ORA-00289: 建議:
 /opt/oracle/flash_recovery_area/ORCL/archivelog/2013_06_01/o1_mf_1_98_8tmqz7h3_.
 arc
 ORA-00280: 更改 4733613 (用於線程 1) 在序列 #98 中
 ORA-00278: 此恢複不再需要記錄檔
 '/opt/oracle/flash_recovery_area/ORCL/archivelog/2013_05_30/o1_mf_1_97_8tgq14y8_
 .arc'
 

ORA-00279: 更改 4764093 (在 06/01/2013 19:49:58 產生) 對於線程 1 是必需的
 ORA-00289: 建議:
 /opt/oracle/flash_recovery_area/ORCL/archivelog/2013_06_01/o1_mf_1_99_8tmtn5ch_.
 arc
 ORA-00280: 更改 4764093 (用於線程 1) 在序列 #99 中
 ORA-00278: 此恢複不再需要記錄檔
 '/opt/oracle/flash_recovery_area/ORCL/archivelog/2013_06_01/o1_mf_1_98_8tmqz7h3_
 .arc'
 

ORA-00279: 更改 4786052 (在 06/01/2013 20:35:17 產生) 對於線程 1 是必需的
 ORA-00289: 建議:
 /opt/oracle/flash_recovery_area/ORCL/archivelog/2013_06_01/o1_mf_1_100_8tn3ndbb_
 .arc
 ORA-00280: 更改 4786052 (用於線程 1) 在序列 #100 中
 ORA-00278: 此恢複不再需要記錄檔
 '/opt/oracle/flash_recovery_area/ORCL/archivelog/2013_06_01/o1_mf_1_99_8tmtn5ch_
 .arc'
 

ORA-00279: 更改 4817616 (在 06/01/2013 23:08:59 產生) 對於線程 1 是必需的
 ORA-00289: 建議:
 /opt/oracle/flash_recovery_area/ORCL/archivelog/2013_06_05/o1_mf_1_101_8tyj6hqj_
 .arc
 ORA-00280: 更改 4817616 (用於線程 1) 在序列 #101 中
 ORA-00278: 此恢複不再需要記錄檔
 '/opt/oracle/flash_recovery_area/ORCL/archivelog/2013_06_01/o1_mf_1_100_8tn3ndbb
 _.arc'
 

ORA-00279: 更改 4862007 (在 06/02/2013 09:59:40 產生) 對於線程 1 是必需的
 ORA-00289: 建議:
 /opt/oracle/flash_recovery_area/ORCL/archivelog/2013_06_05/o1_mf_1_102_8tyj6hs8_
 .arc
 ORA-00280: 更改 4862007 (用於線程 1) 在序列 #102 中
 ORA-00278: 此恢複不再需要記錄檔
 '/opt/oracle/flash_recovery_area/ORCL/archivelog/2013_06_05/o1_mf_1_101_8tyj6hqj
 _.arc'
 

ORA-00279: 更改 4882809 (在 06/02/2013 10:11:27 產生) 對於線程 1 是必需的
 ORA-00289: 建議:
 /opt/oracle/flash_recovery_area/ORCL/archivelog/2013_06_05/o1_mf_1_103_8tyj6sy0_
 .arc
 ORA-00280: 更改 4882809 (用於線程 1) 在序列 #103 中
 ORA-00278: 此恢複不再需要記錄檔
 '/opt/oracle/flash_recovery_area/ORCL/archivelog/2013_06_05/o1_mf_1_102_8tyj6hs8
 _.arc'
 

ORA-00279: 更改 4904327 (在 06/05/2013 21:44:57 產生) 對於線程 1 是必需的
 ORA-00289: 建議:
 /opt/oracle/flash_recovery_area/ORCL/archivelog/2013_06_05/o1_mf_1_104_8tyl1p33_
 .arc
 ORA-00280: 更改 4904327 (用於線程 1) 在序列 #104 中
 ORA-00278: 此恢複不再需要記錄檔
 '/opt/oracle/flash_recovery_area/ORCL/archivelog/2013_06_05/o1_mf_1_103_8tyj6sy0
 _.arc'
 

ORA-00279: 更改 4915553 (在 06/05/2013 22:16:21 產生) 對於線程 1 是必需的
 ORA-00289: 建議:
 /opt/oracle/flash_recovery_area/ORCL/archivelog/2013_06_05/o1_mf_1_105_%u_.arc
 ORA-00280: 更改 4915553 (用於線程 1) 在序列 #105 中
 ORA-00278: 此恢複不再需要記錄檔
 '/opt/oracle/flash_recovery_area/ORCL/archivelog/2013_06_05/o1_mf_1_104_8tyl1p33
 _.arc'
 

ORA-00308: 無法開啟歸檔日誌
 '/opt/oracle/flash_recovery_area/ORCL/archivelog/2013_06_05/o1_mf_1_105_%u_.arc'
 ORA-27037: 無法獲得檔案狀態
 Linux-x86_64 Error: 2: No such file or directory
 Additional information: 3
 

SYS@orcl#
 查看檔案這是最後一個歸檔日誌,那麼使用聯機日誌進行恢複:
 YS@orcl#select * from v$log;
 
    GROUP#    THREAD#  SEQUENCE#      BYTES    MEMBERS ARCHIV STATUS                          FIRST_CHANGE# FIRST_TIME
 ---------- ---------- ---------- ---------- ---------- ------ -------------------------------- ------------- --------------
          1          1        79  52428800          2 YES    INACTIVE                              4346916 16-5月 -13
          3          1        81  52428800          2 NO    CURRENT                                4393541 18-5月 -13
          2          1        80  52428800          2 YES    INACTIVE                              4369258 18-5月 -13
 完成一次完全恢複。
 
SYS@orcl#alter database open resetlogs;
 
資料庫已更改。
 
SYS@orcl#

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.