<?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>MacLochlainns Weblog &#187; KUP-00554</title>
	<atom:link href="http://blog.mclaughlinsoftware.com/tag/kup-00554/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mclaughlinsoftware.com</link>
	<description>Michael McLaughlin's Technical Blog</description>
	<lastBuildDate>Wed, 28 Jul 2010 00:02:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Oracle External Table Basics</title>
		<link>http://blog.mclaughlinsoftware.com/2008/06/19/oracle-external-table-basics/</link>
		<comments>http://blog.mclaughlinsoftware.com/2008/06/19/oracle-external-table-basics/#comments</comments>
		<pubDate>Thu, 19 Jun 2008 07:27:53 +0000</pubDate>
		<dc:creator>maclochlainn</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[data_pump]]></category>
		<category><![CDATA[external tables]]></category>
		<category><![CDATA[KUP-00554]]></category>
		<category><![CDATA[KUP-01005]]></category>
		<category><![CDATA[KUP-01007]]></category>
		<category><![CDATA[KUP-11012]]></category>
		<category><![CDATA[ORA-29400]]></category>
		<category><![CDATA[ORA-29913]]></category>
		<category><![CDATA[ORA-30656]]></category>
		<category><![CDATA[sql_loader]]></category>

		<guid isPermaLink="false">http://maclochlainn.wordpress.com/?p=38</guid>
		<description><![CDATA[External files are great tools for reading data into and writing data out of an Oracle database. You have two options for reading data into the database. One uses SQL*Loader and the other uses Oracle Data Pump. You have only one option to write data from the database into an external table file. That’s Oracle [...]]]></description>
			<content:encoded><![CDATA[<p>External files are great tools for reading data into and writing data out of an Oracle database. You have two options for reading data into the database. One uses <em>SQL*Loader</em> and the other uses <em>Oracle Data Pump</em>. You have only one option to write data from the database into an external table file. That’s <em>Oracle Data Pump</em>.</p>
<p>I thought this was pretty straightforward when recommending it as a solution. Given the questions that I got back, it appears that it isn’t. Actually, I couldn&#8217;t find an example for how you import data through an external table by using <em>Oracle Data Pump</em>. I only checked the <a title="Oracle Database Utilities 11g" href="http://download.oracle.com/docs/cd/B28359_01/server.111/b28319/toc.htm" target="_blank">Oracle Database Utilities 11<em>g</em></a> documentation, but maybe its somewhere else. </p>
<p>The &#8220;<a title="Creating an external table that uses SQL*Loader" href="http://blog.mclaughlinsoftware.com/creating-an-external-table-that-uses-sqlloader/" target="_blank">Creating an external table that uses SQL*Loader</a>&#8221; page demonstrates how you can create an input or read-only external table. The &#8220;<a title="Creating an external table that uses Oracle Data Pump" href="http://blog.mclaughlinsoftware.com/creating-an-external-table-that-uses-oracle-data-pump/" target="_blank">Creating an external table that uses Oracle Data Pump</a>&#8221; shows you how to create read-write external tables.</p>
<p><strong>Exceptions covered in the Articles</strong></p>
<p>The two referenced pages should help you understand the basics and resolve these error messages (at least on an Oracle Database 11<em>g</em> where I tested them):</p>
<p>Exception stack raised by Oracle <em>SQL*Loader</em> when you provide file extensions for log, bad, or discarded file names without enclosing them in single quotes:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;">ORA<span style="color: #66cc66;">-</span><span style="color: #cc66cc;">29913</span>: error <span style="color: #993333; font-weight: bold;">IN</span> executing ODCIEXTTABLEOPEN callout
ORA<span style="color: #66cc66;">-</span><span style="color: #cc66cc;">29400</span>: <span style="color: #993333; font-weight: bold;">DATA</span> cartridge error
KUP<span style="color: #66cc66;">-</span>00554: error encountered while parsing access parameters
KUP<span style="color: #66cc66;">-</span>01005: syntax error: found <span style="color: #ff0000;">&quot;dot&quot;</span>: expecting one of: <span style="color: #ff0000;">&quot;badfile,
byteordermark, characterset, colon, column, data, delimited, discardfile,
disable_directory_link_check, fields, fixed, load, logfile, language,
nodiscardfile, nobadfile, nologfile, date_cache, processing, readsize, string,
skip, territory, vari&quot;</span>
KUP<span style="color: #66cc66;">-</span>01007: at line <span style="color: #cc66cc;">2</span> <span style="color: #993333; font-weight: bold;">COLUMN</span> <span style="color: #cc66cc;">20</span></pre></div></div>

<p>You can also enclose a different Oracle virtual directory by using <em>&#8216;virtual_directory&#8217;:'name.extension&#8217;</em> syntax.</p>
<p>Exception stack raised by <em>Oracle Data Pump</em> when you fail to enumerate columns in the source query:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;">ERROR at line <span style="color: #cc66cc;">6</span>:
ORA<span style="color: #66cc66;">-</span><span style="color: #cc66cc;">30656</span>: <span style="color: #993333; font-weight: bold;">COLUMN</span> type <span style="color: #993333; font-weight: bold;">NOT</span> supported <span style="color: #993333; font-weight: bold;">ON</span> external organized <span style="color: #993333; font-weight: bold;">TABLE</span></pre></div></div>

<p>Exception stack raised by <em>Oracle Data Pump</em> when you try to rebuild the external table without previously dropping the external file:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> item_export
<span style="color: #66cc66;">*</span>
ERROR at line <span style="color: #cc66cc;">1</span>:
ORA<span style="color: #66cc66;">-</span><span style="color: #cc66cc;">29913</span>: error <span style="color: #993333; font-weight: bold;">IN</span> executing ODCIEXTTABLEOPEN callout
ORA<span style="color: #66cc66;">-</span><span style="color: #cc66cc;">29400</span>: <span style="color: #993333; font-weight: bold;">DATA</span> cartridge error
KUP<span style="color: #66cc66;">-</span><span style="color: #cc66cc;">11012</span>: file item_export<span style="color: #66cc66;">.</span>dmp <span style="color: #993333; font-weight: bold;">IN</span> C:\<span style="color: #993333; font-weight: bold;">DATA</span>\Download already <span style="color: #993333; font-weight: bold;">EXISTS</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.mclaughlinsoftware.com/2008/06/19/oracle-external-table-basics/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
