<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>惜分飞 &#187; events</title>
	<atom:link href="https://www.xifenfei.com/tag/events/feed" rel="self" type="application/rss+xml" />
	<link>https://www.xifenfei.com</link>
	<description>提供7*24专业数据库(Oracle,SQL Server,MySQL,PostgreSQL等)恢复和技术支持@Tel:17813235971</description>
	<lastBuildDate>Thu, 29 Oct 2026 15:31:46 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>使用alter system events导致库crash</title>
		<link>https://www.xifenfei.com/2016/09/alter-system-events-crash-db.html</link>
		<comments>https://www.xifenfei.com/2016/09/alter-system-events-crash-db.html#comments</comments>
		<pubDate>Mon, 05 Sep 2016 11:52:29 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[events]]></category>
		<category><![CDATA[nfs]]></category>
		<category><![CDATA[ORA-27054]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=6614</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2016/09/alter-system-events-crash-db.html">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div id="xifenfeicopyright">
<p>联系：<a href="https://www.xifenfei.com/about_xifenfei" target="_blank">手机/微信(+86 17813235971)   QQ(107644445)</a><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&#038;uin=107644445&#038;site=qq&#038;menu=yes"><img src="https://www.xifenfei.com/wp-content/themes/img/site_qq.jpg" alt="QQ咨询惜分飞" title="QQ咨询惜分飞"/></a></p>
<p>标题：<a href="https://www.xifenfei.com/2016/09/alter-system-events-crash-db.html" target="_blank">使用alter system events导致库crash</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>由于数据库导入大量数据的时候io等待比较高，新的存储无法直接挂过来，考虑使用nfs挂载过来，然后存放redo缓解io压力。<br />
<strong>数据库版本信息</strong></p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE    10.2.0.4.0      Production
TNS for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Productio
NLSRTL Version 10.2.0.4.0 - Production
</pre>
<p><strong>挂载参数(mount命令查看)</strong></p>
<pre class="brush: bash; title: ; notranslate">
10.240.10.1 /top/data4/nfs   /back1            nfs3   
Aug 29 13:40 cio,rw,bg,hard,nointr,rsize=32768,wsize=32768,proto=tcp,noac,vers=3,timeo=600
</pre>
<p><strong>尝试创建redo</strong></p>
<pre class="brush: bash; title: ; notranslate">
SQL&gt; alter database add logfile group 13 ('/back/newxff/redo13.log') size 2048m; 
alter database add logfile group 13 ('/back1/newxff/redo13.log') size 2048m
*
ERROR at line 1:
ORA-00301: error in adding log file '/back1/newxff/redo13.log' - file cannot be
created
ORA-27054: NFS file system where the file is created or resides is not mounted
with correct options
Additional information: 6
</pre>
<p><strong>根据mos文档</strong><br />
ORA-27054 ERRORS WHEN RUNNING RMAN WITH NFS (文档 ID 387700.1)</p>
<pre class="brush: bash; title: ; notranslate">
SQL&gt; Alter system set events '10298 trace name context forever,level 32';

System altered.

Mon Sep  5 10:10:18 2016
Thread 1 advanced to log sequence 109 (LGWR switch)
  Current log# 1 seq# 109 mem# 0: +DATA/xff/onlinelog/group_1.257.921671023
Mon Sep  5 10:12:19 2016
OS Pid: 160710 executed alter system set events '10298 trace name context forever,level 32'
</pre>
<p><strong>创建redo成功</strong></p>
<pre class="brush: bash; title: ; notranslate">
SQL&gt; alter database add logfile group 13 ('/back1/newxff/redo13.log') size 2048m;

System altered.

Mon Sep  5 10:18:13 2016
alter database add logfile group 13 ('/back1/newxff/redo13.log') size 2048m
Mon Sep  5 10:18:43 2016
Completed: alter database add logfile group 13 ('/back1/newxff/redo13.log') size 2048m
</pre>
<p><strong>数据库crash</strong></p>
<pre class="brush: bash; title: ; notranslate">
Mon Sep  5 10:19:06 2016
Errors in file /opt/oracle/admin/xff/bdump/xff1_lgwr_246566.trc:
ORA-00313: open failed for members of log group 13 of thread 1
ORA-00312: online log 13 thread 1: '/back1/newxff/redo13.log'
ORA-27054: NFS file system where the file is created or resides is not mounted with correct options
Additional information: 6
Mon Sep  5 10:19:06 2016
Errors in file /opt/oracle/admin/xff/bdump/xff1_lgwr_246566.trc:
ORA-00313: open failed for members of log group 13 of thread 1
ORA-00312: online log 13 thread 1: '/back1/newxff/redo13.log'
ORA-27054: NFS file system where the file is created or resides is not mounted with correct options
Additional information: 6
Mon Sep  5 10:19:06 2016
LGWR: terminating instance due to error 313
Mon Sep  5 10:19:06 2016
System state dump is made for local instance
System State dumped to trace file /opt/oracle/admin/xff/bdump/xff1_diag_299654.trc
</pre>
<p>通过报错很明显可以看出来数据库挂掉的原因和当时不能创建redo的原因一样，都是由于ORA-27054导致数据库挂了，但是为什么创建redo成功,但是使用redo失败呢？<br />
这里需要注意使用的命令是events,而这个命令是对当前会话和后续新建的会话生效，也就是说他不会对数据库已经存在的后台进程生效，那也就可以理解了，我创建redo是在执行events的当前命令行窗口处理的，因此可以创建成功；但是lgwr进程是数据库一启动就存在的进程，现在设置的events对他没有影响，因此当lgwr去使用redo的时候无法正常使用因此就导致数据库crash掉。<strong>如果希望event对已经存在的进程生效，可以考虑使用oradebug对进程进行设置event(这个案例主要要设置多个后台进程不光lgwr访问redo)，或者设置event=的方式，然后重启数据库让其生效。</strong></p>
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/10/3933.html" rel="bookmark" class="crp_title">rman备份出现ORA-19625/ORA-27054解决</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/08/ora-00313%e5%92%8cora-00313%e5%a4%84%e7%90%86.html" rel="bookmark" class="crp_title">数据库open状态下日志异常处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/08/%e5%bd%93%e5%89%8d%e8%81%94%e6%9c%ba%e6%97%a5%e5%bf%97%e6%8d%9f%e5%9d%8f%e6%81%a2%e5%a4%8d.html" rel="bookmark" class="crp_title">当前联机日志损坏恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2013/05/%e4%bf%ae%e6%94%b9dataguard%e4%b8%bb%e5%ba%93redo%e7%bb%84%e6%95%b0%e5%92%8c%e5%a4%a7%e5%b0%8f.html" rel="bookmark" class="crp_title">修改dataguard主库redo组数和大小</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/10/%e5%a6%82%e4%bd%95%e6%9f%a5%e8%af%a2%e4%bc%9a%e8%af%9d-event.html" rel="bookmark" class="crp_title">如何查询会话 event</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2010/08/oracle%e4%b9%8bredo-file.html" rel="bookmark" class="crp_title">oracle之redo file</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/03/getting-ora-01476-during-execution-of-dbms_stats-gather_schema_stats.html" rel="bookmark" class="crp_title">Getting ORA-01476 during execution of DBMS_STATS.GATHER_SCHEMA_STATS</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/06/spfile%e8%a2%ab%e8%a6%86%e7%9b%96%e5%af%bc%e8%87%b4ora-600kmgs_parameter_update_timeout_1.html" rel="bookmark" class="crp_title">spfile被覆盖导致ORA-600[kmgs_parameter_update_timeout_1]</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/06/rman%e9%80%9a%e8%bf%87nfs%e5%a4%87%e4%bb%bd.html" rel="bookmark" class="crp_title">rman通过nfs备份</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2013/08/oracle-12c-windows-linux-%e9%83%a8%e7%bd%b2datagurad.html" rel="bookmark" class="crp_title">ORACLE 12C Windows-Linux 部署DATAGURAD</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2014/02/oracle-redo%e5%90%84%e7%a7%8d%e5%bc%82%e5%b8%b8%e6%81%a2%e5%a4%8d.html" rel="bookmark" class="crp_title">ORACLE REDO各种异常恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2013/04/%e4%bd%bf%e7%94%a8oradebug-hang%e4%bd%8f%e6%9f%90%e4%b8%aa%e8%bf%9b%e7%a8%8b.html" rel="bookmark" class="crp_title">使用oradebug hang住某个进程</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2016/09/alter-system-events-crash-db.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
