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

<channel>
	<title>天道酬勤 &#187; bug</title>
	<atom:link href="http://www.ochef.net/tag/bug/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ochef.net</link>
	<description>RDBMS and My Life</description>
	<lastBuildDate>Mon, 19 Jul 2010 02:01:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4528</generator>
		<item>
		<title>EXP-00056 bug解决方法</title>
		<link>http://www.ochef.net/2009/05/exp-00056-bug-solution/</link>
		<comments>http://www.ochef.net/2009/05/exp-00056-bug-solution/#comments</comments>
		<pubDate>Fri, 08 May 2009 05:49:41 +0000</pubDate>
		<dc:creator>ochef</dc:creator>
				<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[bug]]></category>

		<guid isPermaLink="false">http://www.ochef.net/?p=317</guid>
		<description><![CDATA[今天在测试环境：Linux + Oracle 9.2.0.5.0帮开发人员把某个用户的所有数据全部EXP时，遇到下面的错误： EXP-00056: ORACLE error 1422 encountered ORA-01422: exact fetch returns more than requested number of rows ORA-06512: at &#8220;XDB.DBMS_XDBUTIL_INT&#8221;, line 52 ORA-06512: at line 1 EXP-00056: ORACLE error 1422 encountered ORA-01422: exact fetch returns more than requested number of rows ORA-06512: at &#8220;XDB.DBMS_XDBUTIL_INT&#8221;, line 52 ORA-06512: at line 1 EXP-00000: Export terminated [...]]]></description>
			<content:encoded><![CDATA[<p>今天在测试环境：Linux + Oracle 9.2.0.5.0帮开发人员把某个用户的所有数据全部EXP时，遇到下面的错误：</p>
<p><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:PunctuationKerning /> <w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery> <w:DisplayVerticalDrawingGridEvery>2</w:DisplayVerticalDrawingGridEvery> <w:ValidateAgainstSchemas /> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:Compatibility> <w:SpaceForUL /> <w:BalanceSingleByteDoubleByteWidth /> <w:DoNotLeaveBackslashAlone /> <w:ULTrailSpace /> <w:DoNotExpandShiftReturn /> <w:AdjustLineHeightInTable /> <w:BreakWrappedTables /> <w:SnapToGridInCell /> <w:WrapTextWithPunct /> <w:UseAsianBreakRules /> <w:DontGrowAutofit /> <w:UseFELayout /> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]--> <!--[if gte mso 10]> <mce:style><!<br />
/* Style Definitions */<br />
table.MsoNormalTable<br />
{mso-style-name:表格內文;<br />
mso-tstyle-rowband-size:0;<br />
mso-tstyle-colband-size:0;<br />
mso-style-noshow:yes;<br />
mso-style-parent:"";<br />
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;<br />
mso-para-margin:0cm;<br />
mso-para-margin-bottom:.0001pt;<br />
mso-pagination:widow-orphan;<br />
font-size:10.0pt;<br />
font-family:"Times New Roman";<br />
mso-fareast-font-family:"Times New Roman";<br />
mso-ansi-language:#0400;<br />
mso-fareast-language:#0400;<br />
mso-bidi-language:#0400;}<br />
--> <!--[endif]--></p>
<blockquote>
<p class="MsoNormal"><span lang="EN-US">EXP-00056: ORACLE error 1422 encountered</span></p>
<p class="MsoNormal"><span lang="EN-US">ORA-01422: exact fetch returns more than requested number of rows</span></p>
<p class="MsoNormal"><span lang="EN-US">ORA-06512: at &#8220;XDB.DBMS_XDBUTIL_INT&#8221;, line 52</span></p>
<p class="MsoNormal"><span lang="EN-US">ORA-06512: at line 1</span></p>
<p class="MsoNormal"><span lang="EN-US">EXP-00056: ORACLE error 1422 encountered</span></p>
<p class="MsoNormal"><span lang="EN-US">ORA-01422: exact fetch returns more than requested number of rows</span></p>
<p class="MsoNormal"><span lang="EN-US">ORA-06512: at &#8220;XDB.DBMS_XDBUTIL_INT&#8221;, line 52</span></p>
<p class="MsoNormal"><span lang="EN-US">ORA-06512: at line 1</span></p>
<p class="MsoNormal"><span lang="EN-US">EXP-00000: Export terminated unsuccessfully</span></p>
</blockquote>
<p class="MsoNormal"><span lang="EN-US">查了metalink解释如下：</span></p>
<p class="MsoNormal"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:PunctuationKerning /> <w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery> <w:DisplayVerticalDrawingGridEvery>2</w:DisplayVerticalDrawingGridEvery> <w:ValidateAgainstSchemas /> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:Compatibility> <w:SpaceForUL /> <w:BalanceSingleByteDoubleByteWidth /> <w:DoNotLeaveBackslashAlone /> <w:ULTrailSpace /> <w:DoNotExpandShiftReturn /> <w:AdjustLineHeightInTable /> <w:BreakWrappedTables /> <w:SnapToGridInCell /> <w:WrapTextWithPunct /> <w:UseAsianBreakRules /> <w:DontGrowAutofit /> <w:UseFELayout /> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]--> <!--[if gte mso 10]> <mce:style><!<br />
/* Style Definitions */<br />
table.MsoNormalTable<br />
{mso-style-name:表格內文;<br />
mso-tstyle-rowband-size:0;<br />
mso-tstyle-colband-size:0;<br />
mso-style-noshow:yes;<br />
mso-style-parent:"";<br />
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;<br />
mso-para-margin:0cm;<br />
mso-para-margin-bottom:.0001pt;<br />
mso-pagination:widow-orphan;<br />
font-size:10.0pt;<br />
font-family:"Times New Roman";<br />
mso-fareast-font-family:"Times New Roman";<br />
mso-ansi-language:#0400;<br />
mso-fareast-language:#0400;<br />
mso-bidi-language:#0400;}<br />
--> <!--[endif]--></p>
<blockquote>
<p class="MsoNormal"><span lang="EN-US">This has been logged as <span style="color: #ff0000;">bug 2685696</span>. (viewable in Metalink). The issue is that the package body XDB.DBMS_XDBUTIL_INT is doing a SELECT object_type FROM all_objects and is expecting to return only 1 row. However, if you have a table and trigger of other object, named the same, it returns 2 rows, which causes the error. </span></p>
<p class="MsoNormal"><span lang="EN-US">Currently a patch for the Windows Platform is not available. The workaround is to rename one of the objects. You can also log an iTAR requesting a one-off patch be created for your platform.<br />
</span></p></blockquote>
<p class="MsoNormal"><span lang="EN-US">原因是由同名的trigger引起的，解决问题的办法有二个：</span></p>
<p class="MsoNormal"><span lang="EN-US">1.使用下面的SQL语句找出系统中有问题的trigger，然后将其名称修正即可<br />
</span></p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> object_type<span style="color: #66cc66;">,</span>owner<span style="color: #66cc66;">||</span><span style="color: #ff0000;">'.'</span><span style="color: #66cc66;">||</span>object_name <span style="color: #ff0000;">&quot;OWNER.OBJECT_NAME&quot;</span>
          <span style="color: #993333; font-weight: bold;">FROM</span> dba_objects
         <span style="color: #993333; font-weight: bold;">WHERE</span> owner<span style="color: #66cc66;">||</span>object_name <span style="color: #993333; font-weight: bold;">IN</span>
               <span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">SELECT</span> o<span style="color: #66cc66;">.</span>owner<span style="color: #66cc66;">||</span>object_name <span style="color: #993333; font-weight: bold;">FROM</span> dba_objects o<span style="color: #66cc66;">,</span> dba_triggers t
                    <span style="color: #993333; font-weight: bold;">WHERE</span> object_name <span style="color: #66cc66;">=</span> trigger_name
                    <span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> o<span style="color: #66cc66;">.</span>owner<span style="color: #66cc66;">||</span>object_name <span style="color: #993333; font-weight: bold;">HAVING</span> COUNT<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p><!--[if gte mso 10]> <mce:style><!<br />
/* Style Definitions */<br />
table.MsoNormalTable<br />
{mso-style-name:表格內文;<br />
mso-tstyle-rowband-size:0;<br />
mso-tstyle-colband-size:0;<br />
mso-style-noshow:yes;<br />
mso-style-parent:"";<br />
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;<br />
mso-para-margin:0cm;<br />
mso-para-margin-bottom:.0001pt;<br />
mso-pagination:widow-orphan;<br />
font-size:10.0pt;<br />
font-family:"Times New Roman";<br />
mso-fareast-font-family:"Times New Roman";<br />
mso-ansi-language:#0400;<br />
mso-fareast-language:#0400;<br />
mso-bidi-language:#0400;}<br />
--> <!--[endif]--></p>
<p class="MsoNormal"><span lang="EN-US">2.将系统升级至9.2.0.8.0即可<br />
</span></p>
<p class="MsoNormal"><span lang="EN-US">-The End-<br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ochef.net/2009/05/exp-00056-bug-solution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
