11g的RMAN在命令出錯後退出程式

yangtingkun發表於2008-09-06

今天嘗試使用11gRMAN進行恢復時,發現了這個問題。

 

 

剛開始還沒有太在意,後來發現,幾乎只要命令沒有正確的返回,都會造成這個錯誤,而且其中的資訊還包括RMAN-600這種內部錯誤。

類似的錯誤包括:

RMAN> startup mount

已連線到目標資料庫 (未啟動)
Oracle
例項已啟動
DBGANY:     Mismatched message length! [14:05:33.050] (krmiduem)
DBGANY:     Mismatched message length! [14:05:33.051] (krmiduem)
MAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00600: internal error, arguments [3045] [] [] [] []
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: startup
命令 ( 09/04/2008 14:05:33 ) 失敗
ORA-00205:
標識控制檔案時出錯, 有關詳細資訊, 請檢視預警日誌
$

控制檔案出錯,RMAN並沒有給出錯誤原因,而是讓使用者直接去看alert日誌,首先在可讀性方面就有問題。其次rman命令的錯誤不應該導致rman工具的退出。

類似的錯誤還有:

RMAN> restore database;

啟動 restore 04-9 -08
使用通道 ORA_DISK_1

建立資料檔案, 檔案號 = 1 名稱 = /dev/vx/rdsk/datavg/rac11g_system_1_1g
DBGANY:     Mismatched message length! [14:18:20.868] (krmiduem)
DBGANY:     Mismatched message length! [14:18:20.870] (krmiduem)
MAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00600: internal error, arguments [3045] [] [] [] []
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: restore
命令 ( 09/04/2008 14:18:20 ) 失敗
ORA-01180:
無法建立資料檔案 1
ORA-01110:
資料檔案 1: '/dev/vx/rdsk/datavg/rac11g_system_1_1g'
$

以及錯誤:

RMAN> catalog backuppiece '+DATA/RAC11G/01jpk0bj_1_1';

DBGANY:     Mismatched message length! [14:33:30.426] (krmiduem)
DBGANY:     Mismatched message length! [14:33:30.471] (krmiduem)
DBGANY:     Mismatched message length! [14:33:30.473] (krmiduem)
MAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00600: internal error, arguments [3045] [] [] [] []
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: catalog
命令 (default 通道上, 09/04/2008 14:33:30 ) 失敗
RMAN-00600: internal error, arguments [3045] [] [] [] []
ORA-19870:
還原備份片段 +DATA/rac11g/01jpk0bj_1_1 時出錯
ORA-19505:
無法識別檔案"+DATA/rac11g/01jpk0bj_1_1"
ORA-17503: ksfdopn: 2
未能開啟檔案 +DATA/rac11g/01jpk0bj_1_1
ORA-15173: entry '01jpk0bj_1_1' does not exist in directory 'rac11g'
$

檢查了metalink,發現似乎是11gbug,在Bug No. 7027628中描述了這個錯誤,不過這個bug並不是一個基礎bug,而是指向了另一個看起來和當前問題不相關的錯誤,不管怎樣,根據這個bug描述的方法是可以避免錯誤的。

$ bash
bash-3.00$ export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
bash-3.00$ rman target /

Recovery Manager: Release 11.1.0.6.0 - Production on Thu Sep 4 17:58:31 2008

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

connected to target database: RAC11G (DBID=1712482917)

RMAN> catalog backuppiece '+DATA/RAC11G/01jpk0bj_1_1';

using target database control file instead of recovery catalog
ORA-19870: error while restoring backup piece +DATA/rac11g/01jpk0bj_1_1
ORA-19505: failed to identify file "+DATA/rac11g/01jpk0bj_1_1"
ORA-17503: ksfdopn:2 Failed to open file +DATA/rac11g/01jpk0bj_1_1
ORA-15173: entry '01jpk0bj_1_1' does not exist in directory 'rac11g'

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of catalog command at 09/04/2008 17:58:40
RMAN-06209: List of failed objects
RMAN-06211: ==========================
RMAN-06212:   Object Type   Filename/Handle
RMAN-06213: --------------- ---------------------------------------------------
RMAN-06214: Backup Piece    +DATA/rac11g/01jpk0bj_1_1

NLS_LANG設定為非中文環境,就可以臨時避免這個問題的產生。Oracle計劃在11.1.0.7fixed這個bug

 

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

相關文章