【轉載】ORA-27054 錯誤解決

浪漫雙魚發表於2011-10-18

問題描述

在一個oracle rac環境裡,執行rman進行日誌的備份,發生了ora-27054的錯誤,資料庫日誌無法備份。

1.1 主機和資料庫環境
#oslevel -s

6100-05-01-1016

#df -g

/dev/lv_archivelog 100.00 99.55 1% 7 1% /archivelog/orcl1

db_node2:/archivelog/orcl2 100.00 96.18 4% 33 1% /archivelog/orcl2

Rac 的另外一個主機的目錄/archivelog/orcl2 mountdb_node1/archivelog/orcl2 目錄,目錄的訪問許可權已經正確設定

#su - oracle

$sqlplus / as sysdba

SQL*Plus: Release 10.2.0.5.0 - Production on Tue May 24 10:01:47 2011

Copyright (c) 1982, 2010, Oracle. All Rights Reserved.

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production

With the Partitioning, Real Application Clusters, OLAP, Data Mining

and Real Application Testing options

1.2 rman備份的指令碼

RMAN> connect target *

2> run{

3> allocate channel d1 type disk maxpiecesize 2g;

4> allocate channel d2 type disk maxpiecesize 2g;

5> sql 'alter system archive log thread 1 current';

6> sql 'alter system archive log thread 2 current';

7> host 'rm -f /archivelog/orcl1/arc*_1.bak';

8> backup copies 2 archivelog all delete input format '/rman/arc_%s_%t_%U.bak';

9> host 'mv /rman/arc*_1.bak /archivelog/orcl1';

10> release channel d1;

11> release channel d2;

12> }

13>


1.3 db_node1上執行 rman 備份時,ora-27054錯誤

using target database control file instead of recovery catalog

allocated channel: d1

channel d1: sid=1139 instance=orcl1 devtype=DISK

allocated channel: d2

channel d2: sid=1073 instance=orcl1 devtype=DISK

sql statement: alter system archive log thread 1 current

sql statement: alter system archive log thread 2 current

Starting backup at 24-MAY-11

current log archived

released channel: d1

released channel: d2

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of backup command at 05/24/2011 09:26:41

RMAN-06059: expected archived log not found, lost of archived log compromises recoverability

ORA-19625: error identifying file /archivelog/orcl2/orcl_2_3377_739815553.arc

ORA-27054: NFS file system where the file is created or resides is not mounted with correct options

Additional information: 6

Recovery Manager complete.

問題分析

首先目錄的訪問許可權沒有問題,嘗試在db_node1上的/archivelog/orcl2 目錄上建立,修改檔案都沒有問題,說明nfs設定沒有問題.

METALINK上搜尋ora-27054 nfs,找到了一篇文章 ORA-27054 ERRORS WHEN RUNNING RMAN WITH NFS [ID 387700.1]

 文件中提及造成問題的原因可能是oracle去考慮nfs的問題總之需要執行命令。

Alter system set events '10298 trace name context forever,level 32'

問題解決

在執行rman備份的節點執行:

SQL>Alter system set events '10298 trace name context forever,level 32'

執行這個命令,不需要重新啟動rac的例項,也不需要重新啟動DB.但上面的命令在下次資料庫重新啟動後就失效了,需要再次手工執行。(筆者曾經在資料庫重新啟動後,忘記了執行這個語句,導致日誌檔案目錄差點爆滿)。

如果想資料庫重新啟動後,自動執行這個命令,則執行下面的命令:

SQL>alter system set event='10298 trace name context forever,level 32' SCOPE=SPFILE;

細心的朋友會發現上面提到的兩個命令還是有一點小小區別的。

執行完命令後,再次執行rman的備份,正常。

RMAN> connect target *

2> run{

3> allocate channel d1 type disk maxpiecesize 2g;

4> allocate channel d2 type disk maxpiecesize 2g;

5> sql 'alter system archive log thread 1 current';

6> sql 'alter system archive log thread 2 current';

7> host 'rm -f /archivelog/orcl1/arc*_1.bak';

8> backup copies 2 archivelog all delete input format '/rman/arc_%s_%t_%U.bak';

9> host 'mv /rman/arc*_1.bak /archivelog/orcl1';

10> release channel d1;

11> release channel d2;

12> }

13>

allocated channel: d1

channel d1: sid=919 instance=orcl1 devtype=DISK

allocated channel: d2

channel d2: sid=906 instance=orcl1 devtype=DISK

sql statement: alter system archive log thread 1 current

sql statement: alter system archive log thread 2 current

Starting backup at 24-MAY-11

current log archived

channel d1: starting compressed archive log backupset

channel d1: specifying archive log(s) in backup set

input archive log thread=1 sequence=5095 recid=7539 stamp=751940283

。。。。。。

archive log filename=/archivelog/orcl2/orcl_2_3385_739815553.arc recid=7574 stamp=751973830

Finished backup at 24-MAY-11

Starting Control File and SPFILE Autobackup at 24-MAY-11

piece handle=/oracle/product/10.2.0/db/dbs/c-1267596289-20110524-01 comment=NONE

Finished Control File and SPFILE Autobackup at 24-MAY-11

released channel: d1

released channel: d2

Recovery Manager complete.

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

相關文章