ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 【转载】ORA-27054 错误解决

【转载】ORA-27054 错误解决

原创 Linux操作系统 作者:浪漫双鱼 时间:2011-10-18 11:16:44 0 删除 编辑

一. 问题描述

在一个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 mount到db_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博客 ” ,链接:https://blog.itpub.net/11088128/viewspace-709278/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2007-12-10

  • 博文量
    87
  • 访问量
    258921