<?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>Focus on Oracle</title>
	<atom:link href="http://www.dbsnake.net/feed" rel="self" type="application/rss+xml" />
	<link>http://www.dbsnake.net</link>
	<description>专业Oracle数据库恢复，或许是您恢复数据的最后机会</description>
	<lastBuildDate>Mon, 14 May 2012 14:05:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>library cache lock latch和library cache pin latch的持有顺序</title>
		<link>http://www.dbsnake.net/library-cache-lock-and-pin-latch-hold-order.html</link>
		<comments>http://www.dbsnake.net/library-cache-lock-and-pin-latch-hold-order.html#comments</comments>
		<pubDate>Mon, 14 May 2012 13:39:36 +0000</pubDate>
		<dc:creator>Cui Hua</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.dbsnake.net/?p=78</guid>
		<description><![CDATA[为了方便阐述，这篇文章里我沿用了如下一些术语： 1、用“library cache lock”代表名为library cache lock的enqueue； 2、用“library cache pin”代表名为library cache pin的enqueue； 3、用“Child library cache”代表名为library cache的子latch； 4、用“Child shared pool”代表名为shared pool的子latch； 5、用“Child library cache lock”代表名为library cache lock的子latch； 6、用“Child library cache pin”代表名为library cache pin的子latch； &#160; 需要注意的是：从11gR1开始，Oracle用mutex替换了各种跟library cache相关的latch，所以这篇文章的结论并不适用于11g。 另外，这篇文章的结论是基于10.2.0.1，而从10.2.0.2以后，Oracle会用mutex取代针对cursor的library cache pin，所以从10.2.0.2后，软解析/软软解析的时候不再需要持有Child library cache pin。 &#160; 在“硬解析和软解析情况下latch持有情况分析”这篇文章里我们曾经提到： 1、在每一个library cache object handle上都存在4个链表，它们分别是lock owners，lock waiters，Pin owners，Pin waiters。所以实际上library cache object handle你可以把它看成是library cache lock和library [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">为了方便阐述，这篇文章里我沿用了如下一些术语：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><?xml:namespace prefix = o /><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">、用“</span><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">library cache lock</span></b><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">”代表名为</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">enqueue</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">；</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">、用“</span><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">library cache pin</span></b><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">”代表名为</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">enqueue</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">；</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">3</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">、用“</span><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache</span></b><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">”代表名为</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">library cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的子</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">；</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">4</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">、用“</span><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child shared pool</span></b><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">”代表名为</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">shared pool</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的子</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">；</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">5</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">、用“</span><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache lock</span></b><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">”代表名为</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的子</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">；</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">6</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">、用“</span><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache pin</span></b><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">”代表名为</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的子</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">；</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-hansi-font-family: 'Times New Roman'" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">需要注意的是：从</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">11gR1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">开始，</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Oracle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">用</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">mutex</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">替换了各种跟</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">library cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">相关的</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，所以这篇文章的结论并不适用于</span><?xml:namespace prefix = st1 /><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="11" unitname="g"><span style="font-family: arial; font-size: 10pt" lang="EN-US">11g</span></st1:chmetcnv><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">。</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">另外，这篇文章的结论是基于</span><st1:chsdate w:st="on" isrocdate="False" islunardate="False" day="30" month="12" year="1899"><span style="font-family: arial; font-size: 10pt" lang="EN-US">10.2.0</span></st1:chsdate><span style="font-family: arial; font-size: 10pt" lang="EN-US">.1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，而从</span><span style="font-family: arial; font-size: 10pt; mso-hansi-font-family: 'Times New Roman'" lang="EN-US">10.2.0.2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: arial">以后，</span><span style="font-family: arial; font-size: 10pt; mso-hansi-font-family: 'Times New Roman'" lang="EN-US">Oracle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: arial">会用</span><span style="font-family: arial; font-size: 10pt; mso-hansi-font-family: 'Times New Roman'" lang="EN-US">mutex</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: arial">取代针对</span><span style="font-family: arial; font-size: 10pt; mso-hansi-font-family: 'Times New Roman'" lang="EN-US">cursor</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: arial">的</span><span style="font-family: arial; font-size: 10pt; mso-hansi-font-family: 'Times New Roman'" lang="EN-US">library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: arial">，所以从</span><span style="font-family: arial; font-size: 10pt; mso-hansi-font-family: 'Times New Roman'" lang="EN-US">10.2.0.2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: arial">后，软解析</span><span style="font-family: arial; font-size: 10pt; mso-hansi-font-family: 'Times New Roman'" lang="EN-US">/</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: arial">软软解析的时候不再需要持有</span><span style="font-family: arial; font-size: 10pt; mso-hansi-font-family: 'Times New Roman'" lang="EN-US">Child library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: arial">。</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">在“</span><span style="font-family: arial; color: gray; font-size: 10pt" lang="EN-US"><a href="http://www.dbsnake.net/hard-and-soft-parse-latch-analysis.html"><span style="font-family: 宋体; color: gray; mso-ascii-font-family: arial; mso-hansi-font-family: arial" lang="EN-US"><span lang="EN-US">硬解析和软解析情况下</span></span><span style="color: gray">latch</span><span style="font-family: 宋体; color: gray; mso-ascii-font-family: arial; mso-hansi-font-family: arial" lang="EN-US"><span lang="EN-US">持有情况分析</span></span></a></span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">”这篇文章里我们曾经提到：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">、在每一个</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">library cache object handle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">上都存在</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">4</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">个链表，它们分别是</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">lock owners</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">lock waiters</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Pin owners</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Pin waiters</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">。所以实际上</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">library cache object handle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">你可以把它看成是</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">和</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">所保护的</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">resource</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">。而向</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">lock owners</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">和</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">lock waiters</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">里添加</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">/</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">修改一个</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">时是需要先持有</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">；向</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Pin owners</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">和</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Pin waiters</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">里添加</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">/</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">修改一个</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">时是需要先持有</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">。</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">、</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">在硬解析的时候，会先去持有</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">以扫描</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">library cache object handle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">链表，接着会释放</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">（因为找不到相关的</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">library cache object handle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">），接下来会再次持有</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">（因为要修改</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">library cache object handle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">链表），然后在不释放</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的情况下进而去持有</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child shared pool</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">以分配内存，接着释放</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child shared pool</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">（因为已经分配完了），接着再释放</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">；<b style="mso-bidi-font-weight: normal">然后因为要把相关</b></span><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">sql</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的执行计划</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">load</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">到对应的子</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">cursor</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">library cache object handle</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">中，所以要以</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">exclusive</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">模式获得</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">library cache pin</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，所以要先持有</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache pin</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">；接着因为要以</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">null</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">模式获得</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">library cache lock</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，所以要先持有</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache lock</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">。</span></b><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">（<b style="mso-bidi-font-weight: normal"><span style="color: red">这里我提到了应该是先持有</span></b></span><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: red; font-size: 10pt" lang="EN-US">Child library cache pin</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; color: red; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，然后才持有</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: red; font-size: 10pt" lang="EN-US">Child library cache lock</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; color: red; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，但这是不正确的</span></b><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">）</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">后来有位叫</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">overmars</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的朋友指出我这个结论跟</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Oracle</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的文档里描述的结果不一致，并且持有顺序刚好颠倒过来了。所有的</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Oracle</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">文档里都是说应该先持有</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache lock</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，再持有</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache pin</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">。</span></b><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">其实他提到的文档及相关结论我都知道，但为什么会有上述结论是因为如下两点：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">、当我同时手工持有所有的</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">和</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">后，发现</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">hang</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">住的硬解析的</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">是在等待</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，所以从这个测试结果来看，应该是</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">在前，</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">在后。</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">、我觉得</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">和</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">对于</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">cursor</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">而言，持有顺序无所谓，谁先谁后都没有太大关系。因为反正也是要以</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">null</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">模式长时间持有</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">。</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">以上观点我一直认为是正确的，直到</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">overmars</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">给我发过来了他按照我的方法做的测试结果——他也是先手工持有所有的</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">和</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，但发现</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">hang</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">住的硬解析的</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">是在等待</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">(latch info) wait_event=0 bits=0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b style="mso-bidi-font-weight: normal"><span style="color: red">Location from where call was made: kgllkal: child: multiinstance: latch<o:p></o:p></span></b></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: red; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>waiting for 6d<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="9479" unitname="a">9479a</st1:chmetcnv>0 Child library cache lock level=6 child#=1 <o:p></o:p></span></b></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Location from where latch is held: kgllkdl: child: cleanup: latch<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Context saved from call: 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>state=busy, wlstate=free<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>waiters [orapid (seconds since: put on list, posted, alive check)]:<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>21 (12, 1336717038, 12)<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>18 (3, 1336717038, 3)<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>waiter count=2<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>gotten 118818 times wait, failed first 0 sleeps 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>gotten 0 times nowait, failed: 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>on wait list for 6d<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="9479" unitname="a">9479a</st1:chmetcnv>0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">当他手工释放</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">后，发现继续</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">hang</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">住的硬解析的</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">是在等待</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">(latch info) wait_event=0 bits=0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b style="mso-bidi-font-weight: normal"><span style="color: red"><span style="mso-spacerun: yes">&nbsp;</span>Location from where call was made: kglpnal: child: alloc space: latch<o:p></o:p></span></b></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: red; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>waiting for 6d947900 Child library cache pin level=6 child#=1 <o:p></o:p></span></b></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Location from where latch is held: kglpndl: child<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Context saved from call: 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>state=busy, wlstate=free<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>waiters [orapid (seconds since: put on list, posted, alive check)]:<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>10 (96, 1336717122, 96)<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>11 (81, 1336717122, 81)<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>12 (27, 1336717122, 27)<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>21 (9, 1336717122, 9)<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>18 (9, 1336717122, 9)<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>waiter count=5<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp; </span><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>gotten 226675 times wait, failed first 0 sleeps 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>gotten 0 times nowait, failed: 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>on wait list for 6d947900<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">这里的结果就和我做的结果完全反过来了，而且他给的</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">trace</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">文件是极有说服力的，从上述</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">trace</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">文件可以看到，<b style="mso-bidi-font-weight: normal">分别是</b></span><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">kgllkal</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">和</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">kglpnal</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">在等待</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache lock</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">和</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache pin</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">。</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></b></p>
<p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></b></p>
<p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">我们再来对比看一下我做的同样的测试的结果：</span></b><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">我也是先手工持有所有的</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">和</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">后，发现</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">hang</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">住的硬解析的</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">是在等待</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">(latch info) wait_event=0 bits=0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b style="mso-bidi-font-weight: normal"><span style="color: red">Location from where call was made: kglpnal: child: alloc space: latch<o:p></o:p></span></b></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: red; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Context saved from call: 1<o:p></o:p></span></b></p>
<p style="background: #e6e6e6" class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: red; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>waiting for 3213df50 Child library cache pin level=6 child#=2 <o:p></o:p></span></b></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Location from where latch is held: kglpndl: child<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Context saved from call: 1<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>state=busy, wlstate=free<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>waiters [orapid (seconds since: put on list, posted, alive check)]:<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>16 (12, 1336755992, 12)<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>waiter count=1<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>gotten 115107 times wait, failed first 0 sleeps 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>gotten 2 times nowait, failed: 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>on wait list for 3213df50<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">从上述结果可以看到，现在是</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">kglpnal</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">在等待持有</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，直到现在为止，这里还看不出来任何异常，也就是说这里并不能说明我的测试结论就一定是错的。</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">我们接着往下看：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">当我手工释放</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">后，发现继续</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">hang</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">住的硬解析的</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">是在等待</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">(latch info) wait_event=0 bits=0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b style="mso-bidi-font-weight: normal"><span style="color: red">Location from where call was made: kgllkdl: child: cleanup: latch<o:p></o:p></span></b></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: red; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Context saved from call: 1<o:p></o:p></span></b></p>
<p style="background: #e6e6e6" class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: red; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>waiting for 3213e088 Child library cache lock level=6 child#=2 <o:p></o:p></span></b></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Location from where latch is held: kgllkdl: child: cleanup: latch<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Context saved from call: 1<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="mso-spacerun: yes">&nbsp; </span>state=busy, wlstate=free<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>waiters [orapid (seconds since: put on list, posted, alive check)]:<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>10 (166, 1336756125, 166)<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>16 (42, 1336756125, 42)<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>waiter count=2<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>gotten 54717 times wait, failed first 0 sleeps 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>gotten 0 times nowait, failed: 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>on wait list for 3213e088<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">从上述</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">trace</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">文件里我们可以看到，表面上看不出啥问题，</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">hang</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">住的硬解析的</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">确实是在等待</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，但当我们仔细看等待的源头的时候发现现在是</span><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: red; font-size: 10pt" lang="EN-US">kgllkdl: child: cleanup: latch</span></b><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">在等待上述</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，注意里面有</span><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: red; font-size: 10pt" lang="EN-US">child: cleanup: latch</span></b><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的字眼，意味着现在是在释放</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的时候遇到了阻塞。<b style="mso-bidi-font-weight: normal"><span style="color: blue">也就是说实际上由于某种原因，我并没有手工</span></b></span><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: blue; font-size: 10pt" lang="EN-US">hold</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; color: blue; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">住</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: blue; font-size: 10pt" lang="EN-US">Child library cache lock</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; color: blue; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: blue; font-size: 10pt" lang="EN-US">Oracle</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; color: blue; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">已经持有了</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: blue; font-size: 10pt" lang="EN-US">Child library cache lock</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; color: blue; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">了，只是在释放的时候被我之前的</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: blue; font-size: 10pt" lang="EN-US">poke</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; color: blue; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">操作阻塞了。</span></b><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">这个是非常奇怪的！难以解释。</span></b><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">但从这里我们已经知道了，我之前的结论是有问题的，很可能就是和所有文档里描述的结论一致——即硬解析的时候是先持有</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，再持有</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">。</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">接下来，我反复做了大量测试，终于在一次的测试结果里重现了</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">overmars</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的测试结果。</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">手工持有所有的</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">和</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">后，发现</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">hang</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">住的硬解析的</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">终于是在等待</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">了：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Process global information:<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>process: 33E4E3BC, call: <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="33" unitname="F">33F</st1:chmetcnv><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="5" unitname="C">5C</st1:chmetcnv><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="0" unitname="a">0A</st1:chmetcnv>0, xact: 00000000, curses: <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="33" unitname="F">33F</st1:chmetcnv><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="310" unitname="C">310C</st1:chmetcnv>4, usrses: <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="33" unitname="F">33F</st1:chmetcnv><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="310" unitname="C">310C</st1:chmetcnv>4<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp; </span></span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de" lang="DE">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de" lang="DE"><span style="mso-spacerun: yes">&nbsp; </span>SO: 33E4E3BC, type: 2, owner: 00000000, flag: INIT/-/-/0&#215;00<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de" lang="DE"><span style="mso-spacerun: yes">&nbsp; </span></span><span style="font-family: arial; font-size: 10pt" lang="EN-US">(process) Oracle pid=20, calls cur/top: <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="33" unitname="F">33F</st1:chmetcnv><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="5" unitname="C">5C</st1:chmetcnv><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="0" unitname="a">0A</st1:chmetcnv>0/<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="33" unitname="F">33F</st1:chmetcnv><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="5" unitname="C">5C</st1:chmetcnv><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="0" unitname="a">0A</st1:chmetcnv>0, flag: (0) -<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>int error: 0, call error: 0, sess error: 0, txn error 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp; </span>(post info) last post received: 0 0 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>last post received-location: No post<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>last process to post me: none<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>last post sent: 0 0 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>last post sent-location: No post<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;</span><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>last process posted by me: none<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>(latch info) wait_event=0 bits=0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b style="mso-bidi-font-weight: normal"><span style="color: red">Location from where call was made: kgllkal: child: multiinstance: latch<o:p></o:p></span></b></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: red; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Context saved from call: 1<o:p></o:p></span></b></p>
<p style="background: #e6e6e6" class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: red; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>waiting for 3213e088 Child library cache lock level=6 child#=2 <o:p></o:p></span></b></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Location from where latch is held: kgllkdl: child: cleanup: latch<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Context saved from call: 1<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>state=busy, wlstate=free<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>waiters [orapid (seconds since: put on list, posted, alive check)]:<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>10 (42, 1336997400, 42)<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>20 (18, 1336997400, 18)<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>waiter count=2<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>gotten 63233 times wait, failed first 8 sleeps 8<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>gotten 0 times nowait, failed: 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>on wait list for 3213e088<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>Process Group: DEFAULT, pseudo proc: 33E<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="7" unitname="F">7F</st1:chmetcnv>368<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;</span><span style="mso-spacerun: yes">&nbsp;&nbsp; </span>O/S info: user: SYSTEM, term: Y8908CUIHUA, ospid: 3296<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>OSD pid info: Windows thread id: 3296, image: ORACLE.EXE (SHAD)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">当我手工释放</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">后，发现继续</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">hang</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">住的硬解析的</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">终于是在等待</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">了：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">*** 2012-05-14 20:11:41.171<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Received ORADEBUG command &#8216;dump processstate 10&#8242; from process Windows thread id: 1448, image: <o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">===================================================<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><st1:place w:st="on"><st1:placename w:st="on"><span style="font-family: arial; font-size: 10pt" lang="EN-US">PROCESS</span></st1:placename><span style="font-family: arial; font-size: 10pt" lang="EN-US"> <st1:placetype w:st="on">STATE</st1:placetype></span></st1:place><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">&#8212;&#8212;&#8212;&#8212;-<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Process global information:<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>process: 33E4E3BC, call: <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="33" unitname="F">33F</st1:chmetcnv><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="5" unitname="C">5C</st1:chmetcnv><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="0" unitname="a">0A</st1:chmetcnv>0, xact: 00000000, curses: <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="33" unitname="F">33F</st1:chmetcnv><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="310" unitname="C">310C</st1:chmetcnv>4, usrses: <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="33" unitname="F">33F</st1:chmetcnv><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="310" unitname="C">310C</st1:chmetcnv>4<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp; </span></span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de" lang="DE">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de" lang="DE"><span style="mso-spacerun: yes">&nbsp; </span>SO: 33E4E3BC, type: 2, owner: 00000000, flag: INIT/-/-/0&#215;00<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de" lang="DE"><span style="mso-spacerun: yes">&nbsp; </span></span><span style="font-family: arial; font-size: 10pt" lang="EN-US">(process) Oracle pid=20, calls cur/top: <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="33" unitname="F">33F</st1:chmetcnv><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="5" unitname="C">5C</st1:chmetcnv><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="0" unitname="a">0A</st1:chmetcnv>0/<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="33" unitname="F">33F</st1:chmetcnv><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="5" unitname="C">5C</st1:chmetcnv><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="0" unitname="a">0A</st1:chmetcnv>0, flag: (0) -<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>int error: 0, call error: 0, sess error: 0, txn error 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp; </span>(post info) last post received: 0 0 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>last post received-location: No post<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>last process to post me: none<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>last post sent: 0 0 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>last post sent-location: No post<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>last process posted by me: none<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>(latch info) wait_event=0 bits=0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b style="mso-bidi-font-weight: normal"><span style="color: red">Location from where call was made: kglpnal: child: alloc space: latch<o:p></o:p></span></b></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: red; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Context saved from call: 1<o:p></o:p></span></b></p>
<p style="background: #e6e6e6" class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: red; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>waiting for 3213df50 Child library cache pin level=6 child#=2 <o:p></o:p></span></b></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Location from where latch is held: kglpndl: child<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Context saved from call: 1<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>state=busy, wlstate=free<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>waiters [orapid (seconds since: put on list, posted, alive check)]:<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>20 (21, 1336997499, 21)<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>10 (21, 1336997499, 21)<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>waiter count=2<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>gotten 131861 times wait, failed first 9 sleeps 132<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>gotten 0 times nowait, failed: 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>on wait list for 3213df50<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>Process Group: DEFAULT, pseudo proc: 33E<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="7" unitname="F">7F</st1:chmetcnv>368<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>O/S info: user: SYSTEM, term: Y8908CUIHUA, ospid: 3296<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>OSD pid info: Windows thread id: 3296, image: ORACLE.EXE (SHAD)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">这里的测试结果就和</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">overmars</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的结论一致了，且再也没有了上述</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">kgllkdl: child: cleanup: latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">。</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">总结一下：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">从上面的分析我们可以看到，<b style="mso-bidi-font-weight: normal">实际上所有的文档里描述的结论是对的，这里是我错了</b>。应该是先申请</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，再申请</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，或者说是先持有</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，再持有</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">。</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">即正确的硬解析的过程为：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">在硬解析的时候，会先去持有</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">以扫描</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">library cache object handle</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">链表，接着会释放</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">（因为找不到相关的</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">library cache object handle</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">），接下来会再次持有</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">（因为要修改</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">library cache object handle</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">链表），然后在不释放</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的情况下进而去持有</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child shared pool</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">以分配内存，接着释放</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child shared pool</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">（因为已经分配完了），接着再释放</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">；然后因为要以</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">null</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">模式获得</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">library cache lock</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，所以要先持有</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache lock</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">；接着要把相关</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">sql</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的执行计划</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">load</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">到对应的子</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">cursor</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">library cache object handle</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">中，即要以</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">exclusive</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">模式获得</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">library cache pin</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，所以要先持有</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Child library cache pin</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">。</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dbsnake.net/library-cache-lock-and-pin-latch-hold-order.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>软软解析情况下的latch持有情况分析</title>
		<link>http://www.dbsnake.net/soft-soft-parse-latch-analysis.html</link>
		<comments>http://www.dbsnake.net/soft-soft-parse-latch-analysis.html#comments</comments>
		<pubDate>Mon, 07 May 2012 15:36:27 +0000</pubDate>
		<dc:creator>Cui Hua</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.dbsnake.net/?p=75</guid>
		<description><![CDATA[为了方便阐述，这篇文章里我沿用了如下一些术语： 1、用“library cache lock”代表名为library cache lock的enqueue； 2、用“library cache pin”代表名为library cache pin的enqueue； 3、用“Child library cache”代表名为library cache的子latch； 4、用“Child shared pool”代表名为shared pool的子latch； 5、用“Child library cache lock”代表名为library cache lock的子latch； 6、用“Child library cache pin”代表名为library cache pin的子latch；   需要注意的是：从11gR1开始，Oracle用mutex替换了各种跟library cache相关的latch，所以这篇文章的结论并不适用于11g。 另外，这篇文章的结论是基于10.2.0.1，而从10.2.0.2以后，Oracle会用mutex取代针对cursor的library cache pin，所以从10.2.0.2后，软软解析的时候不再需要持有Child library cache pin。   我在“硬解析和软解析情况下latch持有情况分析”这篇文章里对硬解析和软解析情况下的latch持有情况做了分析，得出的结论是： 1、SQL在硬解析的时候，会先去持有Child library cache以扫描library cache object handle链表，接着会释放Child library cache（因为找不到相关的library cache object handle），接下来会再次持有Child library cache（因为要修改library [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">为了方便阐述，这篇文章里我沿用了如下一些术语：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">、用“</span><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache lock</span></strong><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">”代表名为</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">enqueue</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">；</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">、用“</span><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache pin</span></strong><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">”代表名为</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">enqueue</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">；</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">3</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">、用“</span><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span></strong><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">”代表名为</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的子</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">；</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">4</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">、用“</span><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child shared pool</span></strong><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">”代表名为</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">shared pool</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的子</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">；</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">5</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">、用“</span><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache lock</span></strong><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">”代表名为</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的子</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">；</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">6</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">、用“</span><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache pin</span></strong><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">”代表名为</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的子</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">；</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-hansi-font-family: 'Times New Roman';" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">需要注意的是：从</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">11gR1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">开始，</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">用</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">mutex</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">替换了各种跟</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">相关的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，所以这篇文章的结论并不适用于</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">11g</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">。</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">另外，这篇文章的结论是基于</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">10.2.0</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">.1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，而从</span><span style="font-family: arial; font-size: 10pt; mso-hansi-font-family: 'Times New Roman';" lang="EN-US">10.2.0.2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: arial;">以后，</span><span style="font-family: arial; font-size: 10pt; mso-hansi-font-family: 'Times New Roman';" lang="EN-US">Oracle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: arial;">会用</span><span style="font-family: arial; font-size: 10pt; mso-hansi-font-family: 'Times New Roman';" lang="EN-US">mutex</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: arial;">取代针对</span><span style="font-family: arial; font-size: 10pt; mso-hansi-font-family: 'Times New Roman';" lang="EN-US">cursor</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt; mso-hansi-font-family: 'Times New Roman';" lang="EN-US">library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: arial;">，<strong style="mso-bidi-font-weight: normal;">所以从</strong></span><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt; mso-hansi-font-family: 'Times New Roman';" lang="EN-US">10.2.0.2</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: arial;">后，软软解析的时候不再需要持有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt; mso-hansi-font-family: 'Times New Roman';" lang="EN-US">Child library cache pin</span></strong><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: arial;">。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-hansi-font-family: 'Times New Roman';" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">我在“</span><span style="font-family: arial; color: gray; font-size: 10pt;" lang="EN-US"><a href="http://www.dbsnake.net/hard-and-soft-parse-latch-analysis.html"><span style="font-family: 宋体; color: gray; mso-ascii-font-family: arial; mso-hansi-font-family: arial;" lang="EN-US"><span lang="EN-US">硬解析和软解析情况下</span></span><span style="color: gray;">latch</span><span style="font-family: 宋体; color: gray; mso-ascii-font-family: arial; mso-hansi-font-family: arial;" lang="EN-US"><span lang="EN-US">持有情况分析</span></span></a></span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">”这篇文章里对硬解析和软解析情况下的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">持有情况做了分析，得出的结论是：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">、</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">在硬解析的时候，会先去持有</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">以扫描</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache object handle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">链表，接着会释放</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">（因为找不到相关的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache object handle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">），接下来会再次持有</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">（因为要修改</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache object handle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">链表），然后在不释放</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的情况下进而去持有</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child shared pool</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">以分配内存，接着释放</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child shared pool</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">（因为已经分配完了），接着再释放</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">；然后因为要以</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">null</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">模式获得</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，所以要先持有</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">；接着要把相关</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sql</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的执行计划</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">load</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">到对应的子</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">cursor</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache object handle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">中，即要以</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">exclusive</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">模式获得</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，所以要先持有</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">；</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">、</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">在软解析的时候和硬解析类似，只不过不需要持有</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child shared pool</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">并且持有</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的时间会更短。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">注意这里为什么硬解析</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">/</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">软解析的时候是</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">在前，</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">在后，我们可以来证明一下（<strong style="mso-bidi-font-weight: normal;"><span style="color: red;">注意这个结论是错误的，实际上应该是</span></strong></span><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: red; font-size: 10pt;" lang="EN-US">library cache lock</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; color: red; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">在前，</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: red; font-size: 10pt;" lang="EN-US">library cache pin</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; color: red; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">在后</span></strong><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">）：</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">这里思路还是和“</span><span style="font-family: arial; color: gray; font-size: 10pt;" lang="EN-US"><a href="http://www.dbsnake.net/hard-and-soft-parse-latch-analysis.html"><span style="font-family: 宋体; color: gray; mso-ascii-font-family: arial; mso-hansi-font-family: arial;" lang="EN-US"><span lang="EN-US">硬解析和软解析情况下</span></span><span style="color: gray;">latch</span><span style="font-family: 宋体; color: gray; mso-ascii-font-family: arial; mso-hansi-font-family: arial;" lang="EN-US"><span lang="EN-US">持有情况分析</span></span></a></span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">”中的一样，即在</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">中手工持有所有的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">和所有的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，然后在</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 3</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">中观察</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">中</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的等待情况即可确定硬解析</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">/</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">软解析的时候是先持有</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">还是先持有</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">。</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">我们直接来看相关的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">trace</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">文件：</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">d:\oracle\admin\cuihua\udump\cuihua_ora_5896.trc</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的内容：</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*** 2012-05-07 22:04:54.843</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*** ACTION NAME:(Command Window &#8211; New) 2012-05-07 22:04:54.765</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*** MODULE NAME:(PL/SQL Developer) 2012-05-07 22:04:54.765</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*** SERVICE NAME:(cuihua) 2012-05-07 22:04:54.765</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*** SESSION ID:(119.6) 2012-05-07 22:04:54.765</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Received ORADEBUG command &#8216;dump processstate 10&#8242; from process Windows thread id: 6104, image: </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">===================================================</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">PROCESS</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> STATE</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Process global information:</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">     </span>process: 33E5723C, call: 31AEF434, xact: 00000000, curses: 33F102E4, usrses: 33F102E4</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>SO: 33E5723C, type: 2, owner: 00000000, flag: INIT/-/-/0&#215;00</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>(process) Oracle pid=44, calls cur/top: 31AEF434/31AEF434, flag: (0) -</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">            </span>int error: 0, call error: 0, sess error: 0, txn error 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>(post info) last post received: 0 0 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last post received-location: No post</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last process to post me: none</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last post sent: 0 0 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last post sent-location: No post</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span><span style="mso-spacerun: yes;">   </span>last process posted by me: none</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>(latch info) wait_event=0 bits=0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>Location from where call was made: kglpnal: child: alloc space: latch</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>Context saved from call: 1</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">      </span><strong style="mso-bidi-font-weight: normal;"><span style="color: red;">waiting for 3213df50 Child library cache pin level=6 child#=2 </span></strong></span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span><span style="mso-spacerun: yes;">      </span>Location from where latch is held: kglpndl: child</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>Context saved from call: 1</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>state=busy, wlstate=free</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">          </span>waiters [orapid (seconds since: put on list, posted, alive check)]:</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>44 (15, 1336399492, 15)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>waiter count=1</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">          </span>gotten 220077 times wait, failed first 8 sleeps 2</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">          </span>gotten 0 times nowait, failed: 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">      </span>on wait list for 3213df50</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>Process Group: DEFAULT, pseudo proc: 33E7F368</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>O/S info: user: SYSTEM, term: Y8908CUIHUA, ospid: 5896</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>OSD pid info: Windows thread id: 5896, image: ORACLE.EXE (SHAD)</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">注意上述</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">trace</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">文件中有如下内容：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">waiting for 3213df50 Child library cache pin level=6 child#=2</span></strong></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">所以</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 2</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">在</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache lock</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">和</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache pin</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">同时被</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">hold</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">住的情况下是会先尝试持有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache pin</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，即</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache pin</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">在前，</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache lock</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">在后。</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; color: red; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">――注意这个结论是错误的，我后面专门为此写了一篇文章</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">“</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: gray; font-size: 10pt;" lang="EN-US"><a href="http://www.dbsnake.net/library-cache-lock-and-pin-latch-hold-order.html"><span style="color: gray;">library cache lock latch</span><span style="font-family: 宋体; color: gray; mso-ascii-font-family: arial; mso-hansi-font-family: arial;" lang="EN-US"><span lang="EN-US">和</span></span><span style="color: gray;">library cache pin latch</span><span style="font-family: 宋体; color: gray; mso-ascii-font-family: arial; mso-hansi-font-family: arial;" lang="EN-US"><span lang="EN-US">的持有顺序</span></span></a></span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">”<span style="color: red;">加以纠正。</span></span></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">这里并没有就软软解析和软解析在</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">持有情况方面的区别加以说明，我这里补充阐述一下。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">先来说一下软解析和软软解析的区别：</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">我原来一直认为软解析和软软解析没有本质区别（<strong style="mso-bidi-font-weight: normal;">实际上从后面的测试可以看到，它们在跟</strong></span><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">相关的</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">latch</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">持有情况方面有本质区别，<span style="color: red;">所以软软解析在</span></span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: red; font-size: 10pt;" lang="EN-US">latch</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; color: red; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">争用方面要比软解析好很多</span></strong><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">），<strong style="mso-bidi-font-weight: normal;">他们最大的区别就是软解析中的</strong></span><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">每次都会重复</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">open/parse/bind/execute/fetch/close</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的过程，而软软解析中的</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">只会</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">open/close</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">一次，然后不断重复</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">parse/bind/execute/fetch</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，省掉的就是重复</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">open/close</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的时间。</span></strong><strong style="mso-bidi-font-weight: normal;"></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">接着我们来说一下有关软解析和软软解析的一个重要知识点：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Note also that a cursor is put in the session cursor cache only if there are <span style="color: blue;">more than three parse calls on it</span>; </span></strong><span style="font-family: arial; font-size: 10pt;" lang="EN-US">this behaviour avoids random cursors and cursors with literal to dirty the cache.</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">注意这是</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">MOS</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">上“</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">How to read session cursor cache statistics using oradebug (doc id 283134.1)</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">”里的结论，<strong style="mso-bidi-font-weight: normal;">但我在</strong></span><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">10.2.0</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">.1</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">中测试却发现并不是这样，应该是</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">在</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">10g</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">以及后续的版本里对</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cache</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的算法做了改进</span></strong><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">。</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></strong></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">我在</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">10.2.0</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">.1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">中实际测试后发现：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">当</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session_cached_cursors</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的值大于</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">0</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">且缓存的</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的数量在当前</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">中的值还没有达到</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session_cached_cursors</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的上限的时候，<span style="color: red;">一个</span></span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: red; font-size: 10pt;" lang="EN-US">sql</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; color: red; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">第一次软解析的时候就会被</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: red; font-size: 10pt;" lang="EN-US">cache</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; color: red; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">住，下次再在同一个</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: red; font-size: 10pt;" lang="EN-US">session</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; color: red; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">中再次执行同样的</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: red; font-size: 10pt;" lang="EN-US">sql</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; color: red; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的时候就会是软软解析。如果缓存的</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: red; font-size: 10pt;" lang="EN-US">session cursor</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; color: red; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的数量在当前</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: red; font-size: 10pt;" lang="EN-US">session</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; color: red; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">中的值已经达到</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: red; font-size: 10pt;" lang="EN-US">session_cached_cursors</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; color: red; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的上限，则</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: red; font-size: 10pt;" lang="EN-US">Oracle</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; color: red; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">会用</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: red; font-size: 10pt;" lang="EN-US">LRU</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; color: red; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">算法来管理当前</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: red; font-size: 10pt;" lang="EN-US">cache</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; color: red; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">住的</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: red; font-size: 10pt;" lang="EN-US">session cursor</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; color: red; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">链表。</span></strong><strong style="mso-bidi-font-weight: normal;"></strong></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></strong></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">我们来证明一下上述知识点：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL*Plus: Release 10.2.0.1.0 &#8211; Production on </span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">星期二</span><span style="font-family: arial; font-size: 10pt;"> <span lang="EN-US">5</span></span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">月</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> 8 08:49:01 2012</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Copyright (c) 1982, 2005, Oracle.<span style="mso-spacerun: yes;">  </span>All rights reserved.</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; conn sys/oracle@cuihua as sysdba;</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">已连接。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; show parameter session_cache;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">NAME<span style="mso-spacerun: yes;">                                 </span>TYPE<span style="mso-spacerun: yes;">        </span>VALUE</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session_cached_cursors<span style="mso-spacerun: yes;">               </span>integer<span style="mso-spacerun: yes;">     </span>20</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select sid from v$mystat where rownum&lt;2;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">       </span>SID</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">       </span>134</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select spid from v$process where addr in (select paddr from v$session where sid=134);</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SPID</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">2644</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">为了避免干扰</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">我们查询</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sid=134</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">相关信息的时候起另起一个新的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">并在新的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">中执行查询</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sid=134</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">相关信息的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sql</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">还未执行目标</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sql</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">时的初始</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">相关信息</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">:</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select a.name,b.value from v$sesstat b, v$statname a where a.statistic#=b.statistic# and a.name in (&#8216;session cursor cache count&#8217;,'session cursor cache hits&#8217;,'opened cursors current&#8217;) and b.sid=134;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">NAME<span style="mso-spacerun: yes;">                                                                  </span>VALUE</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">opened cursors current<span style="mso-spacerun: yes;">                                                    </span>0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor cache hits<span style="mso-spacerun: yes;">                                                 </span>0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor cache count<span style="mso-spacerun: yes;">                                                </span>3</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">从上述结果里可以看到，</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sid=134</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的初始</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cached cursor</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的值是</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">3</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，此时因为</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sid=134</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">还未执行任何</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sql</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，所以</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor cache hits</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的值当然是</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">0</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">在</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sid=134</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">中第一次执行目标</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sql</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，这时是硬解析：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select count(*) from scott.emp;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>COUNT(*)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>13</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">此时的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">相关信息为</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">:</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select a.name,b.value from v$sesstat b, v$statname a where a.statistic#=b.statistic# and a.name in (&#8216;session cursor cache count&#8217;,'session cursor cache hits&#8217;,'opened cursors current&#8217;) and b.sid=134;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">NAME<span style="mso-spacerun: yes;">                                                     </span><span style="mso-spacerun: yes;">             </span>VALUE</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">opened cursors current<span style="mso-spacerun: yes;">                                                    </span>0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor cache hits<span style="mso-spacerun: yes;">                                                 </span>0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor cache count<span style="mso-spacerun: yes;">                                                </span>3</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">从上述结果里可以看到，当执行完一次目标</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sql</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">后，</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor cache count</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的值和</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor cache hits</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的值均没有变化。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">在</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sid=134</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">中第</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">二</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">次执行目标</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sql</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，此时因为是第一次软解析，所以该</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">就会被</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">住</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">:</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select count(*) from scott.emp;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>COUNT(*)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>13</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">此时的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">相关信息为</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">:</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select a.name,b.value from v$sesstat b, v$statname a where a.statistic#=b.statistic# and a.name in (&#8216;session cursor cache count&#8217;,'session cursor cache hits&#8217;,'opened cursors current&#8217;) and b.sid=134;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">NAME<span style="mso-spacerun: yes;">                                                                  </span>VALUE</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">opened cursors current<span style="mso-spacerun: yes;">                                                    </span>0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">session cursor cache hits<span style="mso-spacerun: yes;">                                                 </span>0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">session cursor cache count<span style="mso-spacerun: yes;">                                                </span>4</span></strong></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">从上述结果里可以看到</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">，</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">当</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">第一次以软解析方式执行完目标</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">sql</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">后</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">，</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">session cursor cache count</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的值从</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">3</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">变成了</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">4</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">，也就是说上述目标</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">sql</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">所对应的</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">session cursor</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">已经被缓存了。因为此时刚刚被缓存，所以</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">session cursor cache hits</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">的值依然是</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">0</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">在</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sid=134</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">中第三次执行目标</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sql:</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">SQL&gt; select count(*) from scott.emp;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR"><span style="mso-spacerun: yes;">  </span>COUNT(*)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR"><span style="mso-spacerun: yes;">        </span>13</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">此时的</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">session cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">相关信息为</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">:</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">SQL&gt; select a.name,b.value from v$sesstat b, v$statname a where a.statistic#=b.statistic# and a.name in (&#8216;session cursor cache count&#8217;,'session cursor cache hits&#8217;,'opened cursors current&#8217;) and b.sid=134;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">NAME<span style="mso-spacerun: yes;">                                </span><span style="mso-spacerun: yes;">                                  </span>VALUE</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">opened cursors current<span style="mso-spacerun: yes;">                                                    </span>0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">session cursor cache hits<span style="mso-spacerun: yes;">                                       </span><span style="mso-spacerun: yes;">          </span>1</span></strong></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">session cursor cache count<span style="mso-spacerun: yes;">                                                </span>4</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">从上述结果里可以看到</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">，</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">因为</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">上述目标</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">sql</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">所对应的</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">session cursor</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">已经被缓存了，再次执行的时候是能够命中缓存的，所以此时</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">session cursor cache hits</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">的值从</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">0</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">变为了</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">，表示命中一次缓存的</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">session cursor</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">现在我们新开一个</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">sid=129</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">的</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">session</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL*Plus: Release 10.2.0.1.0 &#8211; Production on </span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">星期二</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> 5</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">月</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> 8 11:04:30 2012</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Copyright (c) 1982, 2005, Oracle.<span style="mso-spacerun: yes;">  </span>All rights reserved.</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; conn sys/oracle@cuihua as sysdba;</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">已连接。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; show parameter session_cache;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">NAME<span style="mso-spacerun: yes;">                                 </span>TYPE<span style="mso-spacerun: yes;">        </span>VALUE</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session_cached_cursors<span style="mso-spacerun: yes;">               </span>integer<span style="mso-spacerun: yes;">     </span>20</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select sid from v$mystat where rownum&lt;2;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">       </span></span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">SID</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR"><span style="mso-spacerun: yes;">       </span>129</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">此时该</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">session</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">相关信息为</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">:</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select a.name,b.value from v$sesstat b, v$statname a where a.statistic#=b.statistic# and a.name in (&#8216;session cursor cache count&#8217;,'session cursor cache hits&#8217;,'opened cursors current&#8217;) and b.sid=129;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">NAME<span style="mso-spacerun: yes;">                                                                  </span>VALUE</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">opened cursors current<span style="mso-spacerun: yes;">                                                    </span>0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor cache hits<span style="mso-spacerun: yes;">                                                 </span>0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor cache count<span style="mso-spacerun: yes;">                                                </span>4</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">从上述结果里可以看到，</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sid=129</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的初始</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cached cursor</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的值由</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">3 </span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">变成了</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">4</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，此时因为</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sid=129</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">还未执行任何</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sql</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，所以</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor cache hits</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的值当然是</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">0</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">在</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sid=129</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">中第一次执行目标</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sql</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，因为目标</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sql</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">已经在</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sid=134</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">中执行过，所以这里虽然是第一次执行，但已经是软解析：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select count(*) from scott.emp;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span></span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">COUNT(*)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR"><span style="mso-spacerun: yes;">        </span>13</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">此时该</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">session</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">相关信息为</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">:</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select a.name,b.value from v$sesstat b, v$statname a where a.statistic#=b.statistic# and a.name in (&#8216;session cursor cache count&#8217;,'session cursor cache hits&#8217;,'opened cursors current&#8217;) and b.sid=129;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">NAME<span style="mso-spacerun: yes;">                                                                  </span>VALUE</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">opened cursors current<span style="mso-spacerun: yes;">                                                    </span>0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor cache hits<span style="mso-spacerun: yes;">   </span><span style="mso-spacerun: yes;">                                              </span>0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor cache count<span style="mso-spacerun: yes;">                                                </span>5</span></strong></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">从上述结果里可以看到，当在</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sid=129</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">中</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">第一次以软解析方式执行完目标</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sql</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">后，</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor cache count</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的值从</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">4</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">变成了</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">5</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">也就是说上述目标</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sql</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">所对应的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">已经被缓存了。因为此时刚刚被缓存</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">所以</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor cache hits</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">的值依然是</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">0</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">在</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sid=129</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">中第二次执行目标</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sql:</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select count(*) from scott.emp;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span></span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">COUNT(*)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR"><span style="mso-spacerun: yes;">  </span><span style="mso-spacerun: yes;">      </span>13</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">此时该</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">session</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">相关信息为</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">:</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select a.name,b.value from v$sesstat b, v$statname a where a.statistic#=b.statistic# and a.name in (&#8216;session cursor cache count&#8217;,'session cursor cache hits&#8217;,'opened cursors current&#8217;) and b.sid=129;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">NAME<span style="mso-spacerun: yes;">       </span><span style="mso-spacerun: yes;">                                                           </span>VALUE</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">opened cursors current<span style="mso-spacerun: yes;">                                                    </span>0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor cache hits<span style="mso-spacerun: yes;">              </span><span style="mso-spacerun: yes;">                                   </span>1</span></strong></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor cache count<span style="mso-spacerun: yes;">                                                </span>5</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">从上述结果里可以看到，因为</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">上述目标</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sql</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">所对应的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">已经被缓存了</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">再次执行的时候是能够命中缓存的</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">所以此时</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor cache hits</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">的值从</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">0</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">变为了</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">表示命中一次缓存的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">好了，基础知识已经说完，我们进入正题。</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">我们分四步来考察软软解析时跟</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">相关的各种</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的持有情况，这四步考察</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">持有情况的思路均为：同时开</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">3</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">个</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">持有所有的相关子</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">；</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">先重复执行同样的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sql</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，这样可确保随后在</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">中再次执行同样的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sql</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">时是软软解析，在</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">持有完所有的相关子</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">后再次执行同样的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sql</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">；同时我们在</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 3</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">中去做</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">process dump</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，从</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 3</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">dump</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">文件中即可看到</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">中的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">持有与等待的情况。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-font-kerning: 0pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">第一步：先来证明在</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">10.2.0</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">.1</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">里，软软解析的时候同样会持有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></strong><strong style="mso-bidi-font-weight: normal;"></strong></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">先分别到</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">、</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">、</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 3</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">里做一下准备工作：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: blue; font-size: 10pt;" lang="EN-US">Session 1:</span></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select &#8216;oradebug poke 0x&#8217; || addr || &#8216; 4 0&#215;00000001&#8242; from v$latch_children where name=&#8217;library cache&#8217;;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8216;ORADEBUGPOKE0X&#8217;||ADDR||&#8217;40X00</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">oradebug poke 0x3213DE80 4 0&#215;00000001</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">oradebug poke 0x3213DE18 4 0&#215;00000001</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">oradebug poke 0x3213DDB0 4 0&#215;00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR"> </span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: blue; font-size: 10pt;" lang="EN-US">Session 2:</span></strong></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: da;">这里沿用刚才的</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da;" lang="DA">sid=134</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: da;">，</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da;" lang="DA">ospid=2644</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: da;">的</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da;" lang="DA">session</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: da;">。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da;" lang="DA"> </span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: blue; font-size: 10pt; mso-ansi-language: da;" lang="DA">Session 3:</span></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da;" lang="DA">SQL&gt; oradebug setospid 2644</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle pid: 30, Windows thread id: 2644, image: ORACLE.EXE (SHAD)</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">准备工作已经做完，我们现在去</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">里手工持有上述</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: blue; font-size: 10pt;" lang="EN-US">Session 1:</span></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; oradebug setmypid</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">已处理的语句</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da;" lang="DA">SQL&gt; oradebug poke 0x3213DE80 4 0&#215;00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da;" lang="DA">BEFORE: [3213DE80, 3213DE84) = 00000000</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da;" lang="DA">AFTER:<span style="mso-spacerun: yes;">  </span>[3213DE80, 3213DE84) = 00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da;" lang="DA">SQL&gt; oradebug poke 0x3213DE18 4 0x00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da;" lang="DA">BEFORE: [3213DE18, 3213DE1C) = 00000000</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da;" lang="DA">AFTER:<span style="mso-spacerun: yes;">  </span>[3213DE18, 3213DE1C) = 00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da;" lang="DA">SQL&gt; oradebug poke 0x3213DDB0 4 0x00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da;" lang="DA">BEFORE: [3213DDB0, 3213DDB4) = 00000000</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da;" lang="DA">AFTER:<span style="mso-spacerun: yes;">  </span>[3213DDB0, 3213DDB4) = 00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da;" lang="DA"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">然后到</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da;" lang="DA">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">中去执行上述目标查询</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da;" lang="DA">sql</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: da;">，</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">从结果里可以看到</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: da;">，</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">在软软解析的情况下</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da;" lang="DA">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">还是</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da;" lang="DA">hang</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">住了</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: da;">：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: blue; font-size: 10pt;" lang="EN-US">Session 2</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; color: blue; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></strong><strong style="mso-bidi-font-weight: normal;"></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select count(*) from scott.emp;</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">……这里</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">hang</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">住了</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">接着我们到</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 3</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">中去对</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">做一下</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">process dump</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: blue; font-size: 10pt;" lang="EN-US">Session 3:</span></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; oradebug dump processstate 10</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">已处理的语句</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; oradebug tracefile_name</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">d:\oracle\admin\cuihua\udump\cuihua_ora_2644.trc</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">d:\oracle\admin\cuihua\udump\cuihua_ora_2644.trc</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的内容</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br;">：</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">*** 2012-05-08 10:13:33.968</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">*** SERVICE NAME:(cuihua) 2012-05-08 10:13:33.890</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">*** SESSION ID:(134.24) 2012-05-08 10:13:33.890</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">Received ORADEBUG command 'dump processstate 10' from process Windows thread id: 4528, image: </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">===================================================</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">PROCESS</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> STATE</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">-------------</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Process global information:</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">     </span>process: 33E51F1C, call: 317B0FFC, xact: 00000000, curses: 33F21C9C, usrses: 33F21C9C</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>----------------------------------------</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>SO: 33E51F1C, type: 2, owner: 00000000, flag: INIT/-/-/0x00</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>(process) Oracle pid=30, calls cur/top: 317B0FFC/317B0FFC, flag: (0) -</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">            </span>int error: 0, call error: 0, sess error: 0, txn error 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>(post info) last post received: 0 0 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last post received-location: No post</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span><span style="mso-spacerun: yes;">   </span>last process to post me: none</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last post sent: 0 0 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last post sent-location: No post</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last process posted by me: none</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>(latch info) wait_event=0 bits=0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>Location from where call was made: kglpin: child: heap processing: latch</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">      </span><strong style="mso-bidi-font-weight: normal;"><span style="color: red;">waiting for 3213ddb0 Child library cache level=5 child#=3 </span></strong></span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>Location from where latch is held: kglpndl: child: before processing: latch</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>Context saved from call: 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>state=busy, wlstate=free</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">          </span>waiters [orapid (seconds since: put on list, posted, alive check)]:</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>10 (126, 1336443212, 126)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>31 (108, 1336443212, 108)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>15 (105, 1336443212, 105)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>11 (99, 1336443212, 99)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>30 (84, 1336443212, 84)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>24 (66, 1336443212, 66)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>23 (66, 1336443212, 66)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>21 (63, 1336443212, 63)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>22 (63, 1336443212, 63)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>waiter count=9</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">          </span>gotten 99309 times wait, failed first 53 sleeps 2</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">          </span>gotten 294 times nowait, failed: 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">      </span>on wait list for 3213ddb0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>Process Group: DEFAULT, pseudo proc: 33E7F368</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>O/S info: user: SYSTEM, term: Y8908CUIHUA, ospid: 2644</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>OSD pid info: Windows thread id: 2644, image: ORACLE.EXE (SHAD)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">……省略显示其他内容</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">注意上述</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">trace</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">文件中有如下内容：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">waiting for 3213ddb0 Child library cache level=5 child#=3</span></strong></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">所以我们已经证明了软软解析同样会持有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，即过度的软软解析同样会导致</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的争用。</span></strong><strong style="mso-bidi-font-weight: normal;"></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">手工释放上述</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">后</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">恢复正常：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select count(*) from scott.emp;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>COUNT(*)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>13</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">从下述结果里可以看到现在</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor cache hits</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的值由</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">变成了</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，所以刚才执行的目标</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sql</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">毫无疑问是软软解析：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select a.name,b.value from v$sesstat b, v$statname a where a.statistic#=b.statistic# and a.name in (&#8216;session cursor cache count&#8217;,'session cursor cache hits&#8217;,'opened cursors current&#8217;) and b.sid=134;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">NAME<span style="mso-spacerun: yes;">                                                                  </span>VALUE</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">opened cursors current<span style="mso-spacerun: yes;">                                           </span><span style="mso-spacerun: yes;">         </span>0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor cache hits<span style="mso-spacerun: yes;">                                                 </span>2</span></strong></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor cache count<span style="mso-spacerun: yes;">                                                </span>4</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">第二步：我们来证明软软解析的时候不需要持有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache lock</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，这一点跟软解析有本质区别</span></strong><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">先分别到</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">、</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">、</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 3</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">里做一下准备工作：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: blue; font-size: 10pt;" lang="EN-US">Session 1:</span></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select &#8216;oradebug poke 0x&#8217; || addr || &#8216; 4 0&#215;00000001&#8242; from v$latch_children where name=&#8217;library cache lock&#8217;;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8216;ORADEBUGPOKE0X&#8217;||ADDR||&#8217;40X00</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">oradebug poke 0x3213E0F0 4 0&#215;00000001</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">oradebug poke 0x3213E088 4 0&#215;00000001</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">oradebug poke 0x3213E020 4 0&#215;00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: blue; font-size: 10pt;" lang="EN-US">Session 2:</span></strong></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: da;">这里沿用刚才的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sid=134</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">ospid=2644</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: da;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: da;">。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: blue; font-size: 10pt;" lang="EN-US">Session 3:</span></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; oradebug setospid 2644</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle pid: 30, Windows thread id: 2644, image: ORACLE.EXE (SHAD)</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">准备工作已经做完，我们现在去</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">里手工持有上述</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: blue; font-size: 10pt;" lang="EN-US">Session 1:</span></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; oradebug setmypid</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">已处理的语句</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">SQL&gt; oradebug poke 0x3213E0F0 4 0&#215;00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">BEFORE: [3213E0F0, 3213E0F4) = 00000000</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">AFTER:<span style="mso-spacerun: yes;">  </span>[3213E0F0, 3213E0F4) = 00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">SQL&gt; oradebug poke 0x3213E088 4 0x00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">BEFORE: [3213E088, 3213E08C) = 00000000</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">AFTER:<span style="mso-spacerun: yes;">  </span>[3213E088, 3213E08C) = 00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">SQL&gt; oradebug poke 0x3213E020 4 0x00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">BEFORE: [3213E020, 3213E024) = 00000000</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">AFTER:<span style="mso-spacerun: yes;">  </span>[3213E020, 3213E024) = 00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da;" lang="DA"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">然后到</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da;" lang="DA">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">中去执行上述目标查询</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da;" lang="DA">sql</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: da;">，</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">从结果里可以看到</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: da;">，</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">在软软解析的情况下</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da;" lang="DA">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">没有</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da;" lang="DA">hang</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">住</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: da;">：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: blue; font-size: 10pt;" lang="EN-US">Session 2</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; color: blue; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></strong><strong style="mso-bidi-font-weight: normal;"></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select count(*) from scott.emp;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>COUNT(*)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">----------</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>13</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">手工释放上述</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，注意这一步是一定要做的，否则如下的查询</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sid=134</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">情况的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sql</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">就会</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">hang</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">住。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">从下述结果里可以看到现在</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor cache hits</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的值由</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">变成了</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">3</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，所以刚才执行的目标</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sql</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">毫无疑问是软软解析：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select a.name,b.value from v$sesstat b, v$statname a where a.statistic#=b.statistic# and a.name in ('session cursor cache count','session cursor cache hits','opened cursors current') and b.sid=134;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">NAME<span style="mso-spacerun: yes;">   </span><span style="mso-spacerun: yes;">                                                               </span>VALUE</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">---------------------------------------------------------------- ----------</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">opened cursors current<span style="mso-spacerun: yes;">                                                    </span>0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor cache hits<span style="mso-spacerun: yes;">          </span><span style="mso-spacerun: yes;">                                       </span>3</span></strong></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor cache count<span style="mso-spacerun: yes;">                                                </span>4</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></strong></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">第三步：同理可证在</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">10.2.0</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">.1</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">里，软软解析同样会持有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache pin</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，我们直接来看相关的</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">trace</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">文件</span></strong><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">d:\oracle\admin\cuihua\udump\cuihua_ora_4276.trc</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的内容：</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">PROCESS</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> STATE</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">-------------</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Process global information:</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">     </span>process: 33E4FB7C, call: 33F5FA78, xact: 00000000, curses: 33F21C9C, usrses: 33F21C9C</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>----------------------------------------</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>SO: 33E4FB7C, type: 2, owner: 00000000, flag: INIT/-/-/0x00</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>(process) Oracle pid=24, calls cur/top: 33F5FA78/33F5FA78, flag: (0) -</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">            </span>int error: 0, call error: 0, sess error: 0, txn error 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>(post info) last post received: 0 0 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last post received-location: No post</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last process to post me: none</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last post sent: 0 0 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last post sent-location: No post</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last process posted by me: none</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>(latch info) wait_event=0 bits=0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>Location from where call was made: kglpnal: child: alloc space: latch</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">     </span><strong style="mso-bidi-font-weight: normal;"><span style="color: red;"><span style="mso-spacerun: yes;"> </span>waiting for 3213dee8 Child library cache pin level=6 child#=3 </span></strong></span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>Location from where latch is held: kglpndl: child</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span><span style="mso-spacerun: yes;">      </span>Context saved from call: 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>state=busy, wlstate=free</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">          </span>waiters [orapid (seconds since: put on list, posted, alive check)]:</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>10 (24, 1336447380, 24)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>24 (15, 1336447380, 15)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>11 (12, 1336447380, 12)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>waiter count=3</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">          </span>gotten 74165 times wait, failed first 5 sleeps 2</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">          </span>gotten 0 times nowait, failed: 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">      </span>on wait list for 3213dee8</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>Process Group: DEFAULT, pseudo proc: 33E7F368</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>O/S info: user: SYSTEM, term: Y8908CUIHUA, ospid: 2300</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>OSD pid info: Windows thread id: 2300, image: ORACLE.EXE (SHAD)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Dump of memory from 0x33E3AE04 to 0x33E3AF88</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">……省略显示其他内容</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">注意上述</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">trace</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">文件中有如下内容：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">waiting for 3213dee8 Child library cache pin level=6 child#=3</span></strong></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">所以我们已经证明了在</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">10.2.0</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">.1</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">里，软软解析同样会持有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache pin</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">。</span></strong><strong style="mso-bidi-font-weight: normal;"></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">手工释放上述</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">后</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">恢复正常：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select count(*) from scott.emp;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>COUNT(*)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>13</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">从下述结果里可以看到现在</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor cache hits</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的值由</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">3</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">变成了</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">4</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，所以刚才执行的目标</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sql</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">毫无疑问是软软解析：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select a.name,b.value from v$sesstat b, v$statname a where a.statistic#=b.statistic# and a.name in (&#8216;session cursor cache count&#8217;,'session cursor cache hits&#8217;,'opened cursors current&#8217;) and b.sid=134;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">NAME<span style="mso-spacerun: yes;">                                                                  </span>VALUE</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">opened cursors current<span style="mso-spacerun: yes;">                                                    </span>0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor cache hits<span style="mso-spacerun: yes;">                                                 </span>4</span></strong></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor cache count<span style="mso-spacerun: yes;">                               </span><span style="mso-spacerun: yes;">                 </span>4</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">第四步：我们证明了</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">10.2.0</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">.5</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">里软软解析的时候是真的不再需要持有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache pin</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">了，</span></strong><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">这个是因为从</span><span style="font-family: arial; font-size: 10pt; mso-hansi-font-family: 'Times New Roman';" lang="EN-US">10.2.0.2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: arial;">以后，</span><span style="font-family: arial; font-size: 10pt; mso-hansi-font-family: 'Times New Roman';" lang="EN-US">Oracle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: arial;">会用</span><span style="font-family: arial; font-size: 10pt; mso-hansi-font-family: 'Times New Roman';" lang="EN-US">mutex</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: arial;">取代针对</span><span style="font-family: arial; font-size: 10pt; mso-hansi-font-family: 'Times New Roman';" lang="EN-US">cursor</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt; mso-hansi-font-family: 'Times New Roman';" lang="EN-US">library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: arial;">，即软解析</span><span style="font-family: arial; font-size: 10pt; mso-hansi-font-family: 'Times New Roman';" lang="EN-US">/</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: arial;">软软解析的时候不再需要以</span><span style="font-family: arial; font-size: 10pt; mso-hansi-font-family: 'Times New Roman';" lang="EN-US">share</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: arial;">模式申请</span><span style="font-family: arial; font-size: 10pt; mso-hansi-font-family: 'Times New Roman';" lang="EN-US">library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: arial;">，所以保护</span><span style="font-family: arial; font-size: 10pt; mso-hansi-font-family: 'Times New Roman';" lang="EN-US">library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt; mso-hansi-font-family: 'Times New Roman';" lang="EN-US">Child library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: arial;">当然就不再需要持有了</span><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">:</span></strong></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">还是先分别到</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">、</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">、</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 3</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">中做一下准备工作：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: blue; font-size: 10pt;" lang="EN-US">Session 1:</span></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select &#8216;oradebug poke 0x&#8217; || addr || &#8216; 4 0&#215;00000001&#8242; from v$latch_children where name=&#8217;library cache pin&#8217;;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8216;ORADEBUGPOKE0X&#8217;||ADDR||&#8217;40X00</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">oradebug poke 0x07000000BAC73100 4 0&#215;00000001</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">oradebug poke 0x07000000BAC73060 4 0&#215;00000001</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">oradebug poke 0x07000000BAC72FC0 4 0&#215;00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: blue; font-size: 10pt;" lang="EN-US">Session 2:</span></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select * from v$version;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">BANNER</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 &#8211; 64bi</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">PL/SQL Release 10.2.0.5.0 &#8211; Production</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">CORE<span style="mso-spacerun: yes;">    </span>10.2.0.5.0<span style="mso-spacerun: yes;">      </span>Production</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">TNS for IBM/AIX RISC System/6000: Version 10.2.0.5.0 &#8211; Productio</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">NLSRTL Version 10.2.0.5.0 &#8211; Production</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select sid from v$mystat where rownum=1;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">       </span>SID</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">       </span>415</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select spid from v$process where addr in (select paddr from v$session where sid=415);</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SPID</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">1052802</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; show parameter session_cache;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">NAME<span style="mso-spacerun: yes;">                                 </span>TYPE<span style="mso-spacerun: yes;">        </span>VALUE</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session_cached_cursors<span style="mso-spacerun: yes;">               </span>integer<span style="mso-spacerun: yes;">     </span>20</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select count(*) from scott.emp;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>COUNT(*)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>12</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">另外在一个新的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">中观察</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sid=415</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">情况：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select a.name,b.value from v$sesstat b, v$statname a where a.statistic#=b.statistic# and a.name in (&#8216;session cursor cache count&#8217;,'session cursor cache hits&#8217;,'opened cursors current&#8217;) and b.sid=415;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">NAME<span style="mso-spacerun: yes;">                                                               </span><span style="mso-spacerun: yes;">   </span>VALUE</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">opened cursors current<span style="mso-spacerun: yes;">                                                    </span>0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor cache hits<span style="mso-spacerun: yes;">                                                </span>45</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor cache count<span style="mso-spacerun: yes;">                                               </span>20</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">反复多次执行，直到确保</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor cache hits</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的值增加，即确保此后再次执行的时候会是软软解析：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select count(*) from scott.emp;</span></p>
<p class="MsoNormal" style="background: #e0e0e0;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e0e0e0;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>COUNT(*)</span></p>
<p class="MsoNormal" style="background: #e0e0e0;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e0e0e0;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>12</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select count(*) from scott.emp;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>COUNT(*)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">     </span><span style="mso-spacerun: yes;">   </span>12</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select count(*) from scott.emp;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>COUNT(*)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>12</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">重复执行完上述</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sql</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">后观察</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sid=415</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">情况：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select a.name,b.value from v$sesstat b, v$statname a where a.statistic#=b.statistic# and a.name in (&#8216;session cursor cache count&#8217;,'session cursor cache hits&#8217;,'opened cursors current&#8217;) and b.sid=415;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">NAME<span style="mso-spacerun: yes;">                                                                  </span>VALUE</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">opened cursors current<span style="mso-spacerun: yes;">                 </span><span style="mso-spacerun: yes;">                                   </span>0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor cache hits<span style="mso-spacerun: yes;">                                                </span>46</span></strong></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor cache count<span style="mso-spacerun: yes;">                                               </span>20</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">可以看到现在</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor cache hits</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的值由</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">45</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">变成了</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">46</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，即后续在该</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">没有被</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">age out</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">出缓存的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">链表之前，始终能确保再次执行同样的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sql</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">会是软软解析。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Session 3:</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; oradebug setospid 1052802</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle pid: 65, Unix process pid: 1052802, image: oracle@p690ca</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">准备工作已经做完了，我们现在开始到</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">中持有所有的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: blue; font-size: 10pt;" lang="EN-US">Session 1</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; color: blue; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></strong><strong style="mso-bidi-font-weight: normal;"></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; oradebug setmypid</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Statement processed.</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; oradebug poke 0x07000000BAC73100 4 0&#215;00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">oradebug poke 0x07000000BAC73060 4 0&#215;00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">BEFORE: [7000000BAC73100, 7000000BAC73104) = 00000000</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">AFTER:<span style="mso-spacerun: yes;">  </span>[7000000BAC73100, 7000000BAC73104) = 00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; BEFORE: [7000000BAC73060, 7000000BAC73064) = 00000000</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">AFTER:<span style="mso-spacerun: yes;">  </span>[7000000BAC73060, 7000000BAC73064) = 00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; oradebug poke 0x07000000BAC72FC0 4 0x00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">BEFORE: [7000000BAC72FC0, 7000000BAC72FC4) = 00000000</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">AFTER:<span style="mso-spacerun: yes;">  </span>[7000000BAC72FC0, 7000000BAC72FC4) = 00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">然后到</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">中去执行上述目标查询</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sql</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，从结果里可以看到，在软软解析的情况下</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">没有</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">hang</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">住：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: blue; font-size: 10pt;" lang="EN-US">Session 2</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; color: blue; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></strong><strong style="mso-bidi-font-weight: normal;"></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select count(*) from scott.emp;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>COUNT(*)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">----------</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>12</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">手工释放上述</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，注意这一步是一定要做的，否则如下的查询</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sid=415</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">情况的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sql</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">就会</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">hang</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">住。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">从下述结果里可以看到现在</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor cache hits</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的值由</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">46</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">变成了</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">47</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，所以刚才执行的目标</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sql</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">毫无疑问是软软解析：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select a.name,b.value from v$sesstat b, v$statname a where a.statistic#=b.statistic# and a.name in ('session cursor cache count','session cursor cache hits','opened cursors current') and b.sid=415;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">NAME<span style="mso-spacerun: yes;">                     </span><span style="mso-spacerun: yes;">                                             </span>VALUE</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">---------------------------------------------------------------- ----------</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">opened cursors current<span style="mso-spacerun: yes;">                                                    </span>0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor cache hits<span style="mso-spacerun: yes;">                            </span><span style="mso-spacerun: yes;">                    </span>47</span></strong></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session cursor cache count<span style="mso-spacerun: yes;">                                               </span>20</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">同理可证在</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">10.2.0</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">.5</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">里，软软解析的时候不再需要持有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，但需要持有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache lock</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">。</span></strong><strong style="mso-bidi-font-weight: normal;"></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">如下是在</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">10.2.0</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">.5</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">里软软解析且产生</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">等待时</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">trace</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">文件：</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">/u01/app/oracle/admin/ipratest/udump/ipratest_ora_1049072.trc</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle Database 10g Enterprise Edition Release <strong style="mso-bidi-font-weight: normal;">10.2.0</strong><strong style="mso-bidi-font-weight: normal;">.5.0</strong> - 64bit Production</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">With the Partitioning, OLAP, Data Mining and Real Application Testing options</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">ORACLE_HOME = /u01/app/oracle/product/10.2.0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">System name:<span style="mso-tab-count: 1;">       </span>AIX</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Node name:<span style="mso-tab-count: 1;">    </span>p690ca</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Release:3</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Version:<span style="mso-tab-count: 1;">  </span>5</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Machine:003716BA4C00</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Instance name: ipratest</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Redo thread mounted by this instance: 1</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle process number: 46</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Unix process pid: 1049072, image: oracle@p690ca</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*** 2012-05-08 15:24:22.293</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*** ACTION NAME:() 2012-05-08 15:24:22.292</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*** MODULE NAME:(SQL*Plus) 2012-05-08 15:24:22.292</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*** SERVICE NAME:(ipratest) 2012-05-08 15:24:22.292</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*** SESSION ID:(385.4145) 2012-05-08 15:24:22.292</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Received ORADEBUG command 'dump processstate 10' from process Unix process pid: 1130822, image: </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">===================================================</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">PROCESS</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> STATE</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">-------------</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Process global information:</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">     </span>process: 7000000be5b48e0, call: 7000000b87859b0, xact: 0, curses: 7000000be872968, usrses: 7000000be872968</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>----------------------------------------</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>SO: 7000000be5b48e0, type: 2, owner: 0, flag: INIT/-/-/0x00</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>(process) Oracle pid=46, calls cur/top: 7000000b87859b0/7000000b87859b0, flag: (0) -</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">            </span>int error: 0, call error: 0, sess error: 0, txn error 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>(post info) last post received: 0 0 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last post received-location: No post</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last process to post me: none</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last post sent: 0 0 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last post sent-location: No post</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last process posted by me: none</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;">   </span>(latch info) wait_event=0 bits=0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">      </span><strong style="mso-bidi-font-weight: normal;"><span style="color: red;">waiting for 7000000bac731a0 Child library cache lock level=6 child#=3 </span></strong></span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>Location from where latch is held: kgllkdl: child: cleanup: latch</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>Context saved from call: 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>state=busy, wlstate=free</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;">         </span>waiters [orapid (seconds since: put on list, posted, alive check)]:</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>21 (15, 1336461862, 3)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>11 (15, 1336461862, 3)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>46 (12, 1336461862, 3)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>63 (9, 1336461862, 3)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>61 (6, 1336461862, 3)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>71 (3, 1336461862, 3)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>waiter count=6</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">          </span>gotten 3414877 times wait, failed first 288 sleeps 489</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">          </span>gotten 0 times nowait, failed: 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">      </span>on wait list for 7000000bac731a0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>Process Group: DEFAULT, pseudo proc: 7000000be666078</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>O/S info: user: oracle, term: UNKNOWN, ospid: 1049072 </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>OSD pid info: Unix process pid: 1049072, image: oracle@p690ca</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>SO: 7000000be872968, type: 4, owner: 7000000be5b48e0, flag: INIT/-/-/0&#215;00</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>(session) sid: 385 trans: 0, creator: 7000000be5b48e0, flag: (41) USR/- BSY/-/-/-/-/-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>DID: 0001-002E-0000001E, short-term DID: 0000-0000-00000000</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>txn branch: 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>oct: 3, prv: 0, sql: 7000000bd1a5760, psql: 70000009ac4aef0, user: 55/CAIPRA</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>service name: ipratest</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>O/S info: user: cuihua, term: Y8908CUIHUA, ospid: 5288:3496, machine: WORKGROUP\Y8908CUIHUA</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>program: sqlplusw.exe</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>application name: SQL*Plus, hash value=3669949024</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span><strong style="mso-bidi-font-weight: normal;"><span style="color: red;">waiting for &#8216;latch: library cache lock&#8217; wait_time=0, seconds since wait started=9</span></strong></span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">                </span>address=7000000bac731a0, number=da, tries=1e</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">                </span>blocking sess=0&#215;0 seq=91</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>Dumping Session Wait History</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">     </span>for &#8216;latch: library cache lock&#8217; count=1 wait_time=0.292988 sec</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">                </span>address=7000000bac731a0, number=da, tries=1d</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">     </span>for &#8216;latch: library cache lock&#8217; count=1 wait_time=0.292987 sec</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">                </span>address=7000000bac731a0, number=da, tries=1c</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">     </span>for &#8216;latch: library cache lock&#8217; count=1 wait_time=0.293009 sec</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">                </span>address=7000000bac731a0, number=da, tries=1b</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">     </span>for &#8216;latch: library cache lock&#8217; count=1 wait_time=0.292986 sec</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">                </span>address=7000000bac731a0, number=da, tries=1a</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">     </span>for &#8216;latch: library cache lock&#8217; count=1 wait_time=0.292993 sec</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">                </span>address=7000000bac731a0, number=da, tries=19</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">     </span>for &#8216;latch: library cache lock&#8217; count=1 wait_time=0.292987 sec</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">                </span>address=7000000bac731a0, number=da, tries=18</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">     </span>for &#8216;latch: library cache lock&#8217; count=1 wait_time=0.292986 sec</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">                </span>address=7000000bac731a0, number=da, tries=17</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">     </span>for &#8216;latch: library cache lock&#8217; count=1 wait_time=0.292987 sec</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">                </span>address=7000000bac731a0, number=da, tries=16</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">     </span>for &#8216;latch: library cache lock&#8217; count=1 wait_time=0.292988 sec</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">                </span>address=7000000bac731a0, number=da, tries=15</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">     </span>for &#8216;latch: library cache lock&#8217; count=1 wait_time=0.292987 sec</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">                </span>address=7000000bac731a0, number=da, tries=14</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>Sampled Session History of session 385 serial 4145</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>The sampled session history is constructed by sampling</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>the target session every 1 second. The sampling process</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>captures at each sample if the session is in a non-idle wait,</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>an idle wait, or not in a wait. If the session is in a</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>non-idle wait then one interval is shown for all the samples</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>the session was in the same non-idle wait. If the</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>session is in an idle wait or not in a wait for</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>consecutive samples then one interval is shown for all</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>the consecutive samples. Though we display these consecutive</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>samples<span style="mso-spacerun: yes;">  </span>in a single interval the session may NOT be continuously</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>idle or not in a wait (the sampling process does not know).</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;"> </span></span></p>
<p class="MsoNormal" style="text-indent: 21pt; background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">The history is displayed in reverse chronological order.</span></p>
<p class="MsoNormal" style="text-indent: 21pt; background: #e6e6e6;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">……省略显示其他内容</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">最后，我们总结一下（注意这里只是大致的描述，并不包含所有的情况）：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">、</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">在软解析的时候，会先去持有</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">以扫描</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache object handle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">链表，接着会释放</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">（因为已经找到了目标</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache object handle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">），然后因为要以</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">null</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">模式获得</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，所以要先持有</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">；接着因为要准备执行相关</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sql</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的执行计划，所以要以</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">share</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">模式获得</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，进而要先持有</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">；</span><strong style="mso-bidi-font-weight: normal;"></strong></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">2</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">、</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">在软软解析的时候，</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">不同的版本表现不一样（我只测了如下两个版本）：</span></strong><strong style="mso-bidi-font-weight: normal;"></strong></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">在</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">10.2.0</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">.1</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">里：软软解析的时候需要持有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">和</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache pin</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，不需要持有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache lock</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">；</span></strong><strong style="mso-bidi-font-weight: normal;"></strong></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">在</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">10.2.0</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">.5</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">里：软软解析的时候需要持有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache lock</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，不需要持有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">和</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache pin</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">；</span></strong><strong style="mso-bidi-font-weight: normal;"></strong></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">总的来说，<span style="color: red;">软软解析在</span></span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: red; font-size: 10pt;" lang="EN-US">latch</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; color: red; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">争用方面要比软解析好很多</span></strong><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">。</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dbsnake.net/soft-soft-parse-latch-analysis.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>硬解析和软解析情况下latch持有情况分析</title>
		<link>http://www.dbsnake.net/hard-and-soft-parse-latch-analysis.html</link>
		<comments>http://www.dbsnake.net/hard-and-soft-parse-latch-analysis.html#comments</comments>
		<pubDate>Sat, 05 May 2012 05:21:34 +0000</pubDate>
		<dc:creator>Cui Hua</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.dbsnake.net/?p=73</guid>
		<description><![CDATA[为了方便阐述，这篇文章里我用了如下一些术语： 1、用“library cache lock”代表名为library cache lock的enqueue； 2、用“library cache pin”代表名为library cache pin的enqueue； 3、用“Child library cache”代表名为library cache的子latch； 4、用“Child shared pool”代表名为shared pool的子latch； 5、用“Child library cache lock”代表名为library cache lock的子latch； 6、用“Child library cache pin”代表名为library cache pin的子latch；   你可能需要先阅读如下的三篇文章才能看懂我在说什么： shared pool latch和library cache latch library cache lock和library cache pin到底是什么 library cache lock和library cache pin到底是什么（续）   另外需要注意的是：从11gR1开始，Oracle用mutex替换了各种跟library cache相关的latch，所以这篇文章的结论并不适用于11g。   我们首先来看library cache的经典架构： &#160; [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">为了方便阐述，这篇文章里我用了如下一些术语：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">、用“</span><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache lock</span></strong><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">”代表名为</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">enqueue</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">；</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">、用“</span><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache pin</span></strong><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">”代表名为</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">enqueue</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">；</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">3</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">、用“</span><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span></strong><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">”代表名为</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的子</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">；</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">4</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">、用“</span><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child shared pool</span></strong><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">”代表名为</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">shared pool</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的子</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">；</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">5</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">、用“</span><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache lock</span></strong><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">”代表名为</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的子</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">；</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">6</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">、用“</span><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache pin</span></strong><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">”代表名为</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的子</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">；</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">你可能需要先阅读如下的三篇文章才能看懂我在说什么：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><a href="http://www.laoxiong.net/shared-pool-latch-and-library-cache-latch.html">shared pool latch<span style="font-family: 宋体; mso-ascii-font-family: arial; mso-hansi-font-family: arial;" lang="EN-US"><span lang="EN-US">和</span></span>library cache latch</a></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><a href="http://www.dbsnake.net/library-cache-lock-and-pin.html">library cache lock<span style="font-family: 宋体; mso-ascii-font-family: arial; mso-hansi-font-family: arial;" lang="EN-US"><span lang="EN-US">和</span></span>library cache pin<span style="font-family: 宋体; mso-ascii-font-family: arial; mso-hansi-font-family: arial;" lang="EN-US"><span lang="EN-US">到底是什么</span></span></a></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><a href="http://www.dbsnake.net/library-cache-pin-and-lock-continue.html">library cache lock<span style="font-family: 宋体; mso-ascii-font-family: arial; mso-hansi-font-family: arial;" lang="EN-US"><span lang="EN-US">和</span></span>library cache pin<span style="font-family: 宋体; mso-ascii-font-family: arial; mso-hansi-font-family: arial;" lang="EN-US"><span lang="EN-US">到底<span lang="EN-US">是什么（续）</span></span></span></a></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">另外需要注意的是：从</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">11gR1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">开始，</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">用</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">mutex</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">替换了各种跟</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">相关的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，所以这篇文章的结论并不适用于</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">11g</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-font-kerning: 1.0pt; mso-ansi-language: en-us; mso-fareast-language: zh-cn; mso-bidi-language: ar-sa;">我们首先来看</span><span style="font-family: arial; font-size: 10pt; mso-font-kerning: 1.0pt; mso-ansi-language: en-us; mso-fareast-language: zh-cn; mso-bidi-language: ar-sa; mso-fareast-font-family: 宋体;" lang="EN-US">library cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-font-kerning: 1.0pt; mso-ansi-language: en-us; mso-fareast-language: zh-cn; mso-bidi-language: ar-sa;">的经典架构：</span></p>
<p><a href="http://www.dbsnake.net/wp-content/uploads/2012/05/library_cache_architecture.jpg"><img style="display: inline; border: 0px;" title="library_cache_architecture" src="http://www.dbsnake.net/wp-content/uploads/2012/05/library_cache_architecture_thumb.jpg" alt="library_cache_architecture" width="564" height="917" border="0" /></a></p>
<p>&nbsp;</p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">其中我们可以看到在每一个</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache object handle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">上都存在</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">4</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">个链表，它们分别是</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">lock owners</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">lock waiters</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Pin owners</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Pin waiters</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">。所以<strong style="mso-bidi-font-weight: normal;">实际上</strong></span><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache object handle</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">你可以把它看成是</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache lock</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">和</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache pin</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">所保护的</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">resource</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">。而向</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">lock owners</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">和</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">lock waiters</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">里添加</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">/</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">修改一个</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache lock</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">时是需要先持有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache lock</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">；向</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Pin owners</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">和</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Pin waiters</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">里添加</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">/</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">修改一个</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache pin</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">时是需要先持有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache pin</span></strong><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">。</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">无论是硬解析还是软解析，在扫描</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">/</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">修改</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache object handle</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">链表的时候是需要先持有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">；另外，硬解析还涉及到要在</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">shared pool</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">里分配内存，所以硬解析还会持有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child shared pool</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">。</span></strong><strong style="mso-bidi-font-weight: normal;"></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">好了，我们来分</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">6</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">步进一步细化和扩展上述结论，这</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">6</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">步考察</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">持有情况的思路均为：</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-font-kerning: 0pt;">同时开</span><span style="font-family: arial; font-size: 10pt; mso-font-kerning: 0pt;" lang="EN-US">3</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-font-kerning: 0pt;">个</span><span style="font-family: arial; font-size: 10pt; mso-font-kerning: 0pt;" lang="EN-US">session</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-font-kerning: 0pt;">，</span><span style="font-family: arial; font-size: 10pt; mso-font-kerning: 0pt;" lang="EN-US">session 1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-font-kerning: 0pt;">中先持有所有的相关子</span><span style="font-family: arial; font-size: 10pt; mso-font-kerning: 0pt;" lang="EN-US">latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-font-kerning: 0pt;">；</span><span style="font-family: arial; font-size: 10pt; mso-font-kerning: 0pt;" lang="EN-US">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-font-kerning: 0pt;">在</span><span style="font-family: arial; font-size: 10pt; mso-font-kerning: 0pt;" lang="EN-US">session 1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-font-kerning: 0pt;">持有完所有的相关子</span><span style="font-family: arial; font-size: 10pt; mso-font-kerning: 0pt;" lang="EN-US">latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-font-kerning: 0pt;">后去执行硬解析</span><span style="font-family: arial; font-size: 10pt; mso-font-kerning: 0pt;" lang="EN-US">/</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-font-kerning: 0pt;">软解析，这个时候</span><span style="font-family: arial; font-size: 10pt; mso-font-kerning: 0pt;" lang="EN-US">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-font-kerning: 0pt;">一定会</span><span style="font-family: arial; font-size: 10pt; mso-font-kerning: 0pt;" lang="EN-US">hang</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-font-kerning: 0pt;">住；同时我们在</span><span style="font-family: arial; font-size: 10pt; mso-font-kerning: 0pt;" lang="EN-US">session 3</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-font-kerning: 0pt;">中去做</span><span style="font-family: arial; font-size: 10pt; mso-font-kerning: 0pt;" lang="EN-US">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-font-kerning: 0pt;">的</span><span style="font-family: arial; font-size: 10pt; mso-font-kerning: 0pt;" lang="EN-US">process dump</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-font-kerning: 0pt;">，从</span><span style="font-family: arial; font-size: 10pt; mso-font-kerning: 0pt;" lang="EN-US">session 3</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-font-kerning: 0pt;">的</span><span style="font-family: arial; font-size: 10pt; mso-font-kerning: 0pt;" lang="EN-US">dump</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-font-kerning: 0pt;">文件中即可看到</span><span style="font-family: arial; font-size: 10pt; mso-font-kerning: 0pt;" lang="EN-US">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-font-kerning: 0pt;">中的</span><span style="font-family: arial; font-size: 10pt; mso-font-kerning: 0pt;" lang="EN-US">latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-font-kerning: 0pt;">持有与等待的情况。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">好了，我们开始。</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">第一步：先来证明硬解析会在持有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">且并不释放的情况下转而去持有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child shared pool</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></strong><strong style="mso-bidi-font-weight: normal;"></strong></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">先分别到</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">、</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">、</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 3</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">里做一下准备工作：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: blue; font-size: 10pt;" lang="EN-US">Session 1:</span></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select name,value from all_parameters where name=&#8217;_kghdsidx_count&#8217;;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">NAME<span style="mso-spacerun: yes;">                                                                             </span>VALUE</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<span style="mso-spacerun: yes;">     </span>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">_kghdsidx_count<span style="mso-spacerun: yes;">               </span><span style="mso-spacerun: yes;">   </span>1</span></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select name,level#,child#,addr,gets from v$latch_children where name like &#8216;library cache%&#8217; or name=&#8217;shared pool&#8217;;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">NAME<span style="mso-spacerun: yes;">                   </span><span style="mso-spacerun: yes;">                </span>LEVEL#<span style="mso-spacerun: yes;">     </span>CHILD# ADDR<span style="mso-spacerun: yes;">           </span>GETS</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;- &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">shared pool<span style="mso-spacerun: yes;">                 </span><span style="mso-spacerun: yes;">                     </span>7<span style="mso-spacerun: yes;">          </span>1 04E5D308<span style="mso-spacerun: yes;">     </span>783011</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">shared pool<span style="mso-spacerun: yes;">                                     </span><span style="mso-spacerun: yes;"> </span>7<span style="mso-spacerun: yes;">          </span>2 04E5D370<span style="mso-spacerun: yes;">         </span>26</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">shared pool<span style="mso-spacerun: yes;">                                     </span><span style="mso-spacerun: yes;"> </span>7<span style="mso-spacerun: yes;">  </span><span style="mso-spacerun: yes;">        </span>3 04E5D3D8<span style="mso-spacerun: yes;">         </span>26</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">shared pool<span style="mso-spacerun: yes;">                                     </span><span style="mso-spacerun: yes;"> </span>7<span style="mso-spacerun: yes;">          </span>4 04E5D440<span style="mso-spacerun: yes;">         </span>26</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">shared pool<span style="mso-spacerun: yes;">                                     </span><span style="mso-spacerun: yes;"> </span>7<span style="mso-spacerun: yes;">          </span>5 04E5D4A8<span style="mso-spacerun: yes;">         </span>26</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">shared pool<span style="mso-spacerun: yes;">                                     </span><span style="mso-spacerun: yes;"> </span>7<span style="mso-spacerun: yes;">          </span>6 04E5D510<span style="mso-spacerun: yes;">         </span>26</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">shared pool<span style="mso-spacerun: yes;">                                     </span><span style="mso-spacerun: yes;"> </span>7<span style="mso-spacerun: yes;">          </span>7 04E5D578<span style="mso-spacerun: yes;">         </span>26</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache<span style="mso-spacerun: yes;">                                    </span><span style="mso-spacerun: yes;"> </span>5<span style="mso-spacerun: yes;">          </span>1 3213DE80<span style="mso-spacerun: yes;">     </span>406403</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache<span style="mso-spacerun: yes;">                                   </span><span style="mso-spacerun: yes;">  </span>5<span style="mso-spacerun: yes;">          </span>2 3213DE18<span style="mso-spacerun: yes;">     </span>322236</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache<span style="mso-spacerun: yes;">                                   </span><span style="mso-spacerun: yes;">  </span>5<span style="mso-spacerun: yes;">          </span>3 3213DDB0<span style="mso-spacerun: yes;">      </span>96778</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache lock<span style="mso-spacerun: yes;">                              </span><span style="mso-spacerun: yes;">   </span>6<span style="mso-spacerun: yes;">          </span>1 3213E0F0<span style="mso-spacerun: yes;">     </span>107337</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache lock<span style="mso-spacerun: yes;">                              </span><span style="mso-spacerun: yes;">   </span>6<span style="mso-spacerun: yes;">          </span>2 3213E088<span style="mso-spacerun: yes;">     </span><span style="mso-spacerun: yes;"> </span>86643</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache lock<span style="mso-spacerun: yes;">                              </span><span style="mso-spacerun: yes;">  </span><span style="mso-spacerun: yes;"> </span>6<span style="mso-spacerun: yes;">          </span>3 3213E020<span style="mso-spacerun: yes;">      </span>28278</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache pin<span style="mso-spacerun: yes;">                               </span><span style="mso-spacerun: yes;">   </span>6<span style="mso-spacerun: yes;">          </span>1 3213DFB8<span style="mso-spacerun: yes;">     </span>204881</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache pin<span style="mso-spacerun: yes;">                               </span><span style="mso-spacerun: yes;">   </span>6<span style="mso-spacerun: yes;">          </span>2 3213DF50<span style="mso-spacerun: yes;">     </span>170659</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache pin<span style="mso-spacerun: yes;">                                </span><span style="mso-spacerun: yes;">  </span>6<span style="mso-spacerun: yes;">          </span>3 3213DEE8<span style="mso-spacerun: yes;">      </span>51722</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache pin allocation<span style="mso-spacerun: yes;">                     </span><span style="mso-spacerun: yes;">    </span>3<span style="mso-spacerun: yes;">          </span>1 3213E228<span style="mso-spacerun: yes;">        </span>561</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache pin allocation<span style="mso-spacerun: yes;">                      </span><span style="mso-spacerun: yes;">  </span><span style="mso-spacerun: yes;"> </span>3<span style="mso-spacerun: yes;">          </span>2 3213E1C0<span style="mso-spacerun: yes;">         </span>38</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache pin allocation<span style="mso-spacerun: yes;">                     </span><span style="mso-spacerun: yes;">    </span>3<span style="mso-spacerun: yes;">          </span>3 3213E158<span style="mso-spacerun: yes;">        </span>206</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache lock allocation<span style="mso-spacerun: yes;">                     </span><span style="mso-spacerun: yes;">   </span>3<span style="mso-spacerun: yes;">          </span>1 3213E360<span style="mso-spacerun: yes;">        </span>722</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache lock allocation<span style="mso-spacerun: yes;">                    </span><span style="mso-spacerun: yes;">    </span>3<span style="mso-spacerun: yes;">          </span>2 3213E2F8<span style="mso-spacerun: yes;">       </span><span style="mso-spacerun: yes;">  </span>46</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache lock allocation<span style="mso-spacerun: yes;">                    </span><span style="mso-spacerun: yes;">    </span>3<span style="mso-spacerun: yes;">          </span>3 3213E290<span style="mso-spacerun: yes;">        </span>229</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache hash chains<span style="mso-spacerun: yes;">                      </span><span style="mso-spacerun: yes;">    </span>9<span style="mso-spacerun: yes;">          </span>1 3213E498<span style="mso-spacerun: yes;">          </span>0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache hash chains<span style="mso-spacerun: yes;">                       </span><span style="mso-spacerun: yes;">   </span>9<span style="mso-spacerun: yes;">          </span>2 3213E430<span style="mso-spacerun: yes;">         </span><span style="mso-spacerun: yes;"> </span>0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache hash chains<span style="mso-spacerun: yes;">                       </span><span style="mso-spacerun: yes;">   </span>9<span style="mso-spacerun: yes;">          </span>3 3213E3C8<span style="mso-spacerun: yes;">          </span>0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">25 rows selected</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">从上述结果可以看到，</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">level</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">为</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">5</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">和</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">level</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">为</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">6</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child shared pool</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">level</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">为</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">7</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，所以已经具备了在不释放</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的情况下进而去持有</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child shared pool</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的条件。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select &#8216;oradebug poke 0x&#8217; || addr || &#8216; 4 0&#215;00000001&#8242; from v$latch_children where name=&#8217;shared pool&#8217; and child#=1;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8216;ORADEBUGPOKE0X&#8217;||ADDR||&#8217;40X00</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">oradebug poke 0x04E5D308 4 0&#215;00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">因为要测硬解析，这里我</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">flush</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">一下</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">shared pool</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; alter system flush shared_pool;</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">系统已更改。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: blue; font-size: 10pt;" lang="EN-US">Session 2:</span></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select sid from v$mystat where rownum=1;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">       </span>SID</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">       </span>137</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select spid from v$process where addr in (select paddr from v$session where sid=138);</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da;" lang="DA">SPID</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da;" lang="DA">&#8212;&#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da;" lang="DA">3952</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da;" lang="DA"> </span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: blue; font-size: 10pt; mso-ansi-language: da;" lang="DA">Session 3:</span></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da;" lang="DA">SQL&gt; oradebug setospid 3952</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle pid: 24, Windows thread id: 3952, image: ORACLE.EXE (SHAD)</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">准备工作已经做完，我们现在去</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">里手工持有上述</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child shared pool</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: blue; font-size: 10pt;" lang="EN-US">Session 1:</span></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; oradebug setmypid</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">已处理的语句</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; oradebug poke 0x04E5D308 4 0&#215;00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">BEFORE: [4E5D308, 4E5D30C) = 00000000</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">AFTER:<span style="mso-spacerun: yes;">  </span>[4E5D308, 4E5D30C) = 00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">然后到</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">中去随便执行一条</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sql</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，因为刚才在</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">里面</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">flush</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">了</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">shared pool</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，所以这里一定是硬解析，并且这里一定会</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">hang</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">住：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: blue; font-size: 10pt;" lang="EN-US">Session 2</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; color: blue; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></strong><strong style="mso-bidi-font-weight: normal;"></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select * from scott.emp;</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">……这里</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">hang</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">住了</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">接着我们到</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 3</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">中去对</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">做一下</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">process dump</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: blue; font-size: 10pt;" lang="EN-US">Session 3:</span></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; oradebug dump processstate 10</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">已处理的语句</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; oradebug tracefile_name</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">d:\oracle\admin\cuihua\udump\cuihua_ora_3952.trc</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">d:\oracle\admin\cuihua\udump\cuihua_ora_3952.trc</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的内容：</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">Dump file d:\oracle\admin\cuihua\udump\cuihua_ora_3952.trc</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Sat May 05 01:13:57 2012</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">ORACLE V10.2.0.1.0 - Production vsnsta=0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">vsnsql=14 vsnxtr=3</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">With the Partitioning, OLAP and Data Mining options</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Windows XP Version V5.1 Service Pack 2</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">CPU <span style="mso-spacerun: yes;">                </span>: 2 - type 586</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Process Affinity<span style="mso-spacerun: yes;">    </span>: 0x00000000</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Memory (Avail/Total): Ph:1005M/2030M, Ph+PgF:2333M/3921M, VA:1273M/2047M</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Instance name: cuihua</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Redo thread mounted by this instance: 1</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle process number: 24</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Windows thread id: 3952, image: ORACLE.EXE (SHAD)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*** 2012-05-05 01:13:57.468</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*** ACTION NAME:(Command Window - New) 2012-05-05 01:13:57.406</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*** MODULE NAME:(PL/SQL Developer) 2012-05-05 01:13:57.406</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*** SERVICE NAME:(cuihua) 2012-05-05 01:13:57.406</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*** SESSION ID:(137.75) 2012-05-05 01:13:57.406</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Received ORADEBUG command 'dump processstate 10' from process Windows thread id: 2924, image: </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">===================================================</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">PROCESS</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> STATE</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">-------------</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Process global information:</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">     </span>process: 33E4FB7C, call: 33F606A8, xact: 00000000, curses: 33F254F4, usrses: 33F254F4</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>----------------------------------------</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>SO: 33E4FB7C, type: 2, owner: 00000000, flag: INIT/-/-/0x00</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>(process) Oracle pid=24, calls cur/top: 33F606A8/33F606A8, flag: (0) -</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">            </span>int error: 0, call error: 0, sess error: 0, txn error 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>(post info) last post received: 0 0 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last post received-location: No post</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last process to post me: none</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last post sent: 0 0 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last post sent-location: No post</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last process posted by me: none</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>(latch info) wait_event=0 bits=20</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>Location from where call was made: kghupr1: Chunk Header</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>Context saved from call: 815704132</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">      </span><strong style="mso-bidi-font-weight: normal;"><span style="color: red;">waiting for 4e5d308 Child shared pool level=7 child#=1 </span></strong></span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>Location from where latch is held: kghupr1: Chunk Header</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>Context saved from call: 737738784</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>state=busy, wlstate=free</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">          </span>waiters [orapid (seconds since: put on list, posted, alive check)]:</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>10 (33, 1336151634, 33)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>20 (33, 1336151634, 33)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>24 (15, 1336151634, 15)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>waiter count=3</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">          </span>gotten 857154 times wait, failed first 316 sleeps 24</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">          </span>gotten 0 times nowait, failed: 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">      </span>on wait list for 4e5d308</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">     </span><strong style="mso-bidi-font-weight: normal;"><span style="color: red;"><span style="mso-spacerun: yes;"> </span>holding<span style="mso-spacerun: yes;">    </span>(efd=5) 3213de18 Child library cache level=5 child#=2 </span></strong></span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>Location from where latch is held: kglpndl: child: before processing: latch</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>Context saved from call: 1</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>state=busy, wlstate=free</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>Process Group: DEFAULT, pseudo proc: 33E7F368</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">   </span><span style="mso-spacerun: yes;"> </span>O/S info: user: SYSTEM, term: Y8908CUIHUA, ospid: 3952</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>OSD pid info: Windows thread id: 3952, image: ORACLE.EXE (SHAD)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">……省略显示其他内容</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">注意上述</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">trace</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">文件中有如下内容：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">waiting for 4e5d308 Child shared pool level=7 child#=1</span></strong></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">holding<span style="mso-spacerun: yes;">    </span>(efd=5) 3213de18 Child library cache level=5 child#=2</span></strong></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">所以我们已经证明了硬解析会在持有</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">且并不释放的情况下转而去持有</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child shared pool</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">第二步：我们来证明硬解析会去持有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache lock</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，但是是在释放了</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的情况下，也就是说硬解析的时候不会同时持有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">和</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache lock</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></strong></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">先在</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">里手工持有所有的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: blue; font-size: 10pt;" lang="EN-US">Session 1:</span></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; alter system flush shared_pool;</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">系统已更改。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select &#8216;oradebug poke 0x&#8217; || addr || &#8216; 4 0&#215;00000001&#8242; from v$latch_children where name=&#8217;library cache lock&#8217;;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8216;ORADEBUGPOKE0X&#8217;||ADDR||&#8217;40X00</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">oradebug poke 0x3213E0F0 4 0&#215;00000001</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">oradebug poke 0x3213E088 4 0&#215;00000001</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">oradebug poke 0x3213E020 4 0&#215;00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">SQL&gt; oradebug poke 0x3213E0F0 4 0&#215;00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">BEFORE: [3213E0F0, 3213E0F4) = 00000000</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">AFTER:<span style="mso-spacerun: yes;">  </span>[3213E0F0, 3213E0F4) = 00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">SQL&gt; oradebug poke 0x3213E088 4 0x00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">BEFORE: [3213E088, 3213E08C) = 00000000</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">AFTER:<span style="mso-spacerun: yes;">  </span>[3213E088, 3213E08C) = 00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">SQL&gt; oradebug poke 0x3213E020 4 0x00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">BEFORE: [3213E020, 3213E024) = 00000000</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">AFTER:<span style="mso-spacerun: yes;">  </span>[3213E020, 3213E024) = 00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">然后到</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">中去随便执行一条</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sql</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，因为刚才在</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">里面</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">flush</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">了</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">shared pool</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，所以这里一定是硬解析，并且这里一定会</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">hang</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">住：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: blue; font-size: 10pt;" lang="EN-US">Session 2:</span></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select * from scott.emp;</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">……这里</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">hang</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">住了</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">接着我们到</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 3</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">中去对</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">做一下</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">process dump</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: blue; font-size: 10pt;" lang="EN-US">Session 3:</span></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; oradebug dump processstate 10</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">已处理的语句</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; oradebug tracefile_name</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">d:\oracle\admin\cuihua\udump\cuihua_ora_3140.trc</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">d:\oracle\admin\cuihua\udump\cuihua_ora_3140.trc</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的内容：</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">With the Partitioning, OLAP and Data Mining options</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Windows XP Version V5.1 Service Pack 2</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">CPU<span style="mso-spacerun: yes;">                 </span>: 2 - type 586</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Process Affinity<span style="mso-spacerun: yes;">    </span>: 0x00000000</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Memory (Avail/Total): Ph:1142M/2030M, Ph+PgF:2355M/3921M, VA:1345M/2047M</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Instance name: cuihua</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Redo thread mounted by this instance: 0 &lt;none&gt;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle process number: 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Windows thread id: 3140, image: ORACLE.EXE (SHAD)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">KCCDEBUG_LEVEL = 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Dynamic strand is set to TRUE</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Running with 2 shared and 18 private strand(s). </span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">Zero-copy redo is FALSE</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">Dump file d:\oracle\admin\cuihua\udump\cuihua_ora_3140.trc</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Sat May 05 01:26:29 2012</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">ORACLE V10.2.0.1.0 - Production vsnsta=0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">vsnsql=14 vsnxtr=3</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">With the Partitioning, OLAP and Data Mining options</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Windows XP Version V5.1 Service Pack 2</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">CPU<span style="mso-spacerun: yes;">                 </span>: 2 - type 586</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Process Affinity<span style="mso-spacerun: yes;">    </span>: 0x00000000</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Memory (Avail/Total): Ph:969M/2030M, Ph+PgF:2332M/3921M, VA:1267M/2047M</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Instance name: cuihua</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Redo thread mounted by this instance: 1</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle process number: 31</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Windows thread id: 3140, image: ORACLE.EXE (SHAD)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*** 2012-05-05 01:26:29.609</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*** ACTION NAME:(Command Window - New) 2012-05-05 01:26:29.562</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*** MODULE NAME:(PL/SQL Developer) 2012-05-05 01:26:29.562</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*** SERVICE NAME:(cuihua) 2012-05-05 01:26:29.562</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*** SESSION ID:(153.27) 2012-05-05 01:26:29.562</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Received ORADEBUG command 'dump processstate 10' from process Windows thread id: 2844, image: </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">===================================================</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">PROCESS</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> STATE</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">-------------</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Process global information:</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">     </span>process: 33E5250C, call: 31A8ACBC, xact: 00000000, curses: 33F38174, usrses: 33F38174</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>----------------------------------------</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE"><span style="mso-spacerun: yes;">  </span>SO: 33E5250C, type: 2, owner: 00000000, flag: INIT/-/-/0x00</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE"><span style="mso-spacerun: yes;">  </span></span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">(process) Oracle pid=31, calls cur/top: 31A8ACBC/31A8ACBC, flag: (0) -</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">            </span>int error: 0, call error: 0, sess error: 0, txn error 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>(post info) last post received: 0 0 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last post received-location: No post</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last process to post me: none</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last post sent: 0 0 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last post sent-location: No post</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last process posted by me: none</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>(latch info) wait_event=0 bits=0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>Location from where call was made: kgllkdl: child: cleanup: latch</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>Context saved from call: 1</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">      </span><strong style="mso-bidi-font-weight: normal;"><span style="color: red;">waiting for 3213e088 Child library cache lock level=6 child#=2 </span></strong></span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>Location from where latch is held: kgllkdl: child: cleanup: latch</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>Context saved from call: 1</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>state=busy, wlstate=free</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">          </span>waiters [orapid (seconds since: put on list, posted, alive check)]:</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>10 (15, 1336152387, 15)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>31 (3, 1336152387, 3)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>waiter count=2</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">          </span>gotten 135516 times wait, failed first 6 sleeps 5</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">          </span>gotten 0 times nowait, failed: 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">      </span>on wait list for 3213e088</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>Process Group: DEFAULT, pseudo proc: 33E7F368</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>O/S info: user: SYSTEM, term: Y8908CUIHUA, ospid: 3140</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>OSD pid info: Windows thread id: 3140, image: ORACLE.EXE (SHAD)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">……省略显示其他内容</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">注意上述</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">trace</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">文件中有如下内容：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">waiting for 3213e088 Child library cache lock level=6 child#=2</span></strong></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; color: red; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">但注意这里没有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: red; font-size: 10pt;" lang="EN-US">holding Child library cache</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; color: red; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">！</span></strong><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">所以我们已经证明了硬解析会持有</span><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache lock</span></strong><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，但是是在释放了</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的情况下，也就是说硬解析的时候不会同时持有</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">和</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">第三步：我们来证明硬解析会去持有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache pin</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，但是是在释放了</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的情况下，也就是说硬解析的时候不会同时持有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">和</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache pin</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></strong><strong style="mso-bidi-font-weight: normal;"></strong></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">证明步骤和思路与第二步一模一样，这里不再赘述，我们直接来看相关的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">process dump</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">trace</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">文件：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">d:\oracle\admin\cuihua\udump\cuihua_ora_2444.trc</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的内容：</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Dump file d:\oracle\admin\cuihua\udump\cuihua_ora_2444.trc</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Sat May 05 01:34:27 2012</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">ORACLE V10.2.0.1.0 &#8211; Production vsnsta=0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">vsnsql=14 vsnxtr=3</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 &#8211; Production</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">With the Partitioning, OLAP and Data Mining options</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Windows XP Version V5.1 Service Pack 2</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">CPU<span style="mso-spacerun: yes;">                 </span>: 2 &#8211; type 586</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Process Affinity<span style="mso-spacerun: yes;">    </span>: 0&#215;00000000</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Memory (Avail/Total): Ph:963M/2030M, Ph+PgF:2334M/3921M, VA:1269M/2047M</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Instance name: cuihua</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Redo thread mounted by this instance: 1</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle process number: 30</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Windows thread id: 2444, image: ORACLE.EXE (SHAD)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*** 2012-05-05 01:34:27.609</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*** ACTION NAME:(Command Window &#8211; New) 2012-05-05 01:34:27.546</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*** MODULE NAME:(PL/SQL Developer) 2012-05-05 01:34:27.546</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*** SERVICE NAME:(cuihua) 2012-05-05 01:34:27.546</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*** SESSION ID:(130.15) 2012-05-05 01:34:27.546</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Received ORADEBUG command &#8216;dump processstate 10&#8242; from process Windows thread id: 800, image: </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">===================================================</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">PROCESS</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> STATE</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Process global information:</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">     </span>process: 33E51F1C, call: 317DD38C, xact: 00000000, curses: 33F1D17C, usrses: 33F1D17C</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>SO: 33E51F1C, type: 2, owner: 00000000, flag: INIT/-/-/0&#215;00</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>(process) Oracle pid=30, calls cur/top: 317DD38C/317DD38C, flag: (0) -</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">            </span>int error: 0, call error: 0, sess error: 0, txn error 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>(post info) last post received: 0 0 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last post received-location: No post</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last process to post me: none</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last post sent: 0 0 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last post sent-location: No post</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last process posted by me: none</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>(latch info) wait_event=0 bits=0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>Location from where call was made: kglpnal: child: alloc space: latch</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>Context saved from call: 1</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">      </span><strong style="mso-bidi-font-weight: normal;"><span style="color: red;">waiting for 3213df50 Child library cache pin level=6 child#=2 </span></strong></span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>Location from where latch is held: kglpndl: child</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>Context saved from call: 1</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>state=busy, wlstate=free</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">          </span>waiters [orapid (seconds since: put on list, posted, alive check)]:</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>10 (49, 1336152864, 49)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>30 (24, 1336152864, 24)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>waiter count=2</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">          </span>gotten 348654 times wait, failed first 2 sleeps 1</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">          </span>gotten 0 times nowait, failed: 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">      </span>on wait list for 3213df50</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>Process Group: DEFAULT, pseudo proc: 33E7F368</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>O/S info: user: SYSTEM, term: Y8908CUIHUA, ospid: 2444</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>OSD pid info: Windows thread id: 2444, image: ORACLE.EXE (SHAD)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">……省略显示其他内容</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">注意上述</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">trace</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">文件中有如下内容：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">waiting for 3213df50 Child library cache pin level=6 child#=2</span></strong></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; color: red; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">但注意这里没有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: red; font-size: 10pt;" lang="EN-US">holding Child library cache</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; color: red; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">！</span></strong><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">所以我们已经证明了硬解析会持有</span><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache pin</span></strong><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，但是是在释放了</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的情况下，也就是说硬解析的时候不会同时持有</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">和</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache pin</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">第四步：我们来证明</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">软解析也会去持有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，所以过度的</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">软解析实际上也会导致</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的争用：</span></strong><strong style="mso-bidi-font-weight: normal;"></strong></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">先到</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">、</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">和</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 3</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">中去做一下准备工作：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: blue; font-size: 10pt;" lang="EN-US">Session 1:</span></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select &#8216;oradebug poke 0x&#8217; || addr || &#8216; 4 0&#215;00000001&#8242; from v$latch_children where name=&#8217;library cache&#8217;;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8216;ORADEBUGPOKE0X&#8217;||ADDR||&#8217;40X00</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">oradebug poke 0x3213DE80 4 0&#215;00000001</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">oradebug poke 0x3213DE18 4 0&#215;00000001</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">oradebug poke 0x3213DDB0 4 0&#215;00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: blue; font-size: 10pt;" lang="EN-US">Session 2:</span></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; show parameter session_cache;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">NAME<span style="mso-spacerun: yes;">                         </span><span style="mso-spacerun: yes;">        </span>TYPE<span style="mso-spacerun: yes;">        </span>VALUE</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session_cached_cursors<span style="mso-spacerun: yes;">               </span>integer<span style="mso-spacerun: yes;">     </span>20</span></p>
<p class="MsoNormal"><strong><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">这里</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session_cached_cursors</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的值大于</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">0</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，所以这里执行同样的sql三次以上的时候才会是软软解析，如果同样的sql的执行次数大于一次但不超过三次，则是软解析。</span></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select * from scott.emp;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">EMPNO ENAME<span style="mso-spacerun: yes;">      </span>JOB<span style="mso-spacerun: yes;">         </span>MGR HIREDATE<span style="mso-spacerun: yes;">          </span>SAL<span style="mso-spacerun: yes;">      </span>COMM DEPTNO</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8211; &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212; &#8212;&#8211; &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212; &#8212;&#8212;&#8212; &#8212;&#8212;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;"> </span>7981 CUIHUA<span style="mso-spacerun: yes;">        </span><span style="mso-spacerun: yes;">        </span>7981<span style="mso-spacerun: yes;">                                 </span></span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;"> </span>7369 SMITH<span style="mso-spacerun: yes;">      </span>CLERK<span style="mso-spacerun: yes;">      </span>7902 1980-12-17<span style="mso-spacerun: yes;">     </span>800.00<span style="mso-spacerun: yes;">               </span>20</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;"> </span>7499 ALLEN<span style="mso-spacerun: yes;">      </span>SALESMAN<span style="mso-spacerun: yes;">   </span>7698 1981-2-20<span style="mso-spacerun: yes;">     </span>1600.00<span style="mso-spacerun: yes;">    </span>300.00<span style="mso-spacerun: yes;">     </span>30</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;"> </span>7521 WARD<span style="mso-spacerun: yes;">       </span>SALESMAN<span style="mso-spacerun: yes;">   </span>7698 1981-2-22<span style="mso-spacerun: yes;">     </span>1250.00<span style="mso-spacerun: yes;">    </span>500.00<span style="mso-spacerun: yes;">  </span><span style="mso-spacerun: yes;">   </span>30</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;"> </span>7566 JONES<span style="mso-spacerun: yes;">      </span>MANAGER<span style="mso-spacerun: yes;">    </span>7839 1981-4-2<span style="mso-spacerun: yes;">      </span>2975.00<span style="mso-spacerun: yes;">               </span>20</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;"> </span>7654 MARTIN<span style="mso-spacerun: yes;">     </span>SALESMAN<span style="mso-spacerun: yes;">   </span>7698 1981-9-28<span style="mso-spacerun: yes;">     </span>1250.00<span style="mso-spacerun: yes;">   </span>1400.00<span style="mso-spacerun: yes;">     </span>30</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;"> </span>7698 BLAKE<span style="mso-spacerun: yes;">      </span>MANAGER<span style="mso-spacerun: yes;">    </span>7839 1981-5-1<span style="mso-spacerun: yes;">      </span>2850.00<span style="mso-spacerun: yes;">               </span>30</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;"> </span>7782 CLARK<span style="mso-spacerun: yes;">      </span>MANAGER<span style="mso-spacerun: yes;">    </span>7839 1981-6-9<span style="mso-spacerun: yes;">      </span>2450.00<span style="mso-spacerun: yes;">               </span>10</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;"> </span>7788 SCOTT<span style="mso-spacerun: yes;">      </span>ANALYST<span style="mso-spacerun: yes;">    </span>7566 1987-4-19<span style="mso-spacerun: yes;">     </span>3000.00<span style="mso-spacerun: yes;">               </span>20</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;"> </span>7839 KING<span style="mso-spacerun: yes;">       </span>PRESIDENT<span style="mso-spacerun: yes;">       </span>1981-11-17<span style="mso-spacerun: yes;">    </span>5000.00<span style="mso-spacerun: yes;">               </span>10</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;"> </span>7844 TURNER<span style="mso-spacerun: yes;">     </span>SALESMAN<span style="mso-spacerun: yes;">   </span>7698 1981-9-8<span style="mso-spacerun: yes;">      </span>1500.00<span style="mso-spacerun: yes;">      </span>0.00<span style="mso-spacerun: yes;">     </span>30</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;"> </span>7876 ADAMS<span style="mso-spacerun: yes;">      </span>CLERK<span style="mso-spacerun: yes;">      </span>7788 1987-5-23<span style="mso-spacerun: yes;">     </span>1100.00<span style="mso-spacerun: yes;">               </span>20</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;"> </span>7800 JAME4<span style="mso-spacerun: yes;">      </span>CLERK<span style="mso-spacerun: yes;">      </span>7698 1981-12-3<span style="mso-spacerun: yes;">      </span>950.00<span style="mso-spacerun: yes;">               </span>30</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">13 rows selected</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">注意这里子</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">cursor</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">和执行次数均为</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select sql_text, SQL_ID, VERSION_COUNT,executions from v$sqlarea where sql_text like &#8216;select * from scott.emp%&#8217;;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL_TEXT<span style="mso-spacerun: yes;">                                                                    </span>SQL_ID<span style="mso-spacerun: yes;">        </span>VERSION_COUNT EXECUTIONS</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">select * from scott.emp<span style="mso-spacerun: yes;">                                                          </span>dzk32w36udhc5<span style="mso-spacerun: yes;">             </span><strong style="mso-bidi-font-weight: normal;">1<span style="mso-spacerun: yes;">          </span>1</strong></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select PLAN_HASH_VALUE, CHILD_NUMBER from v$sql where sql_id=&#8217;dzk32w36udhc5&#8242;;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">PLAN_HASH_VALUE CHILD_NUMBER</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">     </span>3956160932<span style="mso-spacerun: yes;">            </span>0</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select sid from v$mystat where rownum=1;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">       </span>SID</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">       </span>134</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select spid from v$process where addr in (select paddr from v$session where sid=134);</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da;" lang="DA">SPID</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da;" lang="DA">&#8212;&#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da;" lang="DA">2740</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da;" lang="DA"> </span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: blue; font-size: 10pt; mso-ansi-language: da;" lang="DA">Session 3:</span></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da;" lang="DA">SQL&gt; oradebug setospid 2740</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle pid: 30, Windows thread id: 2740, image: ORACLE.EXE (SHAD)</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">接着我们回到</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，去手工持有所有的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: blue; font-size: 10pt;" lang="EN-US">Session 1:</span></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; oradebug setmypid</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">已处理的语句</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; oradebug poke 0x3213DE80 4 0&#215;00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">BEFORE: [3213DE80, 3213DE84) = 00000000</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">AFTER:<span style="mso-spacerun: yes;">  </span>[3213DE80, 3213DE84) = 00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; oradebug poke 0x3213DE18 4 0x00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da;" lang="DA">BEFORE: [3213DE18, 3213DE1C) = 00000000</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da;" lang="DA">AFTER:<span style="mso-spacerun: yes;">  </span>[3213DE18, 3213DE1C) = 00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; oradebug poke 0x3213DDB0 4 0x00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">BEFORE: [3213DDB0, 3213DDB4) = 00000000</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">AFTER:<span style="mso-spacerun: yes;">  </span>[3213DDB0, 3213DDB4) = 00000001</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">接着到</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">去执行一下我们刚才已经在</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">中执行过的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sql</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，这里也会</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">hang</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">住：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: blue; font-size: 10pt;" lang="EN-US">Session 2:</span></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select * from scott.emp;</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">……这里</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">hang</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">住了</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">接着我们到</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 3</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">中去对</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">做一下</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">process dump</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: blue; font-size: 10pt;" lang="EN-US">Session 3:</span></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; oradebug dump processstate 10</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">已处理的语句</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; oradebug tracefile_name</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">d:\oracle\admin\cuihua\udump\cuihua_ora_2740.trc</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">d:\oracle\admin\cuihua\udump\cuihua_ora_2740.trc</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的内容：</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Dump file d:\oracle\admin\cuihua\udump\cuihua_ora_2740.trc</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Thu Jan 28 09:08:16 2010</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">ORACLE V10.2.0.1.0 - Production vsnsta=0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">vsnsql=14 vsnxtr=3</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">With the Partitioning, OLAP and Data Mining options</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Windows XP Version V5.1 Service Pack 2</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">CPU<span style="mso-spacerun: yes;">                 </span>: 2 - type 586</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Process Affinity<span style="mso-spacerun: yes;">    </span>: 0x00000000</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Memory (Avail/Total): Ph:1387M/2030M, Ph+PgF:2882M/3921M, VA:1272M/2047M</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Instance name: cuihua</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Redo thread mounted by this instance: 1</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle process number: 24</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Windows thread id: 2740, image: ORACLE.EXE (SHAD)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*** SERVICE NAME:(cuihua) 2010-01-28 09:08:16.375</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*** SESSION ID:(140.4) 2010-01-28 09:08:16.375</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Memory Notification: Library Cache Object loaded into SGA</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Heap size 2210K exceeds notification threshold (2048K)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">LIBRARY OBJECT HANDLE: handle=33872c70 mutex=33872D24(0)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">name=XDB.XDbD/PLZ01TcHgNAgAIIegtw== </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">hash=e0f82b0c545a707da230a62675d34c80 timestamp=08-30-2005 14:28:09</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">namespace=XDBS flags=KGHP/TIM/SML/[02000000]</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">kkkk-dddd-llll=0000-0000-0000 lock=S pin=S latch#=2 hpc=0002 hlc=0002</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">lwt=33872CCC[33872CCC,33872CCC] ltm=33872CD4[33872CD4,33872CD4]</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">pwt=33872CB0[33872CB0,33872CB0] ptm=33872CB8[33872CB8,33872CB8]</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">ref=33872CEC[33872CEC,33872CEC] lnd=33872CF8[33872CF8,33872CF8]</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL"><span style="mso-spacerun: yes;">  </span></span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">LIBRARY OBJECT: object=303c0ba0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>type=XDBS flags=EXS/LOC[0005] pflags=[0000] status=VALD load=X</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>DATA BLOCKS:</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>data#<span style="mso-spacerun: yes;">     </span>heap<span style="mso-spacerun: yes;">  </span>pointer<span style="mso-spacerun: yes;">    </span>status pins change whr alloc(K)<span style="mso-spacerun: yes;">  </span>size(K)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>&#8212;&#8211; &#8212;&#8212;&#8211; &#8212;&#8212;&#8211; &#8212;&#8212;&#8212; &#8212;- &#8212;&#8212; &#8212; &#8212;&#8212;&#8211; &#8212;&#8212;&#8211;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">      </span>0 33872c00 303c0c5c I/P/A/-/-<span style="mso-spacerun: yes;">    </span>0 NONE<span style="mso-spacerun: yes;">   </span>00<span style="mso-spacerun: yes;">      </span>0.34<span style="mso-spacerun: yes;">     </span>0.00</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">      </span>1 303c0c98 3038daa8 I/P/A/-/-<span style="mso-spacerun: yes;">    </span>1 NONE<span style="mso-spacerun: yes;">   </span>00<span style="mso-spacerun: yes;">   </span>2210.98<span style="mso-spacerun: yes;">  </span>2224.10</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">Dump file d:\oracle\admin\cuihua\udump\cuihua_ora_2740.trc</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Sat May 05 08:48:42 2012</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">ORACLE V10.2.0.1.0 &#8211; Production vsnsta=0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">vsnsql=14 vsnxtr=3</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 &#8211; Production</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">With the Partitioning, OLAP and Data Mining options</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Windows XP Version V5.1 Service Pack 2</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">CPU<span style="mso-spacerun: yes;">                 </span>: 2 &#8211; type 586</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Process Affinity<span style="mso-spacerun: yes;">    </span>: 0&#215;00000000</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Memory (Avail/Total): Ph:1290M/2030M, Ph+PgF:2663M/3921M, VA:1268M/2047M</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Instance name: cuihua</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Redo thread mounted by this instance: 1</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle process number: 30</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Windows thread id: 2740, image: ORACLE.EXE (SHAD)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*** 2012-05-05 08:48:42.781</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*** ACTION NAME:(Command Window &#8211; New) 2012-05-05 08:48:42.687</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*** MODULE NAME:(PL/SQL Developer) 2012-05-05 08:48:42.687</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*** SERVICE NAME:(cuihua) 2012-05-05 08:48:42.687</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*** SESSION ID:(134.7) 2012-05-05 08:48:42.687</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Received ORADEBUG command &#8216;dump processstate 10&#8242; from process Windows thread id: 400, image: </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">===================================================</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">PROCESS</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> STATE</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Process global information:</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">     </span>process: 33E51F1C, call: 317C80A0, xact: 00000000, curses: 33F21C9C, usrses: 33F21C9C</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>SO: 33E51F1C, type: 2, owner: 00000000, flag: INIT/-/-/0&#215;00</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>(process) Oracle pid=30, calls cur/top: 317C80A0/317C80A0, flag: (0) -</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">            </span>int error: 0, call error: 0, sess error: 0, txn error 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>(post info) last post received: 0 0 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last post received-location: No post</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last process to post me: none</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last post sent: 0 0 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last post sent-location: No post</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last process posted by me: none</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>(latch info) wait_event=0 bits=0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>Location from where call was made: kglpin: child: heap processing: latch</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>Context saved from call: 1</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">      </span><strong style="mso-bidi-font-weight: normal;"><span style="color: red;">waiting for 3213de18 Child library cache level=5 child#=2 </span></strong></span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>Location from where latch is held: kglpndl: child: after processing: latch</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>Context saved from call: 1</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>state=busy, wlstate=free</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">          </span>waiters [orapid (seconds since: put on list, posted, alive check)]:</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>30 (39, 1336178921, 39)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>waiter count=1</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">          </span>gotten 179887 times wait, failed first 15 sleeps 1</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">          </span>gotten 206 times nowait, failed: 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">      </span>on wait list for 3213de18</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>Process Group: DEFAULT, pseudo proc: 33E7F368</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>O/S info: user: SYSTEM, term: Y8908CUIHUA, ospid: 2740</span></p>
<p class="MsoNormal" style="text-indent: 21pt; background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">OSD pid info: Windows thread id: 2740, image: ORACLE.EXE (SHAD)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">……省略显示其他内容</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">注意上述</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">trace</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">文件中有如下内容：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">waiting for 3213de18 Child library cache level=5 child#=2</span></strong></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">所以我们已经证明了</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">软解析也会去持有</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">（这个其实很正常，因为</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">软解析还是要扫描</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache object handle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">链表的嘛），即过度的</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">软解析实际上也会导致</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的争用。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">手工释放上述</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">后回到</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，刚才</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">hang</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">住的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sql</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">已恢复正常</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">:</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select * from scott.emp;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">EMPNO ENAME<span style="mso-spacerun: yes;">      </span>JOB<span style="mso-spacerun: yes;">         </span>MGR HIREDATE<span style="mso-spacerun: yes;">          </span>SAL<span style="mso-spacerun: yes;">      </span>COMM DEPTNO</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8211; &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212; &#8212;&#8211; &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212; &#8212;&#8212;&#8212; &#8212;&#8212;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;"> </span>7981 CUIHUA<span style="mso-spacerun: yes;">                </span>7981<span style="mso-spacerun: yes;">                     </span><span style="mso-spacerun: yes;">            </span></span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;"> </span>7369 SMITH<span style="mso-spacerun: yes;">      </span>CLERK<span style="mso-spacerun: yes;">      </span>7902 1980-12-17<span style="mso-spacerun: yes;">     </span>800.00<span style="mso-spacerun: yes;">               </span>20</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;"> </span>7499 ALLEN<span style="mso-spacerun: yes;">      </span>SALESMAN<span style="mso-spacerun: yes;">   </span>7698 1981-2-20<span style="mso-spacerun: yes;">     </span>1600.00<span style="mso-spacerun: yes;">    </span>300.00<span style="mso-spacerun: yes;">     </span>30</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;"> </span>7521 WARD<span style="mso-spacerun: yes;">       </span>SALESMAN<span style="mso-spacerun: yes;">   </span>7698 1981-2-22<span style="mso-spacerun: yes;">     </span>1250.00<span style="mso-spacerun: yes;">    </span>500.00<span style="mso-spacerun: yes;">     </span>30</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;"> </span>7566 JONES<span style="mso-spacerun: yes;">      </span>MANAGER<span style="mso-spacerun: yes;">   </span><span style="mso-spacerun: yes;"> </span>7839 1981-4-2<span style="mso-spacerun: yes;">      </span>2975.00<span style="mso-spacerun: yes;">               </span>20</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;"> </span>7654 MARTIN<span style="mso-spacerun: yes;">     </span>SALESMAN<span style="mso-spacerun: yes;">   </span>7698 1981-9-28<span style="mso-spacerun: yes;">     </span>1250.00<span style="mso-spacerun: yes;">   </span>1400.00<span style="mso-spacerun: yes;">     </span>30</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;"> </span>7698 BLAKE<span style="mso-spacerun: yes;">      </span>MANAGER<span style="mso-spacerun: yes;">    </span>7839 1981-5-1<span style="mso-spacerun: yes;">      </span>2850.00<span style="mso-spacerun: yes;">               </span>30</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;"> </span>7782 CLARK<span style="mso-spacerun: yes;">      </span>MANAGER<span style="mso-spacerun: yes;">    </span>7839 1981-6-9<span style="mso-spacerun: yes;">      </span>2450.00<span style="mso-spacerun: yes;">             </span><span style="mso-spacerun: yes;">  </span>10</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;"> </span>7788 SCOTT<span style="mso-spacerun: yes;">      </span>ANALYST<span style="mso-spacerun: yes;">    </span>7566 1987-4-19<span style="mso-spacerun: yes;">     </span>3000.00<span style="mso-spacerun: yes;">               </span>20</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;"> </span>7839 KING<span style="mso-spacerun: yes;">       </span>PRESIDENT<span style="mso-spacerun: yes;">       </span>1981-11-17<span style="mso-spacerun: yes;">    </span>5000.00<span style="mso-spacerun: yes;">               </span>10</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;"> </span>7844 TURNER<span style="mso-spacerun: yes;">     </span>SALESMAN<span style="mso-spacerun: yes;">   </span>7698 1981-9-8<span style="mso-spacerun: yes;">      </span>1500.00<span style="mso-spacerun: yes;">      </span>0.00<span style="mso-spacerun: yes;">     </span>30</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;"> </span>7876 ADAMS<span style="mso-spacerun: yes;">      </span>CLERK<span style="mso-spacerun: yes;">      </span>7788 1987-5-23<span style="mso-spacerun: yes;">     </span>1100.00<span style="mso-spacerun: yes;">               </span>20</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;"> </span>7800 JAME4<span style="mso-spacerun: yes;">      </span>CLERK<span style="mso-spacerun: yes;">      </span>7698 1981-12-3<span style="mso-spacerun: yes;">      </span>950.00<span style="mso-spacerun: yes;">               </span>30</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">13 rows selected</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">从如下结果可以看到，子</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">cursor</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的数量还是</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，执行次数变成了</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，即刚才第二次执行的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sql</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">毫无疑问是软解析：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select sql_text, SQL_ID, VERSION_COUNT,executions from v$sqlarea where sql_text like &#8216;select * from scott.emp%&#8217;;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL_TEXT<span style="mso-spacerun: yes;">                                                                         </span>SQL_ID<span style="mso-spacerun: yes;">        </span>VERSION_COUNT EXECUTIONS</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">select * from scott.emp<span style="mso-spacerun: yes;">                                                          </span>dzk32w36udhc5<span style="mso-spacerun: yes;">   </span><span style="mso-spacerun: yes;">          </span><strong style="mso-bidi-font-weight: normal;">1<span style="mso-spacerun: yes;">          </span>2</strong></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">第五步：我们来证明</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">软解析还是会去持有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache lock</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，但是是在释放了</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的情况下，也就是说</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">软解析会去持有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache lock</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，但不会同时持有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">和</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache lock</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></strong><strong style="mso-bidi-font-weight: normal;"></strong></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">证明步骤和思路与第二步一模一样，这里不再赘述，我们直接来看相关的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">process dump</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">trace</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">文件：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">d:\oracle\admin\cuihua\udump\cuihua_ora_2988.trc</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的内容：</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Dump file d:\oracle\admin\cuihua\udump\cuihua_ora_2988.trc</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Sat May 05 01:50:36 2012</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">ORACLE V10.2.0.1.0 &#8211; Production vsnsta=0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">vsnsql=14 vsnxtr=3</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 &#8211; Production</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">With the Partitioning, OLAP and Data Mining options</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Windows XP Version V5.1 Service Pack 2</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">CPU<span style="mso-spacerun: yes;">                 </span>: 2 &#8211; type 586</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Process Affinity<span style="mso-spacerun: yes;">    </span>: 0&#215;00000000</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Memory (Avail/Total): Ph:1031M/2030M, Ph+PgF:2330M/3921M, VA:1269M/2047M</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Instance name: cuihua</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Redo thread mounted by this instance: 1</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle process number: 24</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Windows thread id: 2988, image: ORACLE.EXE (SHAD)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*** 2012-05-05 01:50:36.531</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*** ACTION NAME:(Command Window &#8211; New) 2012-05-05 01:50:36.468</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*** MODULE NAME:(PL/SQL Developer) 2012-05-05 01:50:36.468</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*** SERVICE NAME:(cuihua) 2012-05-05 01:50:36.468</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*** SESSION ID:(132.36) 2012-05-05 01:50:36.468</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Received ORADEBUG command &#8216;dump processstate 10&#8242; from process Windows thread id: 972, image: </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">===================================================</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">PROCESS</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> STATE</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Process global information:</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">     </span>process: 33E4FB7C, call: 33F61154, xact: 00000000, curses: 33F1F70C, usrses: 33F1F70C</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>SO: 33E4FB7C, type: 2, owner: 00000000, flag: INIT/-/-/0&#215;00</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>(process) Oracle pid=24, calls cur/top: 33F61154/33F61154, flag: (0) -</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">            </span>int error: 0, call error: 0, sess error: 0, txn error 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>(post info) last post received: 0 0 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last post received-location: No post</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last process to post me: none</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last post sent: 0 0 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last post sent-location: No post</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>last process posted by me: none</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>(latch info) wait_event=0 bits=0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>Location from where call was made: kgllkdl: child: cleanup: latch</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>Context saved from call: 2</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">      </span><strong style="mso-bidi-font-weight: normal;"><span style="color: red;">waiting for 3213e0f0 Child library cache lock level=6 child#=1 </span></strong></span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>Location from where latch is held: kgllkdl: child: cleanup: latch</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>Context saved from call: 2</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">        </span>state=busy, wlstate=free</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">          </span>waiters [orapid (seconds since: put on list, posted, alive check)]:</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>25 (123, 1336153833, 123)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>27 (123, 1336153833, 123)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>11 (120, 1336153833, 120)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>20 (114, 1336153833, 114)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>19 (111, 1336153833, 111)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>24 (39, 1336153833, 39)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">           </span>waiter count=6</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">          </span>gotten 261770 times wait, failed first 74 sleeps 22</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">          </span>gotten 0 times nowait, failed: 0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">      </span>on wait list for 3213e0f0</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>Process Group: DEFAULT, pseudo proc: 33E7F368</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>O/S info: user: SYSTEM, term: Y8908CUIHUA, ospid: 2988</span></p>
<p class="MsoNormal" style="text-indent: 21pt; background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">OSD pid info: Windows thread id: 2988, image: ORACLE.EXE (SHAD)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">……省略显示其他内容</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">注意上述</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">trace</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">文件中有如下内容：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">waiting for 3213e0f0 Child library cache lock level=6 child#=1</span></strong></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; color: red; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">但注意这里没有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: red; font-size: 10pt;" lang="EN-US">holding Child library cache</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; color: red; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">！</span></strong><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">所以我们已经证明了</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">软解析依然会持有</span><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache lock</span></strong><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，但是是在释放了</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的情况下，也就是说</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">软解析会去持有</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，但不会同时持有</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">和</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache lock</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">第六步：我们来证明</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">软解析还是会去持有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache pin</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，但是是在释放了</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的情况下，也就是说</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">软解析会去持有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache pin</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，但不会同时持有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">和</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache pin</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></strong><strong style="mso-bidi-font-weight: normal;"></strong></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">证明步骤和思路与第五步一模一样，这里不再赘述。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">结合我文章开头提到的那三篇文章（尤其是</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><a href="http://www.laoxiong.net/"><span style="font-family: 宋体; mso-ascii-font-family: arial; mso-hansi-font-family: arial;" lang="EN-US"><span lang="EN-US">大<span lang="EN-US">熊</span></span></span></a></span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的那篇</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><a href="http://www.laoxiong.net/shared-pool-latch-and-library-cache-latch.html"><span style="font-family: 宋体; mso-ascii-font-family: arial; mso-hansi-font-family: arial;" lang="EN-US"><span lang="EN-US">文<span lang="EN-US">章</span></span></span></a></span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">）和上面的六步证明过程，我们得出如下关于硬解析和软解析时</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">持有情况的结论（这个结论是近似的，并没有包括所有的情况）：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">1</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">、</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">在硬解析的时候，会先去持有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">以扫描</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache object handle</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">链表，接着会释放</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">（因为找不到相关的</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache object handle</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">），接下来会再次持有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">（因为要修改</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">library cache object handle</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">链表），然后在不释放</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的情况下进而去持有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child shared pool</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">以分配内存，接着释放</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child shared pool</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">（因为已经分配完了），接着再释放</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">；<strong>然后因为要以null模式获得library cache lock，所以要先持有Child library cache lock；接着要把相关sql的执行计划load到对应的子cursor的library cache object handle中，即要以exclusive模式获得library cache pin，所以要先持有Child library cache pin；</strong></span></strong></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">2</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">、</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">在软解析</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的时候和硬解析类似，只不过不需要持有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child shared pool</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">并且持有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的时间会更短。</span></strong><strong style="mso-bidi-font-weight: normal;"></strong></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">最后我们来说一下硬解析和软解析</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">在</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">争用情况下的本质区别：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">1</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">、软解析不会导致</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child shared pool</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的争用；</span></strong><strong style="mso-bidi-font-weight: normal;"></strong></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">2</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">、硬解析跟软解析比会导致更为剧烈的</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的争用，这个当然是因为硬解析在不释放</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child library cache</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的情况下进而会去持有</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Child shared pool</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">。</span></strong><strong style="mso-bidi-font-weight: normal;"></strong></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dbsnake.net/hard-and-soft-parse-latch-analysis.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>解决RAC环境下ORA-12545连接错误一例</title>
		<link>http://www.dbsnake.net/fix-rac-ora-12545.html</link>
		<comments>http://www.dbsnake.net/fix-rac-ora-12545.html#comments</comments>
		<pubDate>Thu, 03 May 2012 07:11:22 +0000</pubDate>
		<dc:creator>Cui Hua</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.dbsnake.net/?p=69</guid>
		<description><![CDATA[11gR2 RAC两节点的环境，我本机用SCAN VIP连的时候发现连不上了，不断尝试多次，始终报同样的错误ORA-12545： C:\Documents and Settings\cuihua&#62;sqlplus /nolog   SQL*Plus: Release 11.2.0.1.0 Production on 星期四 5月 3 10:53:00 2012   Copyright (c) 1982, 2010, Oracle.  All rights reserved.   SQL&#62; conn sys/oracle@nbsdev as sysdba; ERROR: ORA-12545: 因目标主机或对象不存在, 连接失败   nbsdev在我本机的tnsnames.ora中的配置为： nbsdev =   (DESCRIPTION =     (ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.15.86)(PORT = 1522))     [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">11gR2 RAC</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">两节点的环境，我本机用</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SCAN VIP</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">连的时候发现连不上了，不断尝试多次，始终报同样的错误</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">ORA-12545</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">C:\Documents and Settings\cuihua&gt;sqlplus /nolog</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL*Plus: Release 11.2.0.1.0 Production on </span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">星期四</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> 5</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">月</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> 3 10:53:00 2012</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Copyright (c) 1982, 2010, Oracle.<span style="mso-spacerun: yes;">  </span>All rights reserved.</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; conn sys/oracle@nbsdev as sysdba;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">ERROR:</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: red; font-size: 10pt;" lang="EN-US">ORA-12545: </span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; color: red; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">因目标主机或对象不存在</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: red; font-size: 10pt;" lang="EN-US">, </span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; color: red; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">连接失败</span></strong><strong style="mso-bidi-font-weight: normal;"></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">nbsdev</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">在我本机的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">tnsnames.ora</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">中的配置为：</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">nbsdev =</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>(DESCRIPTION =</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span><strong style="mso-bidi-font-weight: normal;">(ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.15.86)(PORT = 1522))</strong></span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>(CONNECT_DATA =</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">      </span>(SERVER = DEDICATED)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">      </span>(SERVICE_NAME = NBSDEV)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>)</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">虽然连不上，但</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">tnsping</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">可以</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">ping</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">通，因为</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">tnsping</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">只检查</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">IP</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">地址和端口是否能连通，至于数据库实例状态，监听注册了哪些服务这些，它是不检查的：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">C:\Documents and Settings\cuihua&gt;tnsping nbsdev</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 &#8211; Production on 03-5</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">月</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> -</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">2012 10:43:00</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Copyright (c) 1997, 2010, Oracle.<span style="mso-spacerun: yes;">  </span>All rights reserved.</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">已使用的参数文件</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">:</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">C:\app\cuihua\product\11.2.0\dbhome_1\network\admin\sqlnet.ora</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">已使用</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> TNSNAMES </span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">适配器来解析别名</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">尝试连接</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> (DESCRIPTION = (FAILOVER=ON) (ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.15.86)(PORT = 1522)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = NBSDEV)))</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: blue; font-size: 10pt;" lang="EN-US">OK (30 </span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; color: blue; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">毫秒</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: blue; font-size: 10pt;" lang="EN-US">)</span></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">如下是</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">NBSDEV</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">在</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">database server</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">端的相关设置：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">grid:/nbsdu01/app/11.2/network/admin&gt;cat /etc/hosts</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"># @(#)47<span style="mso-spacerun: yes;">        </span>1.2<span style="mso-spacerun: yes;">  </span>src/bos/usr/sbin/netstart/hosts, cmdnet, bos61D, d2007_49A2 10/1/07 13:57:52</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">省略显示相关内容……</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: fr;" lang="FR">#RAC</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: fr;" lang="FR">10.1.15</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: fr;" lang="FR">.64<span style="mso-spacerun: yes;">  </span>P550-05-LA </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: fr;" lang="FR">10.1.15</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: fr;" lang="FR">.84<span style="mso-spacerun: yes;">  </span>P550-05-LA-vip </span></strong></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: fr;" lang="FR">9.2.1</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: fr;" lang="FR">.64<span style="mso-spacerun: yes;">    </span>P550-05-LA-priv </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: fr;" lang="FR">10.1.15</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: fr;" lang="FR">.65<span style="mso-spacerun: yes;">  </span>P550-05-LB </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: fr;" lang="FR">10.1.15</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: fr;" lang="FR">.85<span style="mso-spacerun: yes;">  </span>P550-05-LB-vip </span></strong></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">9.2.1</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">.65<span style="mso-spacerun: yes;">    </span>P550-05-LB-priv</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">10.1.15</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">.86<span style="mso-spacerun: yes;">  </span>nbsdev-scan</span></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">grid:/nbsdu01/app/11.2/network/admin&gt;lsnrctl status LISTENER_SCAN1</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">LSNRCTL for IBM/AIX RISC System/6000: Version 11.2.0.1.0 &#8211; Production on 03-MAY-2012 11:28:16</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Copyright (c) 1991, 2009, Oracle.<span style="mso-spacerun: yes;">  </span>All rights reserved.</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">STATUS of the LISTENER</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Alias<span style="mso-spacerun: yes;">                     </span>LISTENER_SCAN1</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Version<span style="mso-spacerun: yes;">                   </span>TNSLSNR for IBM/AIX RISC System/6000: Version 11.2.0.1.0 &#8211; Production</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Start Date<span style="mso-spacerun: yes;">                </span>03-MAY-2012 11:27:07</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Uptime<span style="mso-spacerun: yes;">                    </span>0 days 0 hr. 1 min. 9 sec</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Trace Level<span style="mso-spacerun: yes;">               </span>off</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Security<span style="mso-spacerun: yes;">                  </span>ON: Local OS Authentication</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SNMP<span style="mso-spacerun: yes;">                      </span>ON</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Listener Parameter File<span style="mso-spacerun: yes;">   </span>/nbsdu01/app/11.2/network/admin/listener.ora</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Listener Log File<span style="mso-spacerun: yes;">         </span>/nbsdu01/app/grid/diag/tnslsnr/P550-05-LA/listener_scan1/alert/log.xml</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Listening Endpoints Summary&#8230;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1)))</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span><strong style="mso-bidi-font-weight: normal;">(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.1.15.86)(PORT=1522)))</strong></span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Services Summary&#8230;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Service &#8220;NBSDEV&#8221; has 2 instance(s).</span></strong></p>
<p class="MsoNormal" style="background: #e6e6e6;"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>Instance &#8220;NBSDEV1&#8243;, status READY, has 1 handler(s) for this service&#8230;</span></strong></p>
<p class="MsoNormal" style="background: #e6e6e6;"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>Instance &#8220;NBSDEV2&#8243;, status READY, has 1 handler(s) for this service&#8230;</span></strong></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Service &#8220;NBSDEVXDB&#8221; has 2 instance(s).</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>Instance &#8220;NBSDEV1&#8243;, status READY, has 1 handler(s) for this service&#8230;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>Instance &#8220;NBSDEV2&#8243;, status READY, has 1 handler(s) for this service&#8230;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">The command completed successfully</span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">现在的状况是看起来一切正常，但就是连不上。</span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">我们来仔细检查一下</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SCAN Listener</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的状况：</span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">grid:/nbsdu01/app/11.2/network/admin&gt;<strong style="mso-bidi-font-weight: normal;"><span style="color: blue;">lsnrctl service LISTENER_SCAN1</span></strong></span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">LSNRCTL for IBM/AIX RISC System/6000: Version 11.2.0.1.0 &#8211; Production on 03-MAY-2012 11:28:28</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Copyright (c) 1991, 2009, Oracle.<span style="mso-spacerun: yes;">  </span>All rights reserved.</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Services Summary&#8230;</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Service &#8220;NBSDEV&#8221; has 2 instance(s).</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>Instance &#8220;NBSDEV1&#8243;, status READY, has 1 handler(s) for this service&#8230;</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>Handler(s):</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">      </span>&#8220;DEDICATED&#8221; established:0 refused:0 state:ready</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">         </span>REMOTE SERVER</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">         </span>(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.1.15.84)(PORT=1522)))</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;"> </span><strong style="mso-bidi-font-weight: normal;"><span style="mso-spacerun: yes;"> </span>Instance &#8220;NBSDEV2&#8243;, status READY, </strong>has 1 handler(s) for this service&#8230;</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span><strong style="mso-bidi-font-weight: normal;"><span style="color: red;">Handler(s):</span></strong></span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">      </span>&#8220;DEDICATED&#8221; established:0 refused:0<strong style="mso-bidi-font-weight: normal;"> <span style="color: red;">state:blocked</span></strong></span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">         </span>REMOTE SERVER</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">         </span>(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(<strong style="mso-bidi-font-weight: normal;"><span style="color: red;">HOST=10.1.15.84</span></strong>)(PORT=1522)))</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Service &#8220;NBSDEVXDB&#8221; has 2 instance(s).</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>Instance &#8220;NBSDEV1&#8243;, status READY, has 1 handler(s) for this service&#8230;</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>Handler(s):</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">      </span>&#8220;D000&#8243; established:0 refused:0 current:0 max:1022 state:ready</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">         </span></span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: fr;" lang="FR">DISPATCHER &lt;machine: P550-05-LA, pid: 17104980&gt;</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: fr;" lang="FR"><span style="mso-spacerun: yes;">         </span></span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">(ADDRESS=(PROTOCOL=tcp)(HOST=P550-05-LA)(PORT=64296))</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>Instance &#8220;NBSDEV2&#8243;, status READY, has 1 handler(s) for this service&#8230;</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>Handler(s):</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">      </span>&#8220;D000&#8243; established:0 refused:0 current:0 max:1022 state:ready</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">         </span>DISPATCHER &lt;machine: P550-05-LB, pid: 10616892&gt;</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">         </span>(ADDRESS=(PROTOCOL=tcp)(HOST=P550-05-LB)(PORT=43555))</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">The command completed successfully</span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">从上述结果里我们可以看到，现在节点</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">上面的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">NBSDEV2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Handler</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的状态为</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">blocked</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">且</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">HOST</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">地址错了――这里</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">HOST</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">地址明显应该是</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">10.1.15</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">.85</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">。</span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">我们登陆一下节点</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，看一下</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">local listener</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的状态：</span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">grid:/home/grid&gt;lsnrctl status</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">LSNRCTL for IBM/AIX RISC System/6000: Version 11.2.0.1.0 &#8211; Production on 03-MAY-2012 11:31:40</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Copyright (c) 1991, 2009, Oracle.<span style="mso-spacerun: yes;">  </span>All rights reserved.</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">STATUS of the LISTENER</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Alias<span style="mso-spacerun: yes;">                     </span>LISTENER</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Version<span style="mso-spacerun: yes;">                   </span>TNSLSNR for IBM/AIX RISC System/6000: Version 11.2.0.1.0 &#8211; Production</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Start Date<span style="mso-spacerun: yes;">                </span>28-APR-2012 17:34:03</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Uptime<span style="mso-spacerun: yes;">                    </span>4 days 17 hr. 57 min. 37 sec</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Trace Level<span style="mso-spacerun: yes;">               </span>off</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Security<span style="mso-spacerun: yes;">                  </span>ON: Local OS Authentication</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SNMP<span style="mso-spacerun: yes;">                      </span>ON</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Listener Parameter File<span style="mso-spacerun: yes;">   </span>/nbsdu01/app/11.2/network/admin/listener.ora</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Listener Log File<span style="mso-spacerun: yes;">         </span>/nbsdu01/app/grid/diag/tnslsnr/P550-05-LB/listener/alert/log.xml</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Listening Endpoints Summary&#8230;</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.1.15.65)(PORT=1522)))</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.1.15.85)(PORT=1522)))</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Services Summary&#8230;</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Service &#8220;+ASM&#8221; has 1 instance(s).</span></strong></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>Instance &#8220;+ASM2&#8243;, status READY, has 1 handler(s) for this service&#8230;</span></strong></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">The command completed successfully</span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">从结果里可以看到，实例</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">NBSDEV2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的动态注册并没有成功，只有</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">ASM</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">实例，这个不对。</span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">我们重启一下节点</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">上的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">local listener</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">grid:/home/grid&gt;lsnrctl stop</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">LSNRCTL for IBM/AIX RISC System/6000: Version 11.2.0.1.0 &#8211; Production on 03-MAY-2012 11:32:50</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Copyright (c) 1991, 2009, Oracle.<span style="mso-spacerun: yes;">  </span>All rights reserved.</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">The command completed successfully</span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">grid:/home/grid&gt;lsnrctl start</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">LSNRCTL for IBM/AIX RISC System/6000: Version 11.2.0.1.0 &#8211; Production on 03-MAY-2012 11:32:54</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Copyright (c) 1991, 2009, Oracle.<span style="mso-spacerun: yes;">  </span>All rights reserved.</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Starting /nbsdu01/app/11.2/bin/tnslsnr: please wait&#8230;</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">TNSLSNR for IBM/AIX RISC System/6000: Version 11.2.0.1.0 &#8211; Production</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">System parameter file is /nbsdu01/app/11.2/network/admin/listener.ora</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Log messages written to /nbsdu01/app/grid/diag/tnslsnr/P550-05-LB/listener/alert/log.xml</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">STATUS of the LISTENER</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Alias<span style="mso-spacerun: yes;">        </span><span style="mso-spacerun: yes;">             </span>LISTENER</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Version<span style="mso-spacerun: yes;">                   </span>TNSLSNR for IBM/AIX RISC System/6000: Version 11.2.0.1.0 &#8211; Production</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Start Date<span style="mso-spacerun: yes;">                </span>03-MAY-2012 11:32:55</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Uptime<span style="mso-spacerun: yes;">                    </span>0 days 0 hr. 0 min. 0 sec</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Trace Level<span style="mso-spacerun: yes;">               </span>off</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Security <span style="mso-spacerun: yes;">                 </span>ON: Local OS Authentication</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SNMP<span style="mso-spacerun: yes;">                      </span>ON</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Listener Parameter File<span style="mso-spacerun: yes;">   </span>/nbsdu01/app/11.2/network/admin/listener.ora</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Listener Log File<span style="mso-spacerun: yes;">         </span>/nbsdu01/app/grid/diag/tnslsnr/P550-05-LB/listener/alert/log.xml</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Listening Endpoints Summary&#8230;</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">The listener supports no services</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">The command completed successfully</span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">重启完后现在的状态就对了：</span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">grid:/home/grid&gt;lsnrctl status</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">LSNRCTL for IBM/AIX RISC System/6000: Version 11.2.0.1.0 &#8211; Production on 03-MAY-2012 11:34:10</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 93.0pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-tab-count: 1;">                               </span></span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Copyright (c) 1991, 2009, Oracle.<span style="mso-spacerun: yes;">  </span>All rights reserved.</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">STATUS of the LISTENER</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Alias<span style="mso-spacerun: yes;">                     </span>LISTENER</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Version<span style="mso-spacerun: yes;">                   </span>TNSLSNR for IBM/AIX RISC System/6000: Version 11.2.0.1.0 &#8211; Production</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Start Date<span style="mso-spacerun: yes;">                </span>03-MAY-2012 11:32:55</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Uptime<span style="mso-spacerun: yes;">              </span><span style="mso-spacerun: yes;">      </span>0 days 0 hr. 1 min. 15 sec</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Trace Level<span style="mso-spacerun: yes;">               </span>off</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Security<span style="mso-spacerun: yes;">                  </span>ON: Local OS Authentication</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SNMP<span style="mso-spacerun: yes;">                      </span>ON</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Listener Parameter File<span style="mso-spacerun: yes;">   </span>/nbsdu01/app/11.2/network/admin/listener.ora</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Listener Log File<span style="mso-spacerun: yes;">         </span>/nbsdu01/app/grid/diag/tnslsnr/P550-05-LB/listener/alert/log.xml</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Listening Endpoints Summary&#8230;</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.1.15.65)(PORT=1522)))</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.1.15.85)(PORT=1522)))</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Services Summary&#8230;</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Service &#8220;+ASM&#8221; has 1 instance(s).</span></strong></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>Instance &#8220;+ASM2&#8243;, status READY, has 1 handler(s) for this service&#8230;</span></strong></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Service &#8220;NBSDEV&#8221; has 1 instance(s).</span></strong></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>Instance &#8220;NBSDEV2&#8243;, status READY, has 1 handler(s) for this service&#8230;</span></strong></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Service &#8220;NBSDEVXDB&#8221; has 1 instance(s).</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>Instance &#8220;NBSDEV2&#8243;, status READY, has 1 handler(s) for this service&#8230;</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">The command completed successfully</span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">再次回到节点</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，现在我们再来看一下</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SCAN Listener</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的状态：</span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">grid:/nbsdu01/app/11.2/network/admin&gt;lsnrctl service LISTENER_SCAN1</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">LSNRCTL for IBM/AIX RISC System/6000: Version 11.2.0.1.0 &#8211; Production on 03-MAY-2012 11:34:52</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Copyright (c) 1991, 2009, Oracle.<span style="mso-spacerun: yes;">  </span>All rights reserved.</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Services Summary&#8230;</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Service &#8220;NBSDEV&#8221; has 2 instance(s).</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>Instance &#8220;NBSDEV1&#8243;, status READY, has 1 handler(s) for this service&#8230;</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>Handler(s):</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">      </span>&#8220;DEDICATED&#8221; established:0 refused:0 state:ready</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">         </span>REMOTE SERVER</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">         </span>(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.1.15.84)(PORT=1522)))</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span><strong style="mso-bidi-font-weight: normal;">Instance &#8220;NBSDEV2&#8243;, status READY,</strong> has 1 handler(s) for this service&#8230;</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span><strong style="mso-bidi-font-weight: normal;"><span style="color: blue;">Handler(s)</span>:</strong></span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">      </span>&#8220;DEDICATED&#8221; established:0 refused:0 <strong style="mso-bidi-font-weight: normal;"><span style="color: blue;">state:ready</span></strong></span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">         </span>REMOTE SERVER</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">         </span>(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(<strong style="mso-bidi-font-weight: normal;"><span style="color: blue;">HOST=10.1.15.85</span></strong>)(PORT=1522)))</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Service &#8220;NBSDEVXDB&#8221; has 2 instance(s).</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>Instance &#8220;NBSDEV1&#8243;, status READY, has 1 handler(s) for this service&#8230;</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>Handler(s):</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">      </span>&#8220;D000&#8243; established:0 refused:0 current:0 max:1022 state:ready</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">         </span></span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: fr;" lang="FR">DISPATCHER &lt;machine: P550-05-LA, pid: 17104980&gt;</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: fr;" lang="FR"><span style="mso-spacerun: yes;">         </span></span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">(ADDRESS=(PROTOCOL=tcp)(HOST=P550-05-LA)(PORT=64296))</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>Instance &#8220;NBSDEV2&#8243;, status READY, has 1 handler(s) for this service&#8230;</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>Handler(s):</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">      </span>&#8220;D000&#8243; established:0 refused:0 current:0 max:1022 state:ready</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">         </span>DISPATCHER &lt;machine: P550-05-LB, pid: 10616892&gt;</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">         </span>(ADDRESS=(PROTOCOL=tcp)(HOST=P550-05-LB)(PORT=43555))</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">The command completed successfully</span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">从结果里我们可以看到，现在</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">NBSDEV2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Handler</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的状态已经变成了</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">ready</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">且</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">HOST</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">地址也变成了</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">10.1.15</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">.85</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">。</span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">再次在我本机上尝试连接</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">NBSDEV</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，刚才的报错</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">ORA-12545</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">已不复存在，我们又可以连上了：</span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; conn sys/oracle@nbsdev as sysdba;</span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">已连接。</span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; show parameter instance_name;</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">NAME<span style="mso-spacerun: yes;">                                 </span>TYPE<span style="mso-spacerun: yes;">        </span>VALUE</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">instance_name<span style="mso-spacerun: yes;">                        </span>string<span style="mso-spacerun: yes;">      </span>NBSDEV1</span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">从整个诊断过程来看，在用</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SCAN VIP</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">连接的时候，</span><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">似乎是在我反复尝试的情况下，始终都将我的连接</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">redirect</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">到节点</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">2</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">上，又因为节点</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">2</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">在</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SCAN Listener</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">上注册的</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">HOST</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">地址不对，所以</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">这里报错“</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">ORA-12545: </span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">因目标主机或对象不存在</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">, </span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">连接失败”</span></strong><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，这个跟我心目中</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SCAN VIP</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的原理不太一样。节点</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">有问题，你就让我连节点</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">好了，干嘛要在我反复尝试的情况下始终报错</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">ORA-12545</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">呢？</span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">现在我们手工把节点</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">上的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">local listener</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">停掉：</span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">grid:/home/grid&gt;lsnrctl stop </span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">LSNRCTL for IBM/AIX RISC System/6000: Version 11.2.0.1.0 &#8211; Production on 03-MAY-2012 14:08:45</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Copyright (c) 1991, 2009, Oracle.<span style="mso-spacerun: yes;">  </span>All rights reserved.</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">The command completed successfully</span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">再次回到节点</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，查看一下</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SCAN Listener</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的状态：</span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">grid:/home/grid&gt;lsnrctl service LISTENER_SCAN1</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">LSNRCTL for IBM/AIX RISC System/6000: Version 11.2.0.1.0 &#8211; Production on 03-MAY-2012 14:10:26</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Copyright (c) 1991, 2009, Oracle.<span style="mso-spacerun: yes;">  </span>All rights reserved.</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Services Summary&#8230;</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Service &#8220;NBSDEV&#8221; has 2 instance(s).</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>Instance &#8220;NBSDEV1&#8243;, status READY, has 1 handler(s) for this service&#8230;</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>Handler(s):</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">      </span>&#8220;DEDICATED&#8221; established:23 refused:0 state:ready</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">         </span>REMOTE SERVER</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">         </span>(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.1.15.84)(PORT=1522)))</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span><strong style="mso-bidi-font-weight: normal;">Instance &#8220;NBSDEV2&#8243;, status READY</strong>, has 1 handler(s) for this service&#8230;</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">   </span><strong style="mso-bidi-font-weight: normal;"><span style="color: blue;"><span style="mso-spacerun: yes;"> </span>Handler(s):</span></strong></span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">      </span>&#8220;DEDICATED&#8221; established:3 refused:0 <strong style="mso-bidi-font-weight: normal;"><span style="color: blue;">state:blocked</span></strong></span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">         </span>REMOTE SERVER</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">         </span>(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(<strong style="mso-bidi-font-weight: normal;"><span style="color: blue;">HOST=10.1.15.85</span></strong>)(PORT=1522)))</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Service &#8220;NBSDEVXDB&#8221; has 2 instance(s).</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>Instance &#8220;NBSDEV1&#8243;, status READY, has 1 handler(s) for this service&#8230;</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>Handler(s):</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">      </span>&#8220;D000&#8243; established:0 refused:0 current:0 max:1022 state:ready</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">         </span></span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: fr;" lang="FR">DISPATCHER &lt;machine: P550-05-LA, pid: 17104980&gt;</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: fr;" lang="FR"><span style="mso-spacerun: yes;">         </span></span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">(ADDRESS=(PROTOCOL=tcp)(HOST=P550-05-LA)(PORT=64296))</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>Instance &#8220;NBSDEV2&#8243;, status READY, has 1 handler(s) for this service&#8230;</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>Handler(s):</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">      </span>&#8220;D000&#8243; established:0 refused:0 current:0 max:1022 state:ready</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">         </span>DISPATCHER &lt;machine: P550-05-LB, pid: 10616892&gt;</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">         </span>(ADDRESS=(PROTOCOL=tcp)(HOST=P550-05-LB)(PORT=43555))</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">The command completed successfully</span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">从上述结果里我们可以看到，当我把节点</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">上的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">local listener</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">停掉后，节点</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">上</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SCAN Listener</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">中节点</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">对应的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Handler</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的状态已经变成了</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">blocked</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，但此时</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">HOST</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">地址是对的。</span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">从如下结果我们可以看到——虽然节点</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">上</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SCAN Listener</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">中节点</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">对应的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Handler</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的状态已经变成了</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">blocked</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，但因为</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">HOST</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">地址是对的，所以当我在本机以</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SCAN VIP</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">连接的时候还是可以连上，</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">这里正确的将我的连接</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">redirect</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">到了节点</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">上：</span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; conn sys/oracle@nbsdev as sysdba;</span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Connected to Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 </span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Connected as SYS</span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; show parameter instance_name;</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">NAME<span style="mso-spacerun: yes;">                 </span><span style="mso-spacerun: yes;">                </span>TYPE<span style="mso-spacerun: yes;">        </span>VALUE</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal" style="background: #e6e6e6; tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">instance_name<span style="mso-spacerun: yes;">                        </span>string<span style="mso-spacerun: yes;">      </span>NBSDEV1</span></p>
<p class="MsoNormal" style="tab-stops: 37.5pt;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dbsnake.net/fix-rac-ora-12545.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RAC环境下的连接管理</title>
		<link>http://www.dbsnake.net/rac-connection-management.html</link>
		<comments>http://www.dbsnake.net/rac-connection-management.html#comments</comments>
		<pubDate>Mon, 02 Apr 2012 09:11:35 +0000</pubDate>
		<dc:creator>Cui Hua</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.dbsnake.net/?p=67</guid>
		<description><![CDATA[这篇文章正在修改，即将被放到OTN/CN上。 This article is under review, will be put on OTN/CN in a very short time.]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: arial;">这篇文章正在修改，即将被放到</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">OTN/CN</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: arial;">上。</span></strong><strong style="mso-bidi-font-weight: normal;"></strong></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: black; font-size: 10pt;" lang="EN-US">This article is under review, will be put on OTN/CN in a very short time.</span></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dbsnake.net/rac-connection-management.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>关于SCN另外两个有趣的知识点</title>
		<link>http://www.dbsnake.net/two-scn-internal-points.html</link>
		<comments>http://www.dbsnake.net/two-scn-internal-points.html#comments</comments>
		<pubDate>Sat, 24 Mar 2012 15:48:42 +0000</pubDate>
		<dc:creator>Cui Hua</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.dbsnake.net/?p=59</guid>
		<description><![CDATA[首先声明一下，这篇文章的结论来源于我昨天在机场接姗姗妈的时候跟大熊的讨论，并不是我的原创。   在步入正题之前，先普及一下关于Oracle里SCN的基本知识点： 1、Oracle的SCN在每秒16384次commit的情况下可以维持534年，每秒16384次commit是Oracle早先认为的任何系统的极限commit强度； 2、Oracle里SCN的起点是1988年1月1日； 3、_minimum_giga_scn=n的含义是把SCN往前推进到nG，但请注意，只有在SCN小于nG的时候才会用到这个隐含参数，反之则Oracle会置这个隐含参数于不顾。   好了，我们进入正题，这篇文章里要阐述的两个关于SCN的有趣的知识点如下： 1、SCN会随着dblink从高向低扩散； 2、过大的SCN可能会导致Oracle数据库打不开；   好了，我们来看两个证明上述观点的实例： 一、SCN会随着dblink从高向低扩散： 先连到名为cuihua的10.2.0.1的库： SQL&#62; conn sys/oracle@cuihua as sysdba; Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 Connected as SYS   可以看到系统目前的SCN： SQL&#62; select dbms_flashback.get_system_change_number() from dual;   DBMS_FLASHBACK.GET_SYSTEM_CHAN &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;                     1073742134   当然，这个SCN会随着时间的推移而增长： SQL&#62; select dbms_flashback.get_system_change_number() from dual;   DBMS_FLASHBACK.GET_SYSTEM_CHAN &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;                     1073742140 [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">首先声明一下，这篇文章的结论来源于我昨天在机场接姗姗妈的时候跟</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><a href="http://www.laoxiong.net/"><span style="font-family: 宋体; mso-ascii-font-family: arial; mso-hansi-font-family: arial;" lang="EN-US"><span lang="EN-US">大熊</span></span></a></span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的讨论，并不是我的原创。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">在步入正题之前，先普及一下关于</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">里</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SCN</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的基本知识点：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">、</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SCN</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">在每秒</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">16384</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">次</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">commit</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的情况下可以维持</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">534</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">年，每秒</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">16384</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">次</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">commit</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">是</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">早先认为的任何系统的极限</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">commit</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">强度；</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">、</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">里</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SCN</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的起点是</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">1988</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">年</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">月</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">日</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">；</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">3</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">、</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">_minimum_giga_scn=n</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的含义是把</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SCN</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">往前推进到</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">nG</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，但请注意，只有在</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SCN</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">小于</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">nG</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的时候才会用到这个隐含参数，反之则</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">会置这个隐含参数于不顾。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">好了，我们进入正题，这篇文章里要阐述的两个关于</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SCN</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的有趣的知识点如下：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">1</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">、</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SCN</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">会随着</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">dblink</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">从高向低扩散；</span></strong><strong style="mso-bidi-font-weight: normal;"></strong></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">2</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">、过大的</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SCN</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">可能会导致</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">数据库打不开；</span></strong><strong style="mso-bidi-font-weight: normal;"></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">好了，我们来看两个证明上述观点的实例：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">一、</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SCN</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">会随着</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">dblink</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">从高向低扩散：</span></strong></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">先连到名为</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">cuihua</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">10.2.0</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">.1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的库：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; conn sys/oracle@cuihua as sysdba;</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Connected as SYS</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">可以看到系统目前的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SCN</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select dbms_flashback.get_system_change_number() from dual;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">DBMS_FLASHBACK.GET_SYSTEM_CHAN</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">                    </span>1073742134</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">当然，这个</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SCN</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">会随着时间的推移而增长：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select dbms_flashback.get_system_change_number() from dual;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">DBMS_FLASHBACK.GET_SYSTEM_CHAN</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">                    </span>1073742140</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">这个库目前的对象数为</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">51831</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select count(*) from dba_objects;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>COUNT(*)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">     </span>51831</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">再另起一个</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">session</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，连到名为</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">cuihua112</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">11.2.0</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">.1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的库：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; conn sys/oracle@cuihua112 as sysdba;</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Connected to Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Connected as SYS</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">从</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">cuihua112</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">中创建一个到上述</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">10.2.0</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">.1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的库</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">cuihua</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">dblink</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; create public database link cuihua connect to scott identified by tiger using &#8216;cuihua&#8217;;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Database link created</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">可以看到在</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">cuihua112</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">中，系统目前的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SCN</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">仅为</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">2100672</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select dbms_flashback.get_system_change_number() from dual;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">DBMS_FLASHBACK.GET_SYSTEM_CHAN</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">                       </span>2100672</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">当然，这个</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SCN</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">会随着时间的推移而增长，但是增长的幅度有限（因为这个库很闲，我什么事情也没做）：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select dbms_flashback.get_system_change_number() from dual;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">DBMS_FLASHBACK.GET_SYSTEM_CHAN</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">      </span><span style="mso-spacerun: yes;">                 </span>2100673</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">接着，我通过刚建的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">dblink</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">去查一下</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">cuihua</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">中的对象数，结果是</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">51831</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，和之前的查询结果一致：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select count(*) from dba_objects@cuihua;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">  </span>COUNT(*)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">     </span>51831</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">接着我们马上再次查询系统的</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SCN</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，发现结果已经从之前的</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">2100673</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">猛增到</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">1073742966</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，这个实际上已经足以证明</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SCN</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">会随着</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">dblink</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">从高向低扩散</span></strong><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select dbms_flashback.get_system_change_number() from dual;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">DBMS_FLASHBACK.GET_SYSTEM_CHAN</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">                    </span>1073742966</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">好了，我们再来看第二个实例：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">二、过大的</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SCN</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">可能会导致</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">数据库打不开（我只测试了</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">10.2.0</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">.1</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">）</span></strong><strong style="mso-bidi-font-weight: normal;"></strong></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">现在这个名为</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">10.2.0</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">.1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的库</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">cuihua</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">是可以正常打开的：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; startup pfile=&#8217;D:\oracle\oradata\cuihua\initcuihua.ora&#8217;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">ORACLE </span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">例程已经启动。</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Total System Global Area<span style="mso-spacerun: yes;">  </span>608174080 bytes</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Fixed Size<span style="mso-spacerun: yes;">                  </span>1250404 bytes</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Variable Size<span style="mso-spacerun: yes;">             </span>209718172 bytes</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Database Buffers<span style="mso-spacerun: yes;">          </span>390070272 bytes</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Redo Buffers<span style="mso-spacerun: yes;">                </span>7135232 bytes</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">数据库装载完毕。</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">数据库已经打开。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">今天是</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">2012</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">年</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">3</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">月</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">24</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">日</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select sysdate from dual;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SYSDATE</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">2012-3-24 22:04:17</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">2012</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">年</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">3</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">月</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">24</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">日</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">距离</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">1988</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">年</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">月</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">日</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">有</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">290.741935</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">月：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select months_between (to_date(&#8217;20120324&#8242;,&#8217;YYYYMMDD&#8217;),to_date(&#8217;19880101&#8242;,&#8217;YYYYMMDD&#8217;) ) &#8220;MONTHS&#8221; from dual;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">    </span>MONTHS</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">290.741935</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">在每秒</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">16384</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的极限</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">commit</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">强度下，要超过当前时间（即要超过</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">290.741935</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">月，我这里选用了</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">300</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">），只需要将</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">_minimum_giga_scn</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">递增到</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">12260</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">即可：</span></strong><strong style="mso-bidi-font-weight: normal;"></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select 16384*60*60*24*31*<strong style="mso-bidi-font-weight: normal;">300</strong>/(1024*1024*1024) SCN from dual;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">       </span>SCN</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">12260.7421</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Shutdown</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">上述库：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; shutdown immediate;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">数据库已经关闭。</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">已经卸载数据库。</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">ORACLE </span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">例程已经关闭。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">修改</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">initcuihua.ora</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">文件，添加</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*._minimum_giga_scn=12260</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*.undo_management=&#8217;AUTO&#8217;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*.undo_retention=3600</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*.undo_tablespace=&#8217;UNDOTBS1&#8242;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*.user_dump_dest=&#8217;D:\oracle\admin\cuihua\udump&#8217;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*._minimum_giga_scn=12260</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">改完后再启库的时候发现已经启动不了了，但这里</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">报的错误是莫名其妙的：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; startup pfile=&#8217;D:\oracle\oradata\cuihua\initcuihua.ora&#8217;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">ORACLE </span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">例程已经启动。</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Total System Global Area<span style="mso-spacerun: yes;">  </span>608174080 bytes</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Fixed Size<span style="mso-spacerun: yes;">                  </span>1250404 bytes</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Variable Size<span style="mso-spacerun: yes;">             </span>209718172 bytes</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Database Buffers<span style="mso-spacerun: yes;">          </span>390070272 bytes</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Redo Buffers<span style="mso-spacerun: yes;">                </span>7135232 bytes</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">数据库装载完毕。</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">ORA-01052: </span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">未指定所需的目标</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> LOG_ARCHIVE_DUPLEX_DEST</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select status from v$instance;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">STATUS</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">MOUNTED</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; shutdown immediate;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">ORA-01109: </span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">数据库未打开</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">已经卸载数据库。</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">ORACLE </span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">例程已经关闭。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">再在</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">cuihua112</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">中计算一下，<strong style="mso-bidi-font-weight: normal;">不超过当前时间（即不超过</strong></span><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">290.741935</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">月，我这里选用了</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">280</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">）的</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">_minimum_giga_scn</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的值应该是</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">11443</span></strong><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select 16384*60*60*24*31*<strong style="mso-bidi-font-weight: normal;">280</strong>/(1024*1024*1024) SCN from dual;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">       </span>SCN</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">11443.3593</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">修改</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">initcuihua.ora</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">文件，将</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">_minimum_giga_scn</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的值改为</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">11443</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*.undo_management=&#8217;AUTO&#8217;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*.undo_retention=3600</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*.undo_tablespace=&#8217;UNDOTBS1&#8242;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*.user_dump_dest=&#8217;D:\oracle\admin\cuihua\udump&#8217;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">*._minimum_giga_scn=11443</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">改完后上述库又可以成功启动了：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; startup pfile=&#8217;D:\oracle\oradata\cuihua\initcuihua.ora&#8217;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">ORACLE </span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">例程已经启动。</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Total System Global Area<span style="mso-spacerun: yes;">  </span>608174080 bytes</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Fixed Size<span style="mso-spacerun: yes;">                  </span>1250404 bytes</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Variable Size<span style="mso-spacerun: yes;">             </span>209718172 bytes</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Database Buffers<span style="mso-spacerun: yes;">          </span>390070272 bytes</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Redo Buffers<span style="mso-spacerun: yes;">                </span>7135232 bytes</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">数据库装载完毕。</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">数据库已经打开。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select dbms_flashback.get_system_change_number() from dual;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">DBMS_FLASHBACK.GET_SYSTEM_CHAN</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">                </span>12286827692577</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">从结果里可以看到，</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SCN</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">确实被我们推进到了我们想要推进的值：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select dbms_flashback.get_system_change_number()/(1024*1024*1024) from dual;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">DBMS_FLASHBACK.GET_SYSTEM_CHAN</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"><span style="mso-spacerun: yes;">              </span>11443.0000005225</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dbsnake.net/two-scn-internal-points.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>如何用AMDU从不能mount的ASM磁盘组中往外抽取数据文件</title>
		<link>http://www.dbsnake.net/amdu-extract-asm-files-from-unmount-diskgroup.html</link>
		<comments>http://www.dbsnake.net/amdu-extract-asm-files-from-unmount-diskgroup.html#comments</comments>
		<pubDate>Sun, 04 Mar 2012 10:33:45 +0000</pubDate>
		<dc:creator>Cui Hua</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.dbsnake.net/?p=57</guid>
		<description><![CDATA[AMDU是Oracle 11g里自带的一个免费的工具，用于分析ASM磁盘组的元数据以及从不能mount的磁盘组中往外抽取数据文件。 “NOTE:553639.1 Placeholder for AMDU binaries and using with ASM 10g”明确指出：AMDU也可用于10g，并提供了可用于10g的AMDU的各个操作系统的版本供大家下载。 &#160; AMDU的原理是解析file directory，这一点ODU也是一样，只不过ODU做的更彻底一些，即使file directory全部损坏，ODU也可以把数据文件抽取出来，尽最大的可能挽救用户的数据。 &#160; 我们来看一个用AMDU从不能mount的磁盘组中往外抽取数据文件的实例： 我们现在shutdown Oracle实例和ASM实例： [root@bspdev odu]# su &#8211; oracle [oracle@bspdev ~]$ sqlplus &#8216;/ as sysdba&#8217;; &#160; SQL*Plus: Release 11.2.0.1.0 Production on Thu Feb 23 10:43:36 2012 &#160; Copyright (c) 1982, 2009, Oracle.&#160; All rights reserved. &#160; &#160; Connected to: [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">AMDU</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">是</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Oracle <?xml:namespace prefix = st1 /><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="11" unitname="g">11g</st1:chmetcnv></span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">里自带的一个免费的工具，用于分析</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">ASM</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">磁盘组的元数据以及从不能</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">mount</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的磁盘组中往外抽取数据文件。</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><?xml:namespace prefix = o /><o:p></o:p></span></p>
<p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">“</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">NOTE:553639.1 Placeholder for AMDU binaries and using with ASM <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="10" unitname="g">10g</st1:chmetcnv></span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">”</span></b><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">明确指出：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">AMDU</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">也可用于</span><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="10" unitname="g"><span style="font-family: arial; font-size: 10pt" lang="EN-US">10g</span></st1:chmetcnv><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，并提供了可用于</span><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="10" unitname="g"><span style="font-family: arial; font-size: 10pt" lang="EN-US">10g</span></st1:chmetcnv><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">AMDU</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的各个操作系统的版本供大家下载。</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">AMDU</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的原理是解析</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">file directory</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，这一点</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">ODU</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">也是一样，只不过</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">ODU</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">做的更彻底一些，即使</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">file directory</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">全部损坏，</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">ODU</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">也可以把数据文件抽取出来，尽最大的可能挽救用户的数据。</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></b></p>
<p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></b></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">我们来看一个用</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">AMDU</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">从不能</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">mount</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的磁盘组中往外抽取数据文件的实例：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">我们现在</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">shutdown Oracle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">实例和</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">ASM</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">实例：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">[root@bspdev odu]# su &#8211; oracle<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">[oracle@bspdev ~]$ sqlplus &#8216;/ as sysdba&#8217;;<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL*Plus: Release <st1:chsdate w:st="on" isrocdate="False" islunardate="False" day="30" month="12" year="1899">11.2.0</st1:chsdate>.1.0 Production on Thu Feb 23 10:43:36 2012<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Copyright (c) 1982, 2009, Oracle.<span style="mso-spacerun: yes">&nbsp; </span>All rights reserved.<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Connected to:<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Oracle Database <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="11" unitname="g">11g</st1:chmetcnv> <st1:place w:st="on"><st1:city w:st="on">Enterprise</st1:city></st1:place> Edition Release <st1:chsdate w:st="on" isrocdate="False" islunardate="False" day="30" month="12" year="1899">11.2.0</st1:chsdate>.1.0 &#8211; Production<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">With the Partitioning, Automatic Storage Management, OLAP, Data Mining<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">and Real Application Testing options<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; shutdown immediate<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Database closed.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Database dismounted.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">ORACLE instance shut down.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; exit<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Disconnected from Oracle Database <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="11" unitname="g">11g</st1:chmetcnv> <st1:place w:st="on"><st1:city w:st="on">Enterprise</st1:city></st1:place> Edition Release <st1:chsdate w:st="on" isrocdate="False" islunardate="False" day="30" month="12" year="1899">11.2.0</st1:chsdate>.1.0 &#8211; Production<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">With the Partitioning, Automatic Storage Management, OLAP, Data Mining<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">and Real Application Testing options<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">[oracle@bspdev ~]$ su &#8211; grid<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Password: <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">[grid@bspdev ~]$ sqlplus &#8216;/ as sysasm&#8217;;<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL*Plus: Release <st1:chsdate w:st="on" isrocdate="False" islunardate="False" day="30" month="12" year="1899">11.2.0</st1:chsdate>.1.0 Production on Thu Feb 23 10:45:05 2012<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Copyright (c) 1982, 2009, Oracle.<span style="mso-spacerun: yes">&nbsp; </span>All rights reserved.<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Connected to:<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Oracle Database <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="11" unitname="g">11g</st1:chmetcnv> <st1:place w:st="on"><st1:city w:st="on">Enterprise</st1:city></st1:place> Edition Release <st1:chsdate w:st="on" isrocdate="False" islunardate="False" day="30" month="12" year="1899">11.2.0</st1:chsdate>.1.0 &#8211; Production<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">With the Automatic Storage Management option<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; shutdown immediate<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">ASM diskgroups dismounted<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">ASM instance shutdown<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; exit<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Disconnected from Oracle Database <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="11" unitname="g">11g</st1:chmetcnv> <st1:place w:st="on"><st1:city w:st="on">Enterprise</st1:city></st1:place> Edition Release <st1:chsdate w:st="on" isrocdate="False" islunardate="False" day="30" month="12" year="1899">11.2.0</st1:chsdate>.1.0 &#8211; Production<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">With the Automatic Storage Management option<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">[grid@bspdev ~]$ crsctl status res<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">NAME=ora.DATA.dg<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">TYPE=ora.diskgroup.type<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">TARGET=OFFLINE<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">STATE=OFFLINE<o:p></o:p></span></b></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">NAME=ora.LISTENER.lsnr<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">TYPE=ora.listener.type<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">TARGET=ONLINE<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">STATE=ONLINE on bspdev<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">NAME=ora.RECO.dg<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">TYPE=ora.diskgroup.type<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">TARGET=OFFLINE<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">STATE=OFFLINE<o:p></o:p></span></b></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">NAME=ora.asm<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">TYPE=ora.asm.type<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">TARGET=OFFLINE<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">STATE=OFFLINE<o:p></o:p></span></b></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">NAME=ora.cssd<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">TYPE=ora.cssd.type<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">TARGET=ONLINE<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">STATE=ONLINE on bspdev<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">NAME=ora.diskmon<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">TYPE=ora.diskmon.type<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">TARGET=ONLINE<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">STATE=ONLINE on bspdev<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">NAME=ora.ora<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="11" unitname="g">11g</st1:chmetcnv>.db<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">TYPE=ora.database.type<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">TARGET=OFFLINE<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">STATE=OFFLINE<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">在</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">ASM diskgroup</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">不能</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">mount</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的情况下</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">asmcmd</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">不能使用：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">[grid@bspdev ~]$ asmcmd<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Connected to an idle instance.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">ASMCMD&gt; ls<o:p></o:p></span></p>
<p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: red; font-size: 10pt" lang="EN-US">ASMCMD-08102: no connection to ASM; command requires ASM to run<o:p></o:p></span></b></p>
<p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: red; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></b></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">但此时</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">ODU</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">内嵌的</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">asmcmd</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">是可以使用的，<b style="mso-bidi-font-weight: normal">所以我们可以轻易的使用</b></span><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">ODU</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">内嵌的</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">asmcmd</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">命令来得到所有的</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">datafile</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的名称</span></b><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: fr" lang="FR">[grid@bspdev ~]$ su -<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: fr" lang="FR">Password: <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: fr" lang="FR">[root@bspdev ~]# cd /u01/app/oracle/odu<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">[root@bspdev odu]# ./odu<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Oracle Data Unloader:Release <st1:chsdate w:st="on" isrocdate="False" islunardate="False" day="30" month="12" year="1899">4.2.1</st1:chsdate><o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Copyright (c) 2008,2009,2010,2011 XiongJun. All rights reserved.<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Web: http://www.oracleodu.com<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Email: magic007cn@gmail.com<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">loading default config&#8230;&#8230;.<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">byte_order little<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">block_size<span style="mso-spacerun: yes">&nbsp; </span>8192<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">block_buffers 1024<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">db_timezone -7<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Invalid db timezone:-7<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">client_timezone 8<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Invalid client timezone:8<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">asmfile_extract_path<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>/odu/asmfile<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">data_path<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>data<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">lob_path<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>/odu/data/lob<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">charset_name AL32UTF8<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">ncharset_name AL16UTF16<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">output_format text<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">lob_storage infile<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">clob_byte_order big<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">trace_level 1<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">delimiter |<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">unload_deleted no<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">file_header_offset 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">is_tru64 no<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">record_row_addr no<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">convert_clob_charset yes<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">use_scanned_lob<span style="mso-spacerun: yes">&nbsp; </span>yes<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">trim_scanned_blob yes<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">lob_switch_dir_rows 20000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">db_block_checksum yes<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">db_block_checking yes<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">rdba_file_bits 10<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">compatible 10<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">load config file &#8216;config.txt&#8217; successful<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">loading default asm disk file &#8230;&#8230;<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">grp# dsk# bsize ausize disksize diskname<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>groupname<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>path<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">&#8212;- &#8212;- &#8212;&#8211; &#8212;&#8212; &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp; </span>1<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>0<span style="mso-spacerun: yes">&nbsp; </span>4096<span style="mso-spacerun: yes">&nbsp; </span>1024K<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>9000 DATA_0000<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>DATA<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>/dev/sda3<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp; </span></span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">1<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>1<span style="mso-spacerun: yes">&nbsp; </span>4096<span style="mso-spacerun: yes">&nbsp; </span>1024K<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>9000 DATA_0001<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>DATA<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>/dev/sda5<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR"><span style="mso-spacerun: yes">&nbsp;&nbsp; </span>1<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>2<span style="mso-spacerun: yes">&nbsp; </span>4096<span style="mso-spacerun: yes">&nbsp; </span>1024K<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>9000 DATA_0002<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>DATA<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>/dev/sda6<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR"><span style="mso-spacerun: yes">&nbsp;&nbsp; </span>2<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>0<span style="mso-spacerun: yes">&nbsp; </span>4096<span style="mso-spacerun: yes">&nbsp; </span>1024K<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>9000 RECO_0000<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>RECO<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="mso-spacerun: yes">&nbsp; </span>/dev/sda7<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR"><span style="mso-spacerun: yes">&nbsp;&nbsp; </span>2<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>1<span style="mso-spacerun: yes">&nbsp; </span>4096<span style="mso-spacerun: yes">&nbsp; </span>1024K<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>7288 RECO_0001<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>RECO<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>/dev/sda8<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">load asm disk file &#8216;asmdisk.txt&#8217; successful<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">loading default control file &#8230;&#8230;<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;</span>ts#<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>fn<span style="mso-spacerun: yes">&nbsp; </span>rfn bsize<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>blocks bf offset filename<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">&#8212;- &#8212;- &#8212;- &#8212;&#8211; &#8212;&#8212;&#8211; &#8212; &#8212;&#8212; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">load control file &#8216;control.txt&#8217; successful<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">loading dictionary data&#8230;&#8230;done<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">loading scanned data&#8230;&#8230;done<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">ODU&gt; asmcmd<span style="mso-spacerun: yes">&nbsp; </span><o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Entering asmcmd module.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">ASMCMD&gt; ls<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Current directory: &lt;root&gt;<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Disk Group<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">DATA<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">RECO<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">ASMCMD&gt; cd +DATA<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">Current directory: +DATA<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">ASMCMD&gt; ls<span style="mso-spacerun: yes">&nbsp;&nbsp; </span><o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Current directory: +DATA<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Name<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">ASM<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;DIR&gt;<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">ORA<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="11" unitname="g">11G</st1:chmetcnv><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;DIR&gt;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">ASMCMD&gt; cd ORA<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="11" unitname="g">11G</st1:chmetcnv><o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">Current directory: +DATA/ORA<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="11" unitname="g">11G</st1:chmetcnv><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">ASMCMD&gt; ls<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Current directory: +DATA/ORA<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="11" unitname="g">11G</st1:chmetcnv><o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Name<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">DATAFILE<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;DIR&gt;<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">CONTROLFILE<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;DIR&gt;<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">ONLINELOG<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;DIR&gt;<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">TEMPFILE<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;DIR&gt;<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">PARAMETERFILE<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;DIR&gt;<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">spfileora<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="11" unitname="g">11g</st1:chmetcnv>.ora<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>=&gt; +DATA.265.747311071<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">ASMCMD&gt; cd DATAFILE<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span><o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">Current directory: +DATA/ORA<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="11" unitname="g">11G</st1:chmetcnv>/DATAFILE<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br">可以看到，当前的第</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">259</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br">号（这个</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">259</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br">是</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">ASM</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br">的</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">internal file number</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br">）文件名称为</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">+DATA/ORA<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="11" unitname="g">11G</st1:chmetcnv>/DATAFILE /</span><span style="mso-ansi-language: pt-br" lang="PT-BR"> </span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">USERS.259.747310451</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br">：</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">ASMCMD&gt; ls<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">Current directory: +DATA/ORA<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="11" unitname="g">11G</st1:chmetcnv>/DATAFILE<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">Name<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">SYSTEM.256.747310449<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">SYSAUX.257.747310449<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">UNDOTBS1.258.747310451<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">USERS.259.747310451<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><o:p></o:p></span></b></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">MYTEST.266.761050749<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">GAOZCINDEX.267.770299335<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">GAOZCINDEX1<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>=&gt; +DATA.267.770299335<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">GAOZCDATA.268.770299347<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">GAOZCDATA1<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>=&gt; +DATA.268.770299347<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">现在我们用</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">AMDU</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">把这个文件给抽出来，注意现在这个文件所在的磁盘组</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">DATA</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">还是处于</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">unmount</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">状态。</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">用</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">AMDU</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">抽取数据文件的语法非常简单，只需要指定磁盘组所在的设备文件名称（可以用</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">*</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">号模糊匹配），以及磁盘组的名称和待抽取的数据文件号（这里的数据文件号是指</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">ASM</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">internal file number</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">）就可以了</span></b><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">[root@bspdev odu]#<b style="mso-bidi-font-weight: normal"><span style="color: blue"> /u01/app/oracle/bin/amdu -diskstring &#8216;/dev/sda*&#8217; -extract &#8216;DATA.259&#8242;</span></b><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">amdu_2012_02_23_11_21_34/<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">进入上述目录，可以看到抽取出的第</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">259</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">号文件</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">DATA_259.f</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">已经生成：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: fr" lang="FR">[root@bspdev odu]# cd amdu_2012_02_23_11_21_34<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: fr" lang="FR"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: fr" lang="FR">[root@bspdev amdu_2012_02_23_11_21_34]# ls -lrt<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: fr" lang="FR">total 39744<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">-rw-r&#8211;r&#8211;. 1 root root<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>8600 Feb 23 11:21 report.txt<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">-rw-r&#8211;r&#8211;. 1 root root 40640512 Feb 23 11:21 DATA_259.f<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">我们现在再用</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">ODU</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">把</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">259</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">号文件提出来，跟</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">AMDU</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">做一个对比：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: fr" lang="FR">[root@bspdev amdu_2012_02_23_11_21_34]# cd ..<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: fr" lang="FR">[root@bspdev odu]# ./odu<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: fr" lang="FR"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Oracle Data Unloader:Release <st1:chsdate w:st="on" isrocdate="False" islunardate="False" day="30" month="12" year="1899">4.2.1</st1:chsdate><o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Copyright (c) 2008,2009,2010,2011 XiongJun. All rights reserved.<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Web: http://www.oracleodu.com<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Email: magic007cn@gmail.com<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">loading default config&#8230;&#8230;.<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">byte_order little<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">block_size<span style="mso-spacerun: yes">&nbsp; </span>8192<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">block_buffers 1024<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">db_timezone -7<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Invalid db timezone:-7<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">client_timezone 8<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Invalid client timezone:8<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">asmfile_extract_path<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>/odu/asmfile<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">data_path<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>data<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">lob_path<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>/odu/data/lob<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">charset_name AL32UTF8<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">ncharset_name AL16UTF16<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">output_format text<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">lob_storage infile<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">clob_byte_order big<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">trace_level 1<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">delimiter |<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">unload_deleted no<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">file_header_offset 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">is_tru64 no<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">record_row_addr no<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">convert_clob_charset yes<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">use_scanned_lob<span style="mso-spacerun: yes">&nbsp; </span>yes<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">trim_scanned_blob yes<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">lob_switch_dir_rows 20000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">db_block_checksum yes<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">db_block_checking yes<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">rdba_file_bits 10<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">compatible 10<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">load config file &#8216;config.txt&#8217; successful<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">loading default asm disk file &#8230;&#8230;<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">grp# dsk# bsize ausize disksize diskname<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>groupname<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>path<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">&#8212;- &#8212;- &#8212;&#8211; &#8212;&#8212; &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp; </span>1<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>0<span style="mso-spacerun: yes">&nbsp; </span>4096<span style="mso-spacerun: yes">&nbsp; </span>1024K<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>9000 DATA_0000<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>DATA<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>/dev/sda3<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp; </span></span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">1<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>1<span style="mso-spacerun: yes">&nbsp; </span>4096<span style="mso-spacerun: yes">&nbsp; </span>1024K<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>9000 DATA_0001<span style="mso-spacerun: yes">&nbsp; </span><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>DATA<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>/dev/sda5<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR"><span style="mso-spacerun: yes">&nbsp;&nbsp; </span>1<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>2<span style="mso-spacerun: yes">&nbsp; </span>4096<span style="mso-spacerun: yes">&nbsp; </span>1024K<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>9000 DATA_0002<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>DATA<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>/dev/sda6<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR"><span style="mso-spacerun: yes">&nbsp;&nbsp; </span>2<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>0<span style="mso-spacerun: yes">&nbsp; </span>4096<span style="mso-spacerun: yes">&nbsp; </span>1024K<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>9000 RECO_0000<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>RECO<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>/dev/sda7<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR"><span style="mso-spacerun: yes">&nbsp;&nbsp; </span>2<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>1<span style="mso-spacerun: yes">&nbsp; </span>4096<span style="mso-spacerun: yes">&nbsp; </span>1024K<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>7288 RECO_0001<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>RECO<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>/dev/sda8<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">load asm disk file &#8216;asmdisk.txt&#8217; successful<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">loading default control file &#8230;&#8230;<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;</span>ts#<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>fn<span style="mso-spacerun: yes">&nbsp; </span>rfn bsize<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>blocks bf offset filename<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">&#8212;- &#8212;- &#8212;- &#8212;&#8211; &#8212;&#8212;&#8211; &#8212; &#8212;&#8212; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR"><span style="mso-spacerun: yes">&nbsp;&nbsp; </span>0<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>1<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>1<span style="mso-spacerun: yes">&nbsp; </span>8192<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>112640 N<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0 +DATA/ORA<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="11" unitname="g">11G</st1:chmetcnv>/DATAFILE/SYSTEM.256.747310449<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR"><span style="mso-spacerun: yes">&nbsp;&nbsp; </span>1<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>2<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>2<span style="mso-spacerun: yes">&nbsp; </span>8192<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>119040 N<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0 +DATA/ORA<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="11" unitname="g">11G</st1:chmetcnv>/DATAFILE/SYSAUX.257.747310449<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR"><span style="mso-spacerun: yes">&nbsp;&nbsp; </span>2<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>3<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>3<span style="mso-spacerun: yes">&nbsp; </span>8192<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>70400 N<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0 +DATA/ORA<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="11" unitname="g">11G</st1:chmetcnv>/DATAFILE/UNDOTBS1.258.747310451<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR"><span style="mso-spacerun: yes">&nbsp;&nbsp; </span>4<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>4<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>4<span style="mso-spacerun: yes">&nbsp; </span>8192<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>4960 N<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0 +DATA/ORA<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="11" unitname="g">11G</st1:chmetcnv>/DATAFILE/USERS.259.747310451<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">load control file &#8216;oductl.dat&#8217; successful<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">loading dictionary data&#8230;&#8230;done<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">loading scanned data&#8230;&#8230;done<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">ODU&gt; asmcmd<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Entering asmcmd module.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">注意：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">ODU</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的最新版本中</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">extract</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">命令已被</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">copy</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">命令替换了：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">ASMCMD&gt; <b style="mso-bidi-font-weight: normal"><span style="color: blue">extract asmfile +DATA/ORA<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="11" unitname="g">11G</st1:chmetcnv>/DATAFILE/USERS.259.747310451 to /u01/app/oracle/odu/amdu_2012_02_23_11_21_34/user01.dbf<o:p></o:p></span></b></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">starting extract asm file &#8216;+DATA/ORA<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="11" unitname="g">11G</st1:chmetcnv>/DATAFILE/USERS.259.747310451&#8242; to &#8216;/u01/app/oracle/odu/amdu_2012_02_23_11_21_34/user01.dbf&#8217;,file size is 40640512<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">asm file extract completed.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">ASMCMD&gt; exit<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Exiting asmcmd module.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: fr" lang="FR">[root@bspdev odu]# cd amdu_2012_02_23_11_21_34<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: fr" lang="FR">[root@bspdev amdu_2012_02_23_11_21_34]# ls -lrt<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: fr" lang="FR">total 79476<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">-rw-r&#8211;r&#8211;. 1 root root<span style="mso-spacerun: yes">&nbsp; </span><span style="mso-spacerun: yes">&nbsp;&nbsp; </span>8600 Feb 23 11:21 report.txt<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">-rw-r&#8211;r&#8211;. 1 root root <b style="mso-bidi-font-weight: normal">40640512</b> Feb 23 11:21 DATA_259.f<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">-rw-r&#8211;r&#8211;. 1 root root <b style="mso-bidi-font-weight: normal">40640512</b> Feb 23 11:27 user01.dbf<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">从结果里可以看到，两者大小一模一样。</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">从</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">dbv</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">校验的结果来看，两者内容也是一模一样：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">[oracle@bspdev ~]$ dbv file=/u01/app/oracle/odu/amdu_2012_02_23_11_21_34/DATA_259.f blocksize=8192<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">DBVERIFY: Release <st1:chsdate w:st="on" isrocdate="False" islunardate="False" day="30" month="12" year="1899">11.2.0</st1:chsdate>.1.0 &#8211; Production on Thu Feb 23 11:29:50 2012<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Copyright (c) 1982, 2009, Oracle and/or its affiliates.<span style="mso-spacerun: yes">&nbsp; </span>All rights reserved.<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">DBVERIFY &#8211; Verification starting : FILE = /u01/app/oracle/odu/amdu_2012_02_23_11_21_34/DATA_259.f<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">DBVERIFY &#8211; Verification complete<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Total Pages Examined<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>: 4960<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Total Pages Processed (Data) : 4442<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Total Pages Failing<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>(Data) : 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Total Pages Processed (Index): 33<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Total Pages Failing<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>(Index): 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Total Pages Processed (Other): 334<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Total Pages Processed (Seg)<span style="mso-spacerun: yes">&nbsp; </span>: 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Total Pages Failing<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>(Seg)<span style="mso-spacerun: yes">&nbsp; </span>: 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Total Pages Empty<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>: 151<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Total Pages Marked Corrupt<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>: 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Total Pages Influx<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>: 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Total Pages Encrypted<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>: 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Highest block SCN<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>: 2132237218 (1932.2132237218)<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">[oracle@bspdev ~]$ dbv file=/u01/app/oracle/odu/amdu_2012_02_23_11_21_34/user01.dbf blocksize=8192<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">DBVERIFY: Release <st1:chsdate w:st="on" isrocdate="False" islunardate="False" day="30" month="12" year="1899">11.2.0</st1:chsdate>.1.0 &#8211; Production on Thu Feb 23 11:30:11 2012<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Copyright (c) 1982, 2009, Oracle and/or its affiliates.<span style="mso-spacerun: yes">&nbsp; </span>All rights reserved.<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">DBVERIFY &#8211; Verification starting : FILE = /u01/app/oracle/odu/amdu_2012_02_23_11_21_34/user01.dbf<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">DBVERIFY &#8211; Verification complete<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Total Pages Examined<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>: 4960<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Total Pages Processed (Data) : 4442<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Total Pages Failing<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>(Data) : 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Total Pages Processed (Index): 33<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Total Pages Failing<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>(Index): 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Total Pages Processed (Other): 334<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Total Pages Processed (Seg)<span style="mso-spacerun: yes">&nbsp; </span>: 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: fr" lang="FR">Total Pages Failing<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>(Seg)<span style="mso-spacerun: yes">&nbsp; </span>: 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: fr" lang="FR">Total Pages Empty<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>: 151<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: fr" lang="FR">Total Pages Marked Corrupt<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>: 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: fr" lang="FR">Total Pages Influx<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>: 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: fr" lang="FR">Total Pages Encrypted<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>: 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Highest block SCN<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>: 2132237218 (1932.2132237218)<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dbsnake.net/amdu-extract-asm-files-from-unmount-diskgroup.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>大师这一次是真的错了</title>
		<link>http://www.dbsnake.net/jonathan-lewis-latch-level-mistake.html</link>
		<comments>http://www.dbsnake.net/jonathan-lewis-latch-level-mistake.html#comments</comments>
		<pubDate>Mon, 13 Feb 2012 06:50:56 +0000</pubDate>
		<dc:creator>Cui Hua</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.dbsnake.net/?p=55</guid>
		<description><![CDATA[Jonathan Lewis在他的新书《Oracle Core Essential Internals for DBAs and Developers》的第116页这样描述到： SQL&#62; select&#160;&#160;&#160;&#160; name, level# &#160; 2&#160; from&#160;&#160;&#160;&#160;&#160;&#160; v$latch &#160; 3&#160; where&#160;&#160;&#160;&#160;&#160; name in (&#8216;cache buffers lru chain&#8217;,'cache buffers chains&#8217;) &#160; 4&#160; / &#160; NAME&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; LEVEL# &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;- cache buffers lru chain&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 2 cache buffers chains&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 1 &#160; 2 rows selected. &#160; The cache buffers chains latch [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Jonathan Lewis</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">在他的新书《</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Oracle Core Essential Internals for DBAs and Developers</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">》的第</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">116</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">页这样描述到：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><?xml:namespace prefix = o /><o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; select<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>name, level# <o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp; </span>2<span style="mso-spacerun: yes">&nbsp; </span>from<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>v$latch <o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp; </span>3<span style="mso-spacerun: yes">&nbsp; </span>where<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>name in (&#8216;cache buffers lru chain&#8217;,'cache buffers chains&#8217;) <o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp; </span>4<span style="mso-spacerun: yes">&nbsp; </span>/ <o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;</span><o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">NAME<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>LEVEL# <o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;- <o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">cache buffers lru chain<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>2 <o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">cache buffers chains<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>1 <o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;</span><o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">2 rows selected. <o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: red; font-size: 10pt" lang="EN-US">The cache buffers chains latch has a lower level than the cache buffers lru chain latch, so we can’t request the cache buffers lru chain latch in willing-to-wait mode if we’re already holding the cache buffers chains latch</span></b><span style="font-family: arial; font-size: 10pt" lang="EN-US">. Think about what this means: we’re holding the cache buffers chains latch (which I will call the hash latch for the rest of this subsection) because we’ve just searched the hash chain for a buffer and discovered that, for whatever reason, we need to add another buffer to the chain. So we have to acquire the cache buffers lru chain latch (which I will call the lru latch for the rest of this subsection) to move a buffer from the REPL_AUX list to the midpoint of the REPL_MAIN list; <b style="mso-bidi-font-weight: normal"><span style="color: red">but we can’t request it in willing-to-wait mode because we’re already holding a lower-level latch.</span></b> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">大师这里提到了说在持有</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">cache buffers chains latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的情况下</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Oracle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">不可能再去持有</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">cache buffers lru chain latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，因为</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">cache buffers lru chain</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">latch level</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">比</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">cache buffers chains</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">latch level</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">要大。</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">事实上是：<b style="mso-bidi-font-weight: normal">大师这里刚好搞反了，这是</b></span><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">latch level</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">最基本的常识啊</span></b><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，我希望大师在这里用了不少篇幅解释的观点只是他的笔误。</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">我们来证明一下。<b style="mso-bidi-font-weight: normal">我只需证明</b></span><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Oracle</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">在持有</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">cache buffers chains latch</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，并且没有释放的情况下会去持有</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">cache buffers lru chain latch</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">即可证明</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Jonathan</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">在这个点上犯了常识性的错误</span></b><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">。</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">先来普及一下在</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Oracle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">里如何手工持有一个</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">——要么用</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">oradebug poke</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，要么用</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">oradebug call</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Connected to Oracle Database <?xml:namespace prefix = st1 /><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="11" unitname="g">11g</st1:chmetcnv> <st1:city w:st="on"><st1:place w:st="on">Enterprise</st1:place></st1:city> Edition Release <st1:chsdate w:st="on" isrocdate="False" islunardate="False" day="30" month="12" year="1899">11.2.0</st1:chsdate>.1.0 <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Connected as SYS<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; select count(*) from v$latch_children where name = &#8216;cache buffers lru chain&#8217;;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp; </span>COUNT(*)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">&#8212;&#8212;&#8212;-<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>32<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; select count(*) from v$latch_children where name = &#8216;cache buffers chains&#8217;;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp; </span>COUNT(*)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">&#8212;&#8212;&#8212;-<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>4096<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; select name,level# from v$latch where name in (&#8216;cache buffers lru chain&#8217;,'cache buffers chains&#8217;);<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">NAME<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>LEVEL#<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">cache buffers lru chain<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>2<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">cache buffers chains<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>1<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; select * from (select addr,to_number(addr,&#8217;XXXXXXXXXXXX&#8217;),gets,misses from v$latch_children where name = &#8216;cache buffers lru chain&#8217; order by addr desc) where rownum&lt;5;<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">ADDR<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>TO_NUMBER(ADDR,&#8217;XXXXXXXXXXXX&#8217;)<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>GETS<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>MISSES<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl" lang="NL">&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: blue; font-size: 10pt; mso-ansi-language: nl" lang="NL">3497DE<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="1" unitname="C">1C</st1:chmetcnv><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>882368028<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0<o:p></o:p></span></b></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl" lang="NL">3497DD94<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>882367892<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>10<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl" lang="NL">3497D974<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>882366836<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl" lang="NL">3497D8EC<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>882366700<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>10<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl" lang="NL"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl">现在我先看一下</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl" lang="NL">latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl">地址为</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl" lang="NL">3497DE<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="1" unitname="C">1C</st1:chmetcnv></span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl">的</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl" lang="NL">cache buffers lru chain latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl">：</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl" lang="NL"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl" lang="NL">SQL&gt; oradebug peek 0x3497DE<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="1" unitname="C">1C</st1:chmetcnv> 300<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">[3497DE<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="1" unitname="C">1C</st1:chmetcnv>, 3497DF48) = 00000000 00000000 00000091 00000002 00000000 00000000 000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">00000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ...<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">我开始调用</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">kslgetl</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">去持有上述</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; oradebug call kslgetl 882368028 1<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Function returned 1<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">持有完毕后再去看一下上述</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，可以看到我用红色标注的地方已经被</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Oracle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">改了：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; oradebug peek 0x3497DE<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="1" unitname="C">1C</st1:chmetcnv> 300<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">[3497DE<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="1" unitname="C">1C</st1:chmetcnv>, 3497DF48) =<b style="mso-bidi-font-weight: normal"><span style="color: red"> 00000014 00000001</span></b> 00000091 00000002 <b style="mso-bidi-font-weight: normal"><span style="color: red">00000001</span></b><span style="color: red"> <b style="mso-bidi-font-weight: normal">0D45D417</b></span> 000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">00000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ...<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">现在我释放上述</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; oradebug call kslfre 882368028<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Function returned F0E8358<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">释放完毕后再去看一下上述</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，可以看到我用红色标注的前</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">4</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">个</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">byte</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">又被</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Oracle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">改回来了：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; oradebug peek 0x3497DE<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="1" unitname="C">1C</st1:chmetcnv> 300<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">[3497DE<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="1" unitname="C">1C</st1:chmetcnv>, 3497DF48) = <b style="mso-bidi-font-weight: normal"><span style="color: red">00000000</span></b> 00000001 00000091 00000002 00000001 0D45D417 000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">00000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ...<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">因为我刚才手工持有、释放了一次</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">cache buffers lru chain latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，所以现在这个</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">willing to wait</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">模式的</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">gets</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的值从</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">0</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">变成了</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; select * from (select addr,to_number(addr,'XXXXXXXXXXXX'),gets,misses from v$latch_children where name = 'cache buffers lru chain' order by addr desc) where rownum&lt;5;<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">ADDR<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>TO_NUMBER(ADDR,'XXXXXXXXXXXX')<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>GETS<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>MISSES<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">-------- ------------------------------ ---------- ----------<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: blue; font-size: 10pt" lang="EN-US">3497DE<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="1" unitname="C">1C</st1:chmetcnv><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>882368028<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>1<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0<o:p></o:p></span></b></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">3497DD94<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>882367892<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>10<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">3497D974<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>882366836<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">3497D8EC<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>882366700<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>10<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">准备工作已经做好，现在我们开始反证的过程。</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">我们反证的思路是：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">我同时开</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">3</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">个</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session 1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">中先持有所有的</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">cache buffers lru chain latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">在</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session 1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">持有完所有的</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">cache buffers lru chain latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">后去执行</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">update</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">操作，这个时候</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">一定会</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">hang</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">住，同时我们在</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session 3</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">中去做</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">process dump</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，从</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session 3</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">dump</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">文件中即可看到</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">中的</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">持有与等待的情况。</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">先分别到</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">、</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">、</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session 3</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">中做一下准备工作：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: blue; font-size: 10pt" lang="EN-US">Session 1</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; color: blue; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">：</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: blue; font-size: 10pt" lang="EN-US"><o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; select 'oradebug poke 0x' || addr || ' 4 0x00000001' from v$latch_children where name = 'cache buffers lru chain';<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">'ORADEBUGPOKE0X'||ADDR||'40X00<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">-------------------------------------<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">oradebug poke 0x3497DE<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="1" unitname="C">1C</st1:chmetcnv> 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">oradebug poke 0x3497DD94 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">oradebug poke 0x3497D974 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">oradebug poke 0x3497D8EC 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">oradebug poke 0x<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="349710" unitname="a">349710A</st1:chmetcnv>4 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">oradebug poke 0x<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3497101" unitname="C">3497101C</st1:chmetcnv> 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">oradebug poke 0x34970BFC 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">oradebug poke 0x34970B74 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">oradebug poke 0x<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3496432" unitname="C">3496432C</st1:chmetcnv> 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">oradebug poke 0x<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="349642" unitname="a">349642A</st1:chmetcnv>4 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">oradebug poke 0x34963E84 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">oradebug poke 0x34963DFC 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">oradebug poke 0x349575B4 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">oradebug poke 0x<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3495752" unitname="C">3495752C</st1:chmetcnv> 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">oradebug poke 0x<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3495710" unitname="C">3495710C</st1:chmetcnv> 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">oradebug poke 0x34957084 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">oradebug poke 0x<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3494" unitname="a">3494A</st1:chmetcnv><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="83" unitname="C">83C</st1:chmetcnv> 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">oradebug poke 0x<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3494" unitname="a">3494A</st1:chmetcnv>7B4 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">oradebug poke 0x<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3494" unitname="a">3494A</st1:chmetcnv>394 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">oradebug poke 0x<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3494" unitname="a">3494A</st1:chmetcnv><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="30" unitname="C">30C</st1:chmetcnv> 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">oradebug poke 0x3493DAC4 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">oradebug poke 0x3493DA<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3" unitname="C">3C</st1:chmetcnv> 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">oradebug poke 0x3493D<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="61" unitname="C">61C</st1:chmetcnv> 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">oradebug poke 0x3493D594 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">oradebug poke 0x34930D<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="4" unitname="C">4C</st1:chmetcnv> 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">oradebug poke 0x34930CC4 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">oradebug poke 0x<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="349308" unitname="a">349308A</st1:chmetcnv>4 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">oradebug poke 0x<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3493081" unitname="C">3493081C</st1:chmetcnv> 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">oradebug poke 0x34923FD4 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">oradebug poke 0x<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="34923" unitname="F">34923F</st1:chmetcnv><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="4" unitname="C">4C</st1:chmetcnv> 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">oradebug poke 0x34923B<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="2" unitname="C">2C</st1:chmetcnv> 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">oradebug poke 0x34923AA4 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">32 rows selected<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: blue; font-size: 10pt" lang="EN-US">Session 2</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; color: blue; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">：</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: blue; font-size: 10pt" lang="EN-US"><o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; select sid from v$mystat where rownum=1;<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>SID<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">----------<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>138<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; select spid from v$process where addr in (select paddr from v$session where<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;</span>sid=138);<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SPID<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">------------------------<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">5356<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: blue; font-size: 10pt" lang="EN-US">Session 3:<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; oradebug setospid 5356<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Oracle pid: 25, Windows thread id: 5356, image: ORACLE.EXE (SHAD)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">准备工作已经做完，现在我们先去</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session 1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">中去持有所有的</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">cache buffers lru chain latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: blue; font-size: 10pt; mso-ansi-language: da" lang="DA">Session 1</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; color: blue; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: da">：</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: blue; font-size: 10pt; mso-ansi-language: da" lang="DA"><o:p></o:p></span></b></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da" lang="DA">SQL&gt; oradebug poke 0x3497DE<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="1" unitname="C">1C</st1:chmetcnv> 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da" lang="DA">BEFORE: [3497DE<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="1" unitname="C">1C</st1:chmetcnv>, 3497DE20) = 00000000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da" lang="DA">AFTER:<span style="mso-spacerun: yes">&nbsp; </span>[3497DE<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="1" unitname="C">1C</st1:chmetcnv>, 3497DE20) = 00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da" lang="DA">SQL&gt; oradebug poke 0x3497DD94 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da" lang="DA">BEFORE: [3497DD94, 3497DD98) = 00000000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">AFTER:<span style="mso-spacerun: yes">&nbsp; </span>[3497DD94, 3497DD98) = 00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; oradebug poke 0x3497D974 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">BEFORE: [3497D974, 3497D978) = 00000000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">AFTER:<span style="mso-spacerun: yes">&nbsp; </span>[3497D974, 3497D978) = 00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; oradebug poke 0x3497D8EC 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">BEFORE: [3497D8EC, 3497D<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="8" unitname="F">8F</st1:chmetcnv>0) = 00000000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">AFTER:<span style="mso-spacerun: yes">&nbsp; </span>[3497D8EC, 3497D<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="8" unitname="F">8F</st1:chmetcnv>0) = 00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; oradebug poke 0x<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="349710" unitname="a">349710A</st1:chmetcnv>4 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">BEFORE: [<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="349710" unitname="a">349710A</st1:chmetcnv>4, <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="349710" unitname="a">349710A</st1:chmetcnv> <img src='http://www.dbsnake.net/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> = 00000000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">AFTER:<span style="mso-spacerun: yes">&nbsp; </span>[<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="349710" unitname="a">349710A</st1:chmetcnv>4, <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="349710" unitname="a">349710A</st1:chmetcnv> <img src='http://www.dbsnake.net/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> = 00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; oradebug poke 0x<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3497101" unitname="C">3497101C</st1:chmetcnv> 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">BEFORE: [<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3497101" unitname="C">3497101C</st1:chmetcnv>, 34971020) = 00000000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">AFTER:<span style="mso-spacerun: yes">&nbsp; </span>[<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3497101" unitname="C">3497101C</st1:chmetcnv>, 34971020) = 00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; oradebug poke 0x34970BFC 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">BEFORE: [34970BFC, <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="34970" unitname="C">34970C</st1:chmetcnv>00) = 00000000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">AFTER:<span style="mso-spacerun: yes">&nbsp; </span>[34970BFC, <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="34970" unitname="C">34970C</st1:chmetcnv>00) = 00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; oradebug poke 0x34970B74 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">BEFORE: [34970B74, 34970B78) = 00000000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">AFTER: <span style="mso-spacerun: yes">&nbsp;</span>[34970B74, 34970B78) = 00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; oradebug poke 0x<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3496432" unitname="C">3496432C</st1:chmetcnv> 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">BEFORE: [<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3496432" unitname="C">3496432C</st1:chmetcnv>, 34964330) = 00000000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">AFTER:<span style="mso-spacerun: yes">&nbsp; </span>[<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3496432" unitname="C">3496432C</st1:chmetcnv>, 34964330) = 00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; oradebug poke 0x<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="349642" unitname="a">349642A</st1:chmetcnv>4 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">BEFORE: [<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="349642" unitname="a">349642A</st1:chmetcnv>4, <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="349642" unitname="a">349642A</st1:chmetcnv> <img src='http://www.dbsnake.net/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> = 00000000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">AFTER:<span style="mso-spacerun: yes">&nbsp; </span>[<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="349642" unitname="a">349642A</st1:chmetcnv>4, <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="349642" unitname="a">349642A</st1:chmetcnv> <img src='http://www.dbsnake.net/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> = 00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">SQL&gt; oradebug poke 0x34963E84 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">BEFORE: [34963E84, 34963E88) = 00000000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">AFTER:<span style="mso-spacerun: yes">&nbsp; </span>[34963E84, 34963E88) = 00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">SQL&gt; oradebug poke 0x34963DFC 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">BEFORE: [34963DFC, 34963E00) = 00000000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">AFTER:<span style="mso-spacerun: yes">&nbsp; </span>[34963DFC, 34963E00) = 00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; oradebug poke 0x349575B4 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">BEFORE: [349575B4, 349575B8) = 00000000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">AFTER:<span style="mso-spacerun: yes">&nbsp; </span>[349575B4, 349575B8) = 00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; oradebug poke 0x<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3495752" unitname="C">3495752C</st1:chmetcnv> 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">BEFORE: [<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3495752" unitname="C">3495752C</st1:chmetcnv>, 34957530) = 00000000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">AFTER:<span style="mso-spacerun: yes">&nbsp; </span>[<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3495752" unitname="C">3495752C</st1:chmetcnv>, 34957530) = 00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; oradebug poke 0x<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3495710" unitname="C">3495710C</st1:chmetcnv> 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">BEFORE: [<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3495710" unitname="C">3495710C</st1:chmetcnv>, 34957110) = 00000000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">AFTER:<span style="mso-spacerun: yes">&nbsp; </span>[<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3495710" unitname="C">3495710C</st1:chmetcnv>, 34957110) = 00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; oradebug poke 0x34957084 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">BEFORE: [34957084, 34957088) = 00000000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">AFTER:<span style="mso-spacerun: yes">&nbsp; </span>[34957084, 34957088) = 00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; oradebug poke 0x<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3494" unitname="a">3494A</st1:chmetcnv><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="83" unitname="C">83C</st1:chmetcnv> 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">BEFORE: [<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3494" unitname="a">3494A</st1:chmetcnv><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="83" unitname="C">83C</st1:chmetcnv>, <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3494" unitname="a">3494A</st1:chmetcnv>840) = 00000000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">AFTER:<span style="mso-spacerun: yes">&nbsp; </span>[<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3494" unitname="a">3494A</st1:chmetcnv><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="83" unitname="C">83C</st1:chmetcnv>, <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3494" unitname="a">3494A</st1:chmetcnv>840) = 00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; oradebug poke 0x<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3494" unitname="a">3494A</st1:chmetcnv>7B4 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">BEFORE: [<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3494" unitname="a">3494A</st1:chmetcnv>7B4, <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3494" unitname="a">3494A</st1:chmetcnv>7B8) = 00000000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">AFTER:<span style="mso-spacerun: yes">&nbsp; </span>[<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3494" unitname="a">3494A</st1:chmetcnv>7B4, <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3494" unitname="a">3494A</st1:chmetcnv>7B8) = 00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; oradebug poke 0x<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3494" unitname="a">3494A</st1:chmetcnv>394 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">BEFORE: [<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3494" unitname="a">3494A</st1:chmetcnv>394, <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3494" unitname="a">3494A</st1:chmetcnv>398) = 00000000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">AFTER:<span style="mso-spacerun: yes">&nbsp; </span>[<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3494" unitname="a">3494A</st1:chmetcnv>394, <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3494" unitname="a">3494A</st1:chmetcnv>398) = 00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; oradebug poke 0x<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3494" unitname="a">3494A</st1:chmetcnv><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="30" unitname="C">30C</st1:chmetcnv> 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">BEFORE: [<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3494" unitname="a">3494A</st1:chmetcnv><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="30" unitname="C">30C</st1:chmetcnv>, <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3494" unitname="a">3494A</st1:chmetcnv>310) = 00000000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">AFTER:<span style="mso-spacerun: yes">&nbsp; </span>[<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3494" unitname="a">3494A</st1:chmetcnv><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="30" unitname="C">30C</st1:chmetcnv>, <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3494" unitname="a">3494A</st1:chmetcnv>310) = 00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; oradebug poke 0x3493DAC4 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">BEFORE: [3493DAC4, 3493DAC8) = 00000000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">AFTER:<span style="mso-spacerun: yes">&nbsp; </span>[3493DAC4, 3493DAC8) = 00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">SQL&gt; oradebug poke 0x3493DA<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3" unitname="C">3C</st1:chmetcnv> 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">BEFORE: [3493DA<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3" unitname="C">3C</st1:chmetcnv>, 3493DA40) = 00000000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">AFTER:<span style="mso-spacerun: yes">&nbsp; </span>[3493DA<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3" unitname="C">3C</st1:chmetcnv>, 3493DA40) = 00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">SQL&gt; oradebug poke 0x3493D<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="61" unitname="C">61C</st1:chmetcnv> 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">BEFORE: [3493D<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="61" unitname="C">61C</st1:chmetcnv>, 3493D620) = 00000000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">AFTER:<span style="mso-spacerun: yes">&nbsp; </span>[3493D<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="61" unitname="C">61C</st1:chmetcnv>, 3493D620) = 00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; oradebug poke 0x3493D594 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">BEFORE: [3493D594, 3493D598) = 00000000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">AFTER:<span style="mso-spacerun: yes">&nbsp; </span>[3493D594, 3493D598) = 00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; oradebug poke 0x34930D<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="4" unitname="C">4C</st1:chmetcnv> 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">BEFORE: [34930D<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="4" unitname="C">4C</st1:chmetcnv>, 34930D50) = 00000000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">AFTER:<span style="mso-spacerun: yes">&nbsp; </span>[34930D<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="4" unitname="C">4C</st1:chmetcnv>, 34930D50) = 00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; oradebug poke 0x34930CC4 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">BEFORE: [34930CC4, 34930CC8) = 00000000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">AFTER:<span style="mso-spacerun: yes">&nbsp; </span>[34930CC4, 34930CC8) = 00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; oradebug poke 0x<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="349308" unitname="a">349308A</st1:chmetcnv>4 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">BEFORE: [<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="349308" unitname="a">349308A</st1:chmetcnv>4, <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="349308" unitname="a">349308A</st1:chmetcnv> <img src='http://www.dbsnake.net/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> = 00000000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">AFTER:<span style="mso-spacerun: yes">&nbsp; </span>[<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="349308" unitname="a">349308A</st1:chmetcnv>4, <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="349308" unitname="a">349308A</st1:chmetcnv> <img src='http://www.dbsnake.net/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> = 00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; oradebug poke 0x<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3493081" unitname="C">3493081C</st1:chmetcnv> 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">BEFORE: [<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3493081" unitname="C">3493081C</st1:chmetcnv>, 34930820) = 00000000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">AFTER:<span style="mso-spacerun: yes">&nbsp; </span>[<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3493081" unitname="C">3493081C</st1:chmetcnv>, 34930820) = 00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; oradebug poke 0x34923FD4 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">BEFORE: [34923FD4, 34923FD8) = 00000000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">AFTER:<span style="mso-spacerun: yes">&nbsp; </span>[34923FD4, 34923FD8) = 00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; oradebug poke 0x<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="34923" unitname="F">34923F</st1:chmetcnv><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="4" unitname="C">4C</st1:chmetcnv> 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">BEFORE: [<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="34923" unitname="F">34923F</st1:chmetcnv><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="4" unitname="C">4C</st1:chmetcnv>, <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="34923" unitname="F">34923F</st1:chmetcnv>50) = 00000000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">AFTER:<span style="mso-spacerun: yes">&nbsp; </span>[<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="34923" unitname="F">34923F</st1:chmetcnv><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="4" unitname="C">4C</st1:chmetcnv>, <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="34923" unitname="F">34923F</st1:chmetcnv>50) = 00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; oradebug poke 0x34923B<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="2" unitname="C">2C</st1:chmetcnv> 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">BEFORE: [34923B<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="2" unitname="C">2C</st1:chmetcnv>, 34923B30) = 00000000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">AFTER:<span style="mso-spacerun: yes">&nbsp; </span>[34923B<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="2" unitname="C">2C</st1:chmetcnv>, 34923B30) = 00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; oradebug poke 0x34923AA4 4 0x00000001<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">BEFORE: [34923AA4, 34923AA8) = 00000000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">AFTER:<span style="mso-spacerun: yes">&nbsp; </span>[34923AA4, 34923AA8) = 00000001<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">接着我们到</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">去随便执行一条</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">update</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">语句，这个一定会</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">hang</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">住的：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: blue; font-size: 10pt" lang="EN-US">Session 2</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; color: blue; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">：</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: blue; font-size: 10pt" lang="EN-US"><o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; update scott.emp set ename='CUIHUA2' where empno=7369;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">……这里</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">hang</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">住了</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">接着我们到</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session 3</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">中去对</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">做一下</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">process dump</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: blue; font-size: 10pt" lang="EN-US">Session 3</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; color: blue; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">：</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: blue; font-size: 10pt" lang="EN-US"><o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; oradebug dump processstate 10<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">已处理的语句</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; oradebug tracefile_name<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">c:\app\cuihua\diag\rdbms\cuihua112\cuihua112\trace\cuihua112_ora_5356.trc<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br">最后我们看一下上述</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">trace</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: pt-br">文件：</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR"><o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">Trace file c:\app\cuihua\diag\rdbms\cuihua112\cuihua112\trace\cuihua112_ora_5356.trc<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Oracle Database <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="11" unitname="g">11g</st1:chmetcnv> <st1:city w:st="on"><st1:place w:st="on">Enterprise</st1:place></st1:city> Edition Release <st1:chsdate w:st="on" isrocdate="False" islunardate="False" day="30" month="12" year="1899">11.2.0</st1:chsdate>.1.0 - Production<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">With the Partitioning, OLAP, Data Mining and Real Application Testing options<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Windows XP Version V5.1 Service Pack 2 <o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">CPU<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>: 2 - type 586<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Process Affinity<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>: 0x0x00000000<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Memory (Avail/Total): Ph:<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="654" unitname="m">654M</st1:chmetcnv>/<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="2030" unitname="m">2030M</st1:chmetcnv>, Ph+PgF:<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="1907" unitname="m">1907M</st1:chmetcnv>/<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3921" unitname="m">3921M</st1:chmetcnv>, VA:<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="1143" unitname="m">1143M</st1:chmetcnv>/<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="2047" unitname="m">2047M</st1:chmetcnv> <o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Instance name: cuihua112<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Redo thread mounted by this instance: 1<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Oracle process number: 25<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Windows thread id: 5356, image: ORACLE.EXE (SHAD)<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">*** 2012-02-13 13:41:39.859<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">*** SESSION ID:(138.8) 2012-02-13 13:41:39.859<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">*** CLIENT ID:() 2012-02-13 13:41:39.859<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">*** SERVICE NAME:(SYS$USERS) 2012-02-13 13:41:39.859<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">*** MODULE NAME:(sqlplus.exe) 2012-02-13 13:41:39.859<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">*** ACTION NAME:() 2012-02-13 13:41:39.859<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;</span><o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Received ORADEBUG command (#1) 'dump processstate 10' from process 'Windows thread id: 2664, image: &lt;none&gt;'<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">===================================================<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><st1:place w:st="on"><st1:placename w:st="on"><span style="font-family: arial; font-size: 10pt" lang="EN-US">PROCESS</span></st1:placename><span style="font-family: arial; font-size: 10pt" lang="EN-US"> <st1:placetype w:st="on">STATE</st1:placetype></span></st1:place><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">-------------<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Process global information:<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>process: 0x35483BE4, call: 0x357D<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="43" unitname="F">43F</st1:chmetcnv>0, xact: 0x00000000, curses: 0x357580BC, usrses: 0x357684FC<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp; </span>----------------------------------------<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp; </span>SO: 0x35483BE4, type: 2, owner: 0x00000000, flag: INIT/-/-/0x00 if: 0x<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="True" sourcevalue="3" unitname="C">3 c</st1:chmetcnv>: 0x3<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp; </span>proc=0x35483BE4, name=process, file=ksu.h LINE:11459, pg=0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp; </span>(process) Oracle pid:25, ser:4, calls cur/top: 0x357D<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="43" unitname="F">43F</st1:chmetcnv>0/0x357D1130<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da" lang="DA">flags : (0x0) -<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da" lang="DA"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>flags2: (0x0),<span style="mso-spacerun: yes">&nbsp; </span>flags3: (0x0) <o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: da" lang="DA"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: arial; font-size: 10pt" lang="EN-US">intr error: 0, call error: 0, sess error: 0, txn error 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>intr queue: empty<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp; </span>ksudlp FALSE at location: 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp; </span>(post info) last post received: 0 0 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>last post received-location: No post<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>last process to post me: none<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>last post sent: 0 0 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>last post sent-location: No post<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>last process posted by me: none<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>(latch info) wait_event=0 bits=2<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Location from where call was made: kcb2.h LINE:3601 ID:kcbzgws: <o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b style="mso-bidi-font-weight: normal"><span style="color: red">waiting for 3493da<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3" unitname="C">3c</st1:chmetcnv> Child cache buffers lru chain level=2 child#=11 <o:p></o:p></span></b></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Location from where latch is held: kcbb.h LINE:2063 ID:kcbbic2: <o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Context saved from call: 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>state=busy [holder orapid=1] wlstate=free [value=0]<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>waiters [orapid (seconds since: put on list, posted, alive check)]:<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>31 (34, 1329111699, 34)<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>25 (27, 1329111699, 27)<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>waiter count=2<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>gotten 465 times wait, failed first 0 sleeps 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>gotten 13848 times nowait, failed: 4<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>possible holder pid = 1 ospid=<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>on wait list for 3493da<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3" unitname="C">3c</st1:chmetcnv><o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span><b style="mso-bidi-font-weight: normal"><span style="color: red"><span style="mso-spacerun: yes">&nbsp;</span>holding<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>(efd=23) <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="34848" unitname="C">34848c</st1:chmetcnv>10 Child cache buffers chains level=1 child#=2313 <o:p></o:p></span></b></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Location from where latch is held: kcb2.h LINE:3034 ID:kcbgtcr: kslbegin shared: <o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Context saved from call: 4265585<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>state=busy(exclusive) [value=0x20000019, holder orapid=25] wlstate=free [value=0]<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">Process Group: DEFAULT, pseudo proc: 0x354E2458<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: arial; font-size: 10pt" lang="EN-US">O/S info: user: SYSTEM, term: Y8908CUIHUA, ospid: 5356 <o:p></o:p></span></p>
<p style="text-indent: 21pt; background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">OSD pid info: Windows thread id: 5356, image: ORACLE.EXE (SHAD)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">从</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">trace</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">文件里红色标注的部分我们可以看到：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: red; font-size: 10pt" lang="EN-US">waiting for 3493da<st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="3" unitname="C">3c</st1:chmetcnv> Child cache buffers lru chain level=2 child#=11</span></b><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: red; font-size: 10pt" lang="EN-US">holding<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>(efd=23) <st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="34848" unitname="C">34848c</st1:chmetcnv>10 Child cache buffers chains level=1 child#=2313<o:p></o:p></span></b></p>
<p style="text-indent: 21pt" class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: red; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></b></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">即</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Oracle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">是在持有了</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">cache buffers chains latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的情况下（注意这里是</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">holding</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，意味着</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Oracle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">并没有释放，是正在持有）去持有</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">cache buffers lru chain latch</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">。</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">所以大师这次是真的错了。</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dbsnake.net/jonathan-lewis-latch-level-mistake.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>关于timestamp with local time zone</title>
		<link>http://www.dbsnake.net/about_timestamp_with_local_time_zone.html</link>
		<comments>http://www.dbsnake.net/about_timestamp_with_local_time_zone.html#comments</comments>
		<pubDate>Wed, 01 Feb 2012 09:58:54 +0000</pubDate>
		<dc:creator>Cui Hua</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.dbsnake.net/?p=54</guid>
		<description><![CDATA[有朋友问我：Oracle数据迁移时源库和目标库的时区不一样，这对于迁移数据而言是否有影响？ 这个是没有影响的。   Oracle里跟时区有关的数据类型有两种，分别是timestamp with time zone和timestamp with local time zone，Oracle分别用13个byte和11个byte来存储他们。 这里面timestamp with time zone没什么好说的，因为里面的时区是用2个byte来固定的存储时区的偏移量，所以源库和目标库的时区即使不一样，对原始数据也没有影响。   timestamp with local time zone跟timestamp with time zone最大的区别就是timestamp with local time zone不会具体存储时区的偏移量，而是会根据dbtimezone和用户插入数据时指定的时区（通常就等于sessiontimezone）之间的差值来调整所存储的时间：   我们来看一个实例： 先来看数据库1： 数据库1： SQL&#62; select dbtimezone from dual;   DBTIMEZONE &#8212;&#8212;&#8212;- +08:00   SQL&#62; select systimestamp from dual;   SYSTIMESTAMP &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; 01-2月 -12 04.15.54.224786 下午 +08:00 [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">有朋友问我：</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">数据迁移时源库和目标库的时区不一样，这对于迁移数据而言是否有影响？</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">这个是没有影响的。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">里跟时区有关的数据类型有两种，分别是</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">timestamp with time zone</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">和</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">timestamp with local time zone</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">分别用</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">13</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">个</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">byte</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">和</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">11</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">个</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">byte</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">来存储他们。</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">这里面</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">timestamp with time zone</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">没什么好说的，因为里面的时区是用</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">个</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">byte</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">来固定的存储时区的偏移量，所以源库和目标库的时区即使不一样，对原始数据也没有影响。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">timestamp with local time zone</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">跟</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">timestamp with time zone</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">最大的区别就是</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">timestamp with local time zone</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">不会具体存储时区的偏移量，而是会根据</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">dbtimezone</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">和用户插入数据时指定的时区（通常就等于</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">sessiontimezone</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">）之间的差值来调整所存储的时间</span></strong><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: blue; font-size: 10pt;" lang="EN-US"> </span></strong></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">我们来看一个实例：</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">先来看数据库</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; color: blue; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">数据库</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: blue; font-size: 10pt;" lang="EN-US">1</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; color: blue; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></strong><strong style="mso-bidi-font-weight: normal;"></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select dbtimezone from dual;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">DBTIMEZONE</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: red; font-size: 10pt;" lang="EN-US">+08:00</span></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select systimestamp from dual;</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SYSTIMESTAMP</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">01-2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">月</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> -12 04.15.54.224786 </span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">下午</span><span style="font-family: arial; font-size: 10pt;"> <span lang="EN-US">+08:00</span></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select sessiontimezone from dual;</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SESSIONTIMEZONE</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">+08:00</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">现在这个库的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">systimestamp</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">中包含的时区和</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">dbtimezone</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">相同，所以当我插入</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">systimestamp</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的时候，</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Oracle </span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">不会对</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">timestamp with local time zone</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">做时间上的调整：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; create table t2(col1 timestamp with local time zone);</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Table created</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; insert into t2 values(systimestamp);</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">1 row inserted</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; commit;</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Commit complete</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select col1,dump(col1) from t2;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">COL1<span style="mso-spacerun: yes;">                                               </span>DUMP(COL1)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<span style="mso-spacerun: yes;">       </span>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">01-2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">月</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL"> -12<strong style="mso-bidi-font-weight: normal;"> 04<span style="font-weight: normal;">.18.58</span><span style="font-weight: normal;">.839122 </span></strong></span><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">下午</span></strong><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL"><span style="mso-spacerun: yes;">      </span>Typ=231 Len=11: 120,112,2,1,<strong style="mso-bidi-font-weight: normal;"><span style="color: red;">17</span></strong>,19,59,50,3,252,80</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">从结果里我们看到，</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">17</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">减</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">后是</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">16</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">，也就是下午</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">4</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">点，所以这里是没有发生时间的调整的，原因我上面已经说过了</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">我们修改一下</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">sessiontimezone</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">后再插入一条记录，我把</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">sessiontimezone</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">修改为洛杉矶所在的时区：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">SQL&gt; ALTER SESSION SET TIME_ZONE = &#8216;-08:00&#8242;;</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Session altered</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select sessiontimezone from dual;</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">SESSIONTIMEZONE</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">-08:00</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">注意，这个时候不能再插入</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">systimestamp</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">了，</span><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">systimestamp</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">跟</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">sessiontimezone</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">和</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">dbtimezone</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">没有关系，它只取决于</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">database server</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">端环境变量</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">TZ</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">的设置</span></strong><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select systimestamp,current_timestamp from dual;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">SYSTIMESTAMP<span style="mso-spacerun: yes;">                          </span><span style="mso-spacerun: yes;">               </span>CURRENT_TIMESTAMP</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<span style="mso-spacerun: yes;">        </span>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">01-2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">月</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL"> -12 04.37.19.615042 </span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">下午</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL"> +08:00<span style="mso-spacerun: yes;">       </span>01-2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">月</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL"> -12 12.37.19.615109 </span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">上午</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL"> -08:00</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select * from v$timezone_names where tzname like &#8216;America/Los%&#8217;;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">TZNAME<span style="mso-spacerun: yes;">                                                           </span>TZABBREV</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">America/Los_Angeles<span style="mso-spacerun: yes;">                                              </span>LMT</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">America/Los_Angeles<span style="mso-spacerun: yes;">                                              </span>PST</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br;" lang="PT-BR">America/Los_Angeles<span style="mso-spacerun: yes;">                        </span><span style="mso-spacerun: yes;">                      </span>PDT</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">America/Los_Angeles<span style="mso-spacerun: yes;">                                              </span>PWT</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">America/Los_Angeles<span style="mso-spacerun: yes;">                                              </span>PPT</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; insert into t2 values(<strong style="mso-bidi-font-weight: normal;">to_timestamp_tz(&#8217;2012-02-01 16:38:19 America/Los_Angeles&#8217;,'YYYY-MM-DD HH24:MI:SS TZR&#8217;)</strong>);</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">1 row inserted</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; commit;</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Commit complete</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select col1,dump(col1) from t2;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">COL1<span style="mso-spacerun: yes;">                                               </span>DUMP(COL1)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">01-2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">月</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL"> -12 12.18.58.839122 </span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">上午</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL"><span style="mso-spacerun: yes;">     </span>Typ=231 Len=11: 120,112,2,1,17,19,59,50,3,252,80</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">01-2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">月</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL"> -12 04.38.19.000000 </span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">下午</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL"><span style="mso-spacerun: yes;">     </span>Typ=231 Len=7: 120,112,<strong style="mso-bidi-font-weight: normal;"><span style="color: red;">2,2,9,39,20</span></strong></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">从结果里我们可以看到，之前插入的那条记录显示结果变成了</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">月</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">日上午零点</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">18</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">分</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">，这是正常的，因为</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">timestamp with local time zone</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">的显示结果会随着</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">sessiontimezone</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">的改变而改变，洛杉矶滞后于北京</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">16</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">个小时，所以我们在</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">16</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">点</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">18</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">分插入的那条记录的显示结果变成了上午零点</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">18</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">分。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">现在我们来解释刚刚插入的第二条记录的显示结果：</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">插入的时候我们指定了是以洛杉矶当地时间</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">16</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">点</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">38</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">分</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">19</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">秒，而现在的</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">sessiontimezone</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">就是洛杉矶所在的时区，所以第二条记录的显示结果就是</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">16</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">点</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">38</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">分</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">19</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">秒。</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">现在第二条记录</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">Oracle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">实际上的存储结果是</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">120,112,<strong style="mso-bidi-font-weight: normal;"><span style="color: red;">2,2,9,39,20</span></strong></span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">，这里因为</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">dbtimezone</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">是</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">+08:00</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">，插入的时候我们指定了是以洛杉矶当地时间（相当于</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">sessiontimezone</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">是</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">-08:00</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">），所以</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">Oracle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">要对</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">timestamp with local time zone</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">实际存储结果加上</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">sessiontimezone</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">和</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">dbtimezone</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">的差值，也就是</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">16</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">个小时。</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">16</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">点</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">38</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">分</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">19</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">秒加上</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">16</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">是</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">32</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">点</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">38</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">分</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">19</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">秒，也就是第二天早上</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">8</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">点</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">38</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">分</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">19</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">秒，所以这里</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">Oracle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">实际的存储结果变成了</span><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: red; font-size: 10pt; mso-ansi-language: nl;" lang="NL">2,2,9,39,20</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">。</span></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: nl;">我们导出上述表：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">oracle:/nbsdata01/oradata/testdb&gt;exp \&#8217;sys/oracle@nbsdev as sysdba\&#8217; file=t2.dmp tables=t2</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Export: Release 11.2.0.1.0 &#8211; Production on Wed Feb 1 17:11:25 2012</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Copyright (c) 1982, 2009, Oracle and/or its affiliates.<span style="mso-spacerun: yes;">  </span>All rights reserved.</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 &#8211; 64bit Production</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">With the Partitioning, OLAP, Data Mining and Real Application Testing options</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Export done in UTF8 character set and AL16UTF16 NCHAR character set</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">server uses AL32UTF8 character set (possible charset conversion)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">About to export specified tables via Conventional Path &#8230;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: nl;" lang="NL">. . exporting table<span style="mso-spacerun: yes;">                             </span>T2<span style="mso-spacerun: yes;">          </span>2 rows exported</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Export terminated successfully without warnings.</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">现在我们切换到目标数据库</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">，这个库里</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">dbtimezone</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">和数据库</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">dbtimezone</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">是不一样的，这里我用</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">dbtimezone</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">的差异来模拟时区的差异：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; color: blue; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">数据库</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: blue; font-size: 10pt;" lang="EN-US">2</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; color: blue; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></strong><strong style="mso-bidi-font-weight: normal;"></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select dbtimezone from dual;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">DBTIMEZONE</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: red; font-size: 10pt;" lang="EN-US">+00:00</span></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select sessiontimezone from dual;</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SESSIONTIMEZONE</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">+08:00</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">我们尝试导入刚才在数据库</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">里导出的表</span><span style="font-family: arial; font-size: 10pt;" lang="EN-US">t2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">oracle:/nbsdata01/oradata/testdb&gt;imp \&#8217;sys/oracle@testdb as sysdba\&#8217; file=t2.dmp tables=t2 ignore=true</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Import: Release 11.2.0.1.0 &#8211; Production on Wed Feb 1 17:16:50 2012</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Copyright (c) 1982, 2009, Oracle and/or its affiliates.<span style="mso-spacerun: yes;">  </span>All rights reserved.</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 &#8211; 64bit Production</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">With the Partitioning, OLAP, Data Mining and Real Application Testing options</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Export file created by EXPORT:V11.02.00 via conventional path</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">import done in UTF8 character set and AL16UTF16 NCHAR character set</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">import server uses ZHS16GBK character set (possible charset conversion)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">. importing SYS&#8217;s objects into SYS</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">. importing SYS&#8217;s objects into SYS</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">. . importing table<span style="mso-spacerun: yes;">                           </span>&#8220;T2&#8243;<span style="mso-spacerun: yes;">          </span>2 rows imported</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">Import terminated successfully without warnings.</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial;">现在我们来看一下导入的结果：</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">SQL&gt; select col1,dump(col1) from t2;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">COL1</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">DUMP(COL1)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt;" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE">01-FEB-12 04.18.58.839122 PM<span style="mso-spacerun: yes;">  </span>Typ=231 Len=11: 120,112,2,1,<strong style="mso-bidi-font-weight: normal;"><span style="color: red;">9</span></strong>,19,59,50,3,252,80</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE">02-FEB-12 08.38.19.000000 AM<span style="mso-spacerun: yes;">  </span>Typ=231 Len=7: 120,112,2,2,<strong style="mso-bidi-font-weight: normal;"><span style="color: red;">1</span></strong>,39,20</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE"> </span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: de;">现在我们再次回到数据库</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE">1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: de;">并将</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE">sessiontimezone</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: de;">设成和数据库</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE">2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: de;">一样：</span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; color: blue; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: de;">数据库</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; color: blue; font-size: 10pt; mso-ansi-language: de;" lang="DE">1</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; color: blue; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: de;">：</span></strong><strong style="mso-bidi-font-weight: normal;"></strong></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE">SQL&gt; ALTER SESSION SET TIME_ZONE = &#8216;+08:00&#8242;;</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE">Session altered</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE"> </span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE">SQL&gt; select col1,dump(col1) from t2;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE"> </span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE">COL1<span style="mso-spacerun: yes;">                                               </span>DUMP(COL1)</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE">01-2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: de;">月</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE"> -12 04.18.58.839122 </span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: de;">下午</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE"><span style="mso-spacerun: yes;">      </span>Typ=231 Len=11: 120,112,2,1,<strong style="mso-bidi-font-weight: normal;"><span style="color: red;">17</span></strong>,19,59,50,3,252,80</span></p>
<p class="MsoNormal" style="background: #e6e6e6;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE">02-2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: de;">月</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE"> -12 08.38.19.000000 </span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: de;">上午</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE"><span style="mso-spacerun: yes;">      </span>Typ=231 Len=7: 120,112,2,2,<strong style="mso-bidi-font-weight: normal;"><span style="color: red;">9</span></strong>,39,20</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE"> </span></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: de;">可以看到两条记录的显示时间是一致的，所以对于</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE">timestamp with local time zone</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: de;">而言，数据迁移时不同的时区是没有关系的。</span></strong><strong style="mso-bidi-font-weight: normal;"></strong></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: de;">这里的本质原因是</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE">Oracle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: de;">在做数据迁移时，对</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE">timestamp with local time zone</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: de;">类型的数据</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE">Oracle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: de;">会根据源库和目标库不同的</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE">dbtimezone</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: de;">来对</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE">timestamp with local time zone</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: de;">类型的数据做转换。这里数据库</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE">1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: de;">的</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE">dbtimezone</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: de;">是</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE">+08:00</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: de;">，数据库</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE">2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: de;">的</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE">dbtimezone</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: de;">是</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE">+00:00</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: de;">，所以</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE">Oracle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: de;">对原来的第一条记录的小时</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE">17</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: de;">减了</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE">8</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: de;">变成了</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE">9,</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: de;">第二条记录的小时</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE">9</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: de;">减了</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE">8</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: de;">变成</span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE">1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial; mso-ansi-language: de;">。</span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt; mso-ansi-language: de;" lang="DE"> </span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dbsnake.net/about_timestamp_with_local_time_zone.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle里未成功commit的数据我们也可能能看到</title>
		<link>http://www.dbsnake.net/unsuccessful-commit-feature.html</link>
		<comments>http://www.dbsnake.net/unsuccessful-commit-feature.html#comments</comments>
		<pubDate>Sat, 28 Jan 2012 12:47:25 +0000</pubDate>
		<dc:creator>Cui Hua</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.dbsnake.net/?p=52</guid>
		<description><![CDATA[lgwr suspend]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">我们大家都知道的一个常识是——</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Oracle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">里未</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">commit</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的数据除了当前</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">之外，其他</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">是看不到的。</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><?xml:namespace prefix = o /><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">我这里演示了一个有趣的例子，在这个例子里我们可以看到，</span><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Oracle</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">里未成功</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">commit</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的数据我们也可能能看到。</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">我同时启</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">4</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">个</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">。</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">先在</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session 1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">里创建一个表</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">t1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，插入一条数据但不</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">commit</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: blue; font-size: 10pt" lang="EN-US">Session 1:<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Connected to Oracle Database <?xml:namespace prefix = st1 /><st1:chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="11" unitname="g">11g</st1:chmetcnv> <st1:place w:st="on"><st1:city w:st="on">Enterprise</st1:city></st1:place> Edition Release <st1:chsdate w:st="on" isrocdate="False" islunardate="False" day="30" month="12" year="1899">11.2.0</st1:chsdate>.1.0 <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Connected as scott<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; create table t1(id number, name varchar2(10));<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Table created<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; insert into t1 values(1,&#8217;CUIHUA&#8217;);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">1 row inserted<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; select * from t1;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>ID NAME<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>1 CUIHUA<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">此时跳到</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，因</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session 1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">里刚插入的那条数据还未</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">commit</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，所以这个时候</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">是看不到这条数据的：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: blue; font-size: 10pt" lang="EN-US">Session 2:<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; select * from t1;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>ID NAME<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">接着我们跳到</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session 3</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，把</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">lgwr</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">进程</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">suspend</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">住：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: blue; font-size: 10pt" lang="EN-US">Session 3:<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; select spid from v$process where pname=&#8217;LGWR&#8217;;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SPID<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">2316<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; oradebug setospid 2316<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Oracle pid: 11, Windows thread id: 2316, image: ORACLE.EXE (LGWR)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; oradebug suspend<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">已处理的语句</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">现在我们回到</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session 1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，执行</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">commit</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">命令，因为</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">lgwr</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">进程已经被我们</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">suspend</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">住了，所以当前</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session 1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">里要执行的</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">commit</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">操作一定会被</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">hang</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">住：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: blue; font-size: 10pt" lang="EN-US">Session1</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; color: blue; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">：</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: blue; font-size: 10pt" lang="EN-US"><o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; commit;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">……这里</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">hang</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">住了</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Oracle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">里</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">commit</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">操作的流程是这样的：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">、</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Oracle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">先去改这个</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">transaction</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">所对应的</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">undo segment header</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">中</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">slot</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的状态；</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">、改完状态后再</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">flush log buffer</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">；</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">现在我们把</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">lgwr hold</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">住了，所以上述步骤</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">2 Oracle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">是没法做了，但步骤</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">还是可以做的。而只要步骤</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">做完了，其他的</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">就能看到这个</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">transaction</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">所做的改变了（通过</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">ITL</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">中记录的</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">transaction id</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">去</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">check</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">相应的</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">undo segment header</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">中</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">slot</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的状态），也就是说对于其他</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">而言，这个</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">transaction</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">已经</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">commit</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">了，虽然这个</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">transaction</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">其实并没有成功</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">commit</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">。</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">好了，我们现在回到</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session 2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，看一下我们现在能否看到刚才</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">insert</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的那条记录：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: blue; font-size: 10pt" lang="EN-US">Session 2</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; color: blue; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">：</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: blue; font-size: 10pt" lang="EN-US"><o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; select * from t1;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>ID NAME<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>1 CUIHUA<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">从结果里可以看到，刚才看不到的那条记录现在我们已经能看到了，即</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session 1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">对于</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session2</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">而言已经</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">commit</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">了，虽然</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">commit</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">操作其实并没有成功的做完。</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">现在我们跳到</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session 4</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，执行</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">shutdown abort</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: blue; font-size: 10pt" lang="EN-US">Session 4</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; color: blue; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">：</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: blue; font-size: 10pt" lang="EN-US"><o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; shutdown abort<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">ORACLE </span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">例程已经关闭。</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">然后我们再在</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session 4</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">中执行</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">startup</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">startup</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">后我们从</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">alert log</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">里可以很明显的看到</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">Oracle</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">做了</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">instance recovery</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Sat Jan 28 19:14:03 2012<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">alter database mount exclusive<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Successful mount of redo thread 1, with mount id 4288810811<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Database mounted in Exclusive Mode<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Lost write protection disabled<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Completed: alter database mount exclusive<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">alter database open<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Beginning crash recovery of 1 threads<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;</span>parallel recovery started with 2 processes<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Started redo scan<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Completed redo scan<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;</span>read 918 KB redo, 126 data blocks need recovery<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Started redo application at<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;</span>Thread 1: logseq 44, block 77312<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Recovery of Online Redo Log: Thread 1 Group 2 Seq 44 Reading mem 0<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp; </span></span><span style="font-family: arial; font-size: 10pt; mso-ansi-language: pt-br" lang="PT-BR">Mem# 0: C:\APP\CUIHUA\ORADATA\CUIHUA112\REDO02.LOG<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Completed redo application of 0.52MB<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">Completed crash recovery at<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;</span>Thread 1: logseq 44, block 79149, scn 1652578<o:p></o:p></span></p>
<p style="background: #e6e6e6" class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;</span>126 data blocks read, 95 data blocks written, 918 redo k-bytes read<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">等待上述库成功</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">startup</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">后，我们再次回到</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">session 1</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">，看一下刚才我们已经</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">commit</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">的那条数据是否还在：</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: blue; font-size: 10pt" lang="EN-US">Session 1</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: 宋体; color: blue; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">：</span></b><b style="mso-bidi-font-weight: normal"><span style="font-family: arial; color: blue; font-size: 10pt" lang="EN-US"><o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">SQL&gt; select * from t1;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>ID NAME<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US">&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">从结果里可以看到，刚才我们</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">insert</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">且执行了</span><span style="font-family: arial; font-size: 10pt" lang="EN-US">commit</span><span style="font-family: 宋体; font-size: 10pt; mso-ascii-font-family: arial; mso-hansi-font-family: arial; mso-bidi-font-family: arial">操作的那条记录现在已经丢失了。</span><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial; font-size: 10pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dbsnake.net/unsuccessful-commit-feature.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

