Oracle 9i資料壞塊的處理執行個體

來源:互聯網
上載者:User

筆者在一台生產用測試庫上SELECT一個表時出現ORA-01578,一個塊損壞,以前學習過塊損壞怎麼處理,到還真沒遇到過,今天總算讓我遇到了,還是一台生產用測試庫,就不用很緊張了。

資料庫版本是9.2.0.4,Oracle9i的RMAN有一個blockrecover命令,可以線上修複壞塊,以下就是使用RMAN修複壞塊的過程。

SQL> conn owi/owi
Connected.
SQL> select * from dpa_history;
select * from dpa_history
*
ERROR at line 1:
ORA-01578: ORACLE data block corrupted (file # 15, block # 18)
ORA-01110: data file 15: '/d01/app/oracle/oradata/dpa/dpa01.dbf'

報ORA-01578資料區塊損壞,以下使用RMAN命令查詢是否可以使用blockrecover命令恢複以及怎樣恢複

使用rman登入catalog資料庫

[ora9@rmanserver ~]$ rman target sys/oracle@dpa catalog rman/rman

Recovery Manager: Release 9.2.0.8.0 - Production

Copyright (c) 1995, 2002, Oracle Corporation.  All rights reserved.

connected to target database: DPA (DBID=843495022)
connected to recovery catalog database

尋找最近datafile 15的全備份,今天下午剛做了一次RMAN的全備份

RMAN> list backup of datafile 15;


List of Backup Sets
===================

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
643     Full    64K        DISK        00:00:27     16-MAR-09
BP Key: 650   Status: AVAILABLE   Tag: TAG20090316T154352
Piece Name: /d02/fullbackup/20090316_data_24_1
List of Datafiles in backup set 643
File LV Type Ckp SCN    Ckp Time  Name
---- -- ---- ---------- --------- ----
15      Full 11856250905 16-MAR-09 /d01/app/oracle/oradata/dpa/dpa01.dbf

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.