Linux x86平臺下Oracle 10.2.0.1 ORA-27094

xunzhaoxz發表於2010-11-15

Linux x86平臺下Oracle 10.2.0.1 ORA-27094

轉載請註明原文:http://xunzhaoxz.itpub.net/post/40016/508767

本文PDF下載http://xunzhaoxz.itpub.net/resource/40016/30981

一、環境說明

Oracle源主機

Oracle目標主機

主機平臺

RHEL5.4 2.6.18-164.el5

RHEL5.4 2.6.18-164.el5

主機名

olddbser

newdbser

DB name

oradb

oradb

例項名

oradb

oradb

Oracle版本

10.2.0.1

10.2.0.1

Oracle資料檔案儲存

Filesystem

LVM RAW LV

單機或RAC

單機

單機

在以上環境下使用rman進行資料庫遷移,在資料restore datafile步驟出現本案例。

二、 問題描述

將之前在olddbser上做好的備份集ftpndwdbser上,安裝oracle software only,重建密碼檔案、恢復引數檔案、控制檔案等都已順利完成,到restore datafile步驟時出現如下錯誤:

關鍵資訊:

ORA-19870: error reading backup piece /oracle/oradb-20101109-1flshds1_1_1.rman

ORA-19504: failed to create file "/oracle/oradata/oradb/system_1g"

ORA-27094: raw volume used can damage partition table

Additional information: -2

Additional information: 1073741824

[@more@]

完整日誌如下:

RMAN> @/oracle/restore_raw.rman

RMAN> run

2> {

3> SET NEWNAME FOR DATAFILE

'/oracle/oradata/ORADB/datafile/o1_mf_users_6ccmb0x6_.dbf'

TO '/oracle/oradata/oradb/user_128m';

4> SET NEWNAME FOR DATAFILE

'/oracle/oradata/ORADB/datafile/o1_mf_sysaux_6ccmb0pf_.dbf'

TO '/oracle/oradata/oradb/sysaux_512m';

5> SET NEWNAME FOR DATAFILE

'/oracle/oradata/ORADB/datafile/o1_mf_undotbs1_6ccmb0w4_.dbf'

TO '/oracle/oradata/oradb/undo01_512m';

6> SET NEWNAME FOR DATAFILE

'/oracle/oradata/ORADB/datafile/o1_mf_system_6ccmb0oy_.dbf'

TO '/oracle/oradata/oradb/system_1g';

7> set until scn 556840;

8> restore database;

9> switch datafile all;

10> recover database;

11> }

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET until clause

Starting restore at 2010-11-09 20:13:58

allocated channel: ORA_DISK_1

channel ORA_DISK_1: sid=156 devtype=DISK

channel ORA_DISK_1: starting datafile backupset restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

restoring datafile 00001 to /oracle/oradata/oradb/system_1g

restoring datafile 00002 to /oracle/oradata/oradb/undo01_512m

restoring datafile 00003 to /oracle/oradata/oradb/sysaux_512m

restoring datafile 00004 to /oracle/oradata/oradb/user_128m

channel ORA_DISK_1: reading from backup piece /oracle/oradb-20101109-1flshds1_1_1.rman

ORA-19870: error reading backup piece /oracle/oradb-20101109-1flshds1_1_1.rman

ORA-19504: failed to create file "/oracle/oradata/oradb/system_1g"

ORA-27094: raw volume used can damage partition table

Additional information: -2

Additional information: 1073741824

三、 故障排查

一開始想起源庫的RMAN中配置了備份集有效期為2天,至今已過去5天,懷疑是這個問題(備份集過期失效)引起的,於是將源庫的RMAN備份集有效期調整為1000天,並重新做了一次全備,再次恢復,問題依舊。

仔細看錯誤日誌“ORA-27094: raw volume used can damage partition table使用裸卷可能會損壞分割槽表?莫非跟AIX下的4k offset問題類似?

google了一把, 提到“從10.2.0.2開始oraclelinux下面支援直接使用LVM或者原始的硬碟或者硬碟分割槽的裝置檔案做datafile而不需要raw這個東西。”“不是要你打補丁到10.2.0.3,就可以直接使用/dev/vg01/lv01了麼?”

wolfop至少反應瞭如下兩個資訊:

1) 10.2.0.2開始支援Linux下的LVMdatafile

2) 可以直接使用lv,不需要系統的raw裝置。

metalink一把, 關鍵內容如下:

Applies to:

Oracle Server - Enterprise Edition - Version: 10.1.0.1 to 10.2.0.4

Linux x86

Symptoms

Error received when creating the controlfile on raw devices:

ORA-00202: control file: '/dev/oradata/prd/ebs01/cntrl01.dbf'

ORA-27094: raw volume used can damage partition table

Additional information: -2

Additional information: 536870912

ORA-205 signalled during: alter database mount...

.

Cause

Issue is be caused by:

Abstract: ORA-1501 ORA-27094 CREATING SINGLE INSTANCE DATABASE ON RAW DEVICES

which was found to be a duplicate of unpublished

Bug: 3628715 Abstract: CHANGES TO SKGFR.C TO SUPPORT LVMS ON LINUX

Solution

Download and apply if available for the version

要求打patch_3628715的補丁,即升級到10202

References

- ORA-1501 ORA-27094 CREATING SINGLE INSTANCE DATABASE ON RAW DEVICES

四、 解決問題

我的機子上沒有3628715的補丁,只有p6810189_10204,打上這個補丁後再次嘗試恢復,問題解決,資料恢復(遷移)成功。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22085031/viewspace-1041501/,如需轉載,請註明出處,否則將追究法律責任。

相關文章