<?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>EXPDP/IMPDP归档 - dbAnt</title>
	<atom:link href="https://www.dbant.com/oracle/expdpimpdp/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbant.com/oracle/expdpimpdp/</link>
	<description>Focus on the database architecture.</description>
	<lastBuildDate>Mon, 02 Sep 2024 10:58:52 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.2</generator>

<image>
	<url>https://www.dbant.com/wp-content/uploads/2024/08/ant_2.ico</url>
	<title>EXPDP/IMPDP归档 - dbAnt</title>
	<link>https://www.dbant.com/oracle/expdpimpdp/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>EXP-00091: Exporting questionable statistics</title>
		<link>https://www.dbant.com/2016/08/24/exp-00091-exporting-questionable-statistics/</link>
		
		<dc:creator><![CDATA[dbAnt]]></dc:creator>
		<pubDate>Wed, 24 Aug 2016 03:34:49 +0000</pubDate>
				<category><![CDATA[EXPDP/IMPDP]]></category>
		<category><![CDATA[TroubleShooting]]></category>
		<guid isPermaLink="false">http://www.dbant.com/?p=110</guid>

					<description><![CDATA[<p>最近用exp导出数据的时候报了很多EXP-00091: Exporting questionable stat [&#8230;]</p>
<p><a href="https://www.dbant.com/2016/08/24/exp-00091-exporting-questionable-statistics/">EXP-00091: Exporting questionable statistics</a>最先出现在<a href="https://www.dbant.com">dbAnt</a>。</p>
]]></description>
										<content:encoded><![CDATA[<p>最近用exp导出数据的时候报了很多EXP-00091: Exporting questionable statistics的错误。</p>
<p>【问题现象】</p>
<pre class="brush: sql; title: ; notranslate">

exp system/123456 OWNER=rs2 file=20160823_rs2_17_8.dmp log=20160823_rs2_17_8.log

...

EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
. . exporting table ACCEPT_DETAILS 70239 rows exported
EXP-00091: Exporting questionable statistics.
&quot;20160823_rs2_17_8.log&quot; 5686L, 314896C 1,0-1 é¡¶ç«EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
. . exporting table ACCEPT_DETAILS0527 64422 rows exported

...

</pre>
<p>&nbsp;</p>
<p>【问题处理】</p>
<p>由于exp工具会依赖与操作系统的字符串编码，所以需要将NLS_LANG环境变量设置与数据库一致。</p>
<pre class="brush: sql; title: ; notranslate">

SQL&gt; select * from nls_database_parameters;

PARAMETER                      VALUE
------------------------------ ------------------------------
NLS_LANGUAGE                   AMERICAN
NLS_TERRITORY                  AMERICA
NLS_CURRENCY                   $
NLS_ISO_CURRENCY               AMERICA
NLS_NUMERIC_CHARACTERS         .,
NLS_CHARACTERSET               ZHS16GBK
NLS_CALENDAR                   GREGORIAN
NLS_DATE_FORMAT                DD-MON-RR
NLS_DATE_LANGUAGE              AMERICAN
NLS_SORT                       BINARY
NLS_TIME_FORMAT                HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT           DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT             HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT        DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY              $
NLS_COMP                       BINARY
NLS_LENGTH_SEMANTICS           BYTE
NLS_NCHAR_CONV_EXCP            FALSE
NLS_NCHAR_CHARACTERSET         AL16UTF16
NLS_RDBMS_VERSION              10.2.0.4.0

20 rows selected.

</pre>
<p>设置Linux的NLS_LANG环境变量：</p>
<pre class="brush: sql; title: ; notranslate">
&#x5B;oracle@mfs ~]$ export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
</pre>
<p>设置windows的NLS_LANG环境变量：</p>
<pre class="brush: sql; title: ; notranslate">
C:\Users\Administrator&gt;set NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
</pre>
<p>设置了环境变量之后，重新导出一切正常。</p>
<p>不过还是建议使用数据泵来导数，因为数据泵不会收到操作系统的字符集编码的影响，就不会有这样的报错了。</p>
<p><a href="https://www.dbant.com/2016/08/24/exp-00091-exporting-questionable-statistics/">EXP-00091: Exporting questionable statistics</a>最先出现在<a href="https://www.dbant.com">dbAnt</a>。</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>EXPDP导出全库报错ORA-01555</title>
		<link>https://www.dbant.com/2015/12/08/expdp_export_full_database_ora-01555/</link>
		
		<dc:creator><![CDATA[dbAnt]]></dc:creator>
		<pubDate>Tue, 08 Dec 2015 15:19:35 +0000</pubDate>
				<category><![CDATA[EXPDP/IMPDP]]></category>
		<category><![CDATA[TroubleShooting]]></category>
		<guid isPermaLink="false">http://www.dbant.com/?p=35</guid>

					<description><![CDATA[<p>[box style=&#8221;blue&#8221;]APPLIES TO:[/box] OS：Wind [&#8230;]</p>
<p><a href="https://www.dbant.com/2015/12/08/expdp_export_full_database_ora-01555/">EXPDP导出全库报错ORA-01555</a>最先出现在<a href="https://www.dbant.com">dbAnt</a>。</p>
]]></description>
										<content:encoded><![CDATA[[box style=&#8221;blue&#8221;]<strong>APPLIES TO:</strong>[/box]
OS：Windows 2008 64bit</p>
<p>DB：ORACLE 11.2.0.3</p>
<p>&nbsp;</p>
[box style=&#8221;blue&#8221;]<b>SYMPTOMS</b>[/box]
<p>通过EXPDP导出全库，查看log发现如下报错：</p>
<blockquote><p>ORA-31693: 表数据对象 &#8220;AUDIT_GD&#8221;.&#8221;PUB_LOBFILE&#8221; 无法加载/卸载并且被跳过, 错误如下:<br />
ORA-02354: 导出/导入数据时出错<br />
ORA-01555: 快照过旧: 回退段号 7 (名称为 &#8220;_SYSSMU7_93985497$&#8221;) 过小<br />
已成功加载/卸载了主表 &#8220;EXP_DBA&#8221;.&#8221;JOB_EXP_FULL_2&#8243;</p></blockquote>
<p>&nbsp;</p>
[box style=&#8221;blue&#8221;]<b>CAUSE &amp; SOLUTION</b>[/box]
<p>从报错信息ORA-31693，我们可以看到由于&#8221;AUDIT_GD&#8221;.&#8221;PUB_LOBFILE&#8221;对象的UNDO段过期导致。我们知道LOB对象的UNDO段保留时间通过<strong>PCTVERSION</strong>和<strong>RETENTION</strong>参数控制。</p>
<p><strong><span style="color: #ff0000;">注意：</span></strong></p>
<p><span style="color: #ff0000;">1、SecureFiles类型的LOB，只能通过RETENTION参数控制。</span></p>
<p><span style="color: #ff0000;">2、BasicFiles类型的LOB，可以通过PCTVERSION <strong>或 </strong>RETENTION中的其中一个进行控制。</span></p>
<p><strong>PCTVERSION</strong>：表示整个BasicFiles LOB对象的空间允许被该LOB对象的UNDO段占用的最大百分比。</p>
<p><strong>RETENTION</strong>：表示保留的时间，单位秒。当数据库为自动UNDO段管理是，该参数为默认值，并参考undo_retention的参数值。</p>
<p>查看该LOB对象的UNDO段保留情况：</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; select COLUMN_NAME,SECUREFILE,PCTVERSION,RETENTION from dba_lobs where OWNER=upper('AUDIT_GD') and TABLE_NAME=upper('PUB_LOBFILE') ;

COLUMN_NAME                    SEC PCTVERSION  RETENTION
------------------------------ --- ---------- ----------
LOB                            NO          10
TEXTLOB                        NO                    900
</pre>
<p>&nbsp;</p>
<p>查看数据库中使用UNDO段的最大保留时间：</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; select max(maxquerylen) from v$undostat;

MAX(MAXQUERYLEN)
----------------
1839
</pre>
<p>&nbsp;</p>
<p>为了防止数据导出过程中UNDO段过期，增加undo_retention参数值：(<span style="color: #ff0000;"><strong>设置该参数之前，必须保证UNDO表空间有足够的空间</strong></span>)</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; alter system set undo_retention=2000 scope=both sid='*';
</pre>
<p>&nbsp;</p>
<p>设置LOB对象的UNDO段保留时间：</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; alter table AUDIT_GD.PUB_LOBFILE modify lob(LOB) (retention);
Table altered.

SQL&gt; alter table AUDIT_GD.PUB_LOBFILE modify lob(TEXTLOB) (retention);
Table altered.

SQL&gt; select COLUMN_NAME,SECUREFILE,PCTVERSION,RETENTION from dba_lobs where OWNER=upper('AUDIT_GD') and TABLE_NAME=upper('PUB_LOBFILE') ;

COLUMN_NAME                    SEC PCTVERSION  RETENTION
------------------------------ --- ---------- ----------
LOB                            NO                   2000
TEXTLOB                        NO                   2000
</pre>
<p>&nbsp;</p>
<p>修改完参数之后，再进行EXPDP导出。</p>
<p>&nbsp;</p>
<p>参考：ORA-31693, ORA-02354 and ORA-01555 with Export Datapump (文档 ID 1580798.1)</p>
<p>&nbsp;</p>
<p>版权所有，转载请注明出处：</p>
<blockquote class="wp-embedded-content" data-secret="VuHfZZdh4Z"><p><a href="https://www.dbant.com/2015/12/08/expdp_export_full_database_ora-01555/">EXPDP导出全库报错ORA-01555</a></p></blockquote>
<p><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  title="《 EXPDP导出全库报错ORA-01555 》—dbAnt" src="https://www.dbant.com/2015/12/08/expdp_export_full_database_ora-01555/embed/#?secret=jJMD2dryuX#?secret=VuHfZZdh4Z" data-secret="VuHfZZdh4Z" width="500" height="282" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<p><a href="https://www.dbant.com/2015/12/08/expdp_export_full_database_ora-01555/">EXPDP导出全库报错ORA-01555</a>最先出现在<a href="https://www.dbant.com">dbAnt</a>。</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
