<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>《ORACLE 12C可以通过expdp导出view数据》的评论</title>
	<atom:link href="https://www.xifenfei.com/2012/12/oracle-12c%e5%8f%af%e4%bb%a5%e9%80%9a%e8%bf%87expdp%e5%af%bc%e5%87%baview%e6%95%b0%e6%8d%ae.html/feed" rel="self" type="application/rss+xml" />
	<link>https://www.xifenfei.com/2012/12/oracle-12c%e5%8f%af%e4%bb%a5%e9%80%9a%e8%bf%87expdp%e5%af%bc%e5%87%baview%e6%95%b0%e6%8d%ae.html</link>
	<description>提供7*24专业数据库(Oracle,SQL Server,MySQL,PostgreSQL等)恢复和技术支持@Tel:17813235971</description>
	<lastBuildDate>Thu, 11 Dec 2025 02:46:14 +0000</lastBuildDate>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>作者：惜分飞</title>
		<link>https://www.xifenfei.com/2012/12/oracle-12c%e5%8f%af%e4%bb%a5%e9%80%9a%e8%bf%87expdp%e5%af%bc%e5%87%baview%e6%95%b0%e6%8d%ae.html/comment-page-1#comment-1191</link>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
		<pubDate>Thu, 20 Dec 2012 14:58:36 +0000</pubDate>
		<guid isPermaLink="false">https://www.xifenfei.com/?p=4062#comment-1191</guid>
		<description><![CDATA[views_as_tables含table_name参数执行失败
[shell]
[oracle@Lunar trace]$ expdp xff/xifenfei views_as_tables=XFF.V_XIFENFEI:T_XIFENFEI directory=data_pump_dir
  \ dumpfile=xff.dmp  

Export: Release 12.1.0.0.2 - Beta on Sun Dec 16 09:26:45 2012

Copyright (c) 1982, 2012, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.0.2 - 64bit Beta
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting &quot;XFF&quot;.&quot;SYS_EXPORT_TABLE_01&quot;:  xff/******** views_as_tables=XFF.V_XIFENFEI:T_XIFENFEI 
directory=data_pump_dir dumpfile=xff.dmp
Estimate in progress using BLOCKS method...
Total estimation using BLOCKS method: 0 KB
ORA-39166: Object XFF.V_XIFENFEI was not found.
ORA-31655: no data or metadata objects selected for job
Job &quot;XFF&quot;.&quot;SYS_EXPORT_TABLE_01&quot; completed with 2 error(s) at Sun Dec 16 09:26:55 2012 elapsed 0 00:00:05
[/shell]
出现这个问题有几种情况：
1.Utilities文档错误,因为expdp help=y中确实没有该用法
2.beta版本不成熟,存在bug]]></description>
		<content:encoded><![CDATA[<p>views_as_tables含table_name参数执行失败</p>
<pre class="brush: bash; title: ; notranslate">
[oracle@Lunar trace]$ expdp xff/xifenfei views_as_tables=XFF.V_XIFENFEI:T_XIFENFEI directory=data_pump_dir
  \ dumpfile=xff.dmp  

Export: Release 12.1.0.0.2 - Beta on Sun Dec 16 09:26:45 2012

Copyright (c) 1982, 2012, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.0.2 - 64bit Beta
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting &quot;XFF&quot;.&quot;SYS_EXPORT_TABLE_01&quot;:  xff/******** views_as_tables=XFF.V_XIFENFEI:T_XIFENFEI 
directory=data_pump_dir dumpfile=xff.dmp
Estimate in progress using BLOCKS method...
Total estimation using BLOCKS method: 0 KB
ORA-39166: Object XFF.V_XIFENFEI was not found.
ORA-31655: no data or metadata objects selected for job
Job &quot;XFF&quot;.&quot;SYS_EXPORT_TABLE_01&quot; completed with 2 error(s) at Sun Dec 16 09:26:55 2012 elapsed 0 00:00:05
</pre>
<p>出现这个问题有几种情况：<br />
1.Utilities文档错误,因为expdp help=y中确实没有该用法<br />
2.beta版本不成熟,存在bug</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：惜分飞</title>
		<link>https://www.xifenfei.com/2012/12/oracle-12c%e5%8f%af%e4%bb%a5%e9%80%9a%e8%bf%87expdp%e5%af%bc%e5%87%baview%e6%95%b0%e6%8d%ae.html/comment-page-1#comment-1189</link>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
		<pubDate>Thu, 20 Dec 2012 14:07:05 +0000</pubDate>
		<guid isPermaLink="false">https://www.xifenfei.com/?p=4062#comment-1189</guid>
		<description><![CDATA[VIEWS_AS_TABLES参数具体说明
[shell]
VIEWS_AS_TABLES=[schema_name.]view_name[:table_name], ...
Data Pump exports a table with the same columns as the view and with row data fetched from the view. 
Data Pump also exports objects dependent on the view, such as grants and constraints. 
Dependent objects that do not apply to tables (for example, grants of the UNDER object privilege) 
are not exported.The VIEWS_AS_TABLES parameter can be used by itself or along with the TABLES parameter. 
If either is used, Data Pump performs a table-mode export.
The syntax elements are defined as follows:
schema_name--The name of the schema in which the view resides. 
If a schema name is not supplied, it defaults to the user performing the export.

view_name--The name of the view to be exported as a table. 
The view must exist and it must be a relational view with only scalar, non-LOB columns. 
If you specify an invalid or non-existent view, the view is skipped and an error message is returned.

table_name--The name of a table to serve as the source of the metadata for the exported view. 
By default Data Pump automatically creates a temporary &quot;template table&quot; with the same columns 
and data types as the view, but no rows. If the database is read-only, 
then this default creation of a template table will fail. In such a case, 
you can specify a table name. The table must be in the same schema as the view. 
It must be a non-partitioned relational table with heap organization. It cannot be a nested table.

If the export job contains multiple views with explicitly specified template tables, 
the template tables must all be different. 

For example, in the following job (in which two views use the same template table) one of the views is skipped:
expdp scott/tiger directory=dpump_dir dumpfile=a.dmp views_as_tables=v1:emp,v2:emp
An error message is returned reporting the omitted object.
Template tables are automatically dropped after the export operation is completed. 
While they exist, you can perform the following query to view their names (which all begin with KU$VAT):
SQL&gt; SELECT * FROM user_tab_comments WHERE table_name LIKE &#039;KU$VAT%&#039;;
TABLE_NAME TABLE_TYPE
------------------------------ -----------
COMMENTS
-----------------------------------------------------
KU$VAT_63629 TABLE
Data Pump metadata template table for view SCOTT.EMPV
[/shell]]]></description>
		<content:encoded><![CDATA[<p>VIEWS_AS_TABLES参数具体说明</p>
<pre class="brush: bash; title: ; notranslate">
VIEWS_AS_TABLES=[schema_name.]view_name[:table_name], ...
Data Pump exports a table with the same columns as the view and with row data fetched from the view. 
Data Pump also exports objects dependent on the view, such as grants and constraints. 
Dependent objects that do not apply to tables (for example, grants of the UNDER object privilege) 
are not exported.The VIEWS_AS_TABLES parameter can be used by itself or along with the TABLES parameter. 
If either is used, Data Pump performs a table-mode export.
The syntax elements are defined as follows:
schema_name--The name of the schema in which the view resides. 
If a schema name is not supplied, it defaults to the user performing the export.

view_name--The name of the view to be exported as a table. 
The view must exist and it must be a relational view with only scalar, non-LOB columns. 
If you specify an invalid or non-existent view, the view is skipped and an error message is returned.

table_name--The name of a table to serve as the source of the metadata for the exported view. 
By default Data Pump automatically creates a temporary &quot;template table&quot; with the same columns 
and data types as the view, but no rows. If the database is read-only, 
then this default creation of a template table will fail. In such a case, 
you can specify a table name. The table must be in the same schema as the view. 
It must be a non-partitioned relational table with heap organization. It cannot be a nested table.

If the export job contains multiple views with explicitly specified template tables, 
the template tables must all be different. 

For example, in the following job (in which two views use the same template table) one of the views is skipped:
expdp scott/tiger directory=dpump_dir dumpfile=a.dmp views_as_tables=v1:emp,v2:emp
An error message is returned reporting the omitted object.
Template tables are automatically dropped after the export operation is completed. 
While they exist, you can perform the following query to view their names (which all begin with KU$VAT):
SQL&gt; SELECT * FROM user_tab_comments WHERE table_name LIKE 'KU$VAT%';
TABLE_NAME TABLE_TYPE
------------------------------ -----------
COMMENTS
-----------------------------------------------------
KU$VAT_63629 TABLE
Data Pump metadata template table for view SCOTT.EMPV
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>作者：惜分飞</title>
		<link>https://www.xifenfei.com/2012/12/oracle-12c%e5%8f%af%e4%bb%a5%e9%80%9a%e8%bf%87expdp%e5%af%bc%e5%87%baview%e6%95%b0%e6%8d%ae.html/comment-page-1#comment-1188</link>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
		<pubDate>Thu, 20 Dec 2012 14:05:54 +0000</pubDate>
		<guid isPermaLink="false">https://www.xifenfei.com/?p=4062#comment-1188</guid>
		<description><![CDATA[存在相同的视图或者表报错
[shell]
[oracle@xifenfei ~]$ impdp xff/xifenfei tables=v_xifenfei directory=data_pump_dir dumpfile=xifenfei.dmp

Import: Release 12.1.0.0.2 - Beta on Sun Dec 16 07:59:05 2012

Copyright (c) 1982, 2012, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.0.2 - 64bit Beta
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table &quot;XFF&quot;.&quot;SYS_IMPORT_TABLE_01&quot; successfully loaded/unloaded
Starting &quot;XFF&quot;.&quot;SYS_IMPORT_TABLE_01&quot;:  xff/******** tables=v_xifenfei directory=data_pump_dir
 dumpfile=xifenfei.dmp 
Processing object type TABLE_EXPORT/VIEWS_AS_TABLES/TABLE
ORA-39325: TABLE_EXISTS_ACTION cannot be applied to &quot;XFF&quot;.&quot;V_XIFENFEI&quot;.
Processing object type TABLE_EXPORT/VIEWS_AS_TABLES/TABLE_DATA
Job &quot;XFF&quot;.&quot;SYS_IMPORT_TABLE_01&quot; completed with 1 error(s) at Sun Dec 16 07:59:13 2012 elapsed 0 00:00:05
[/shell]]]></description>
		<content:encoded><![CDATA[<p>存在相同的视图或者表报错</p>
<pre class="brush: bash; title: ; notranslate">
[oracle@xifenfei ~]$ impdp xff/xifenfei tables=v_xifenfei directory=data_pump_dir dumpfile=xifenfei.dmp

Import: Release 12.1.0.0.2 - Beta on Sun Dec 16 07:59:05 2012

Copyright (c) 1982, 2012, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.0.2 - 64bit Beta
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table &quot;XFF&quot;.&quot;SYS_IMPORT_TABLE_01&quot; successfully loaded/unloaded
Starting &quot;XFF&quot;.&quot;SYS_IMPORT_TABLE_01&quot;:  xff/******** tables=v_xifenfei directory=data_pump_dir
 dumpfile=xifenfei.dmp 
Processing object type TABLE_EXPORT/VIEWS_AS_TABLES/TABLE
ORA-39325: TABLE_EXISTS_ACTION cannot be applied to &quot;XFF&quot;.&quot;V_XIFENFEI&quot;.
Processing object type TABLE_EXPORT/VIEWS_AS_TABLES/TABLE_DATA
Job &quot;XFF&quot;.&quot;SYS_IMPORT_TABLE_01&quot; completed with 1 error(s) at Sun Dec 16 07:59:13 2012 elapsed 0 00:00:05
</pre>
]]></content:encoded>
	</item>
</channel>
</rss>
