<?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; network_link</title>
	<atom:link href="http://www.ochef.net/tag/network_link/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ochef.net</link>
	<description>Oracle and My Life</description>
	<lastBuildDate>Mon, 09 Jan 2012 05:39:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>expdp的network_link参数</title>
		<link>http://www.ochef.net/2010/05/expdp-of-network_link-parameters.html</link>
		<comments>http://www.ochef.net/2010/05/expdp-of-network_link-parameters.html#comments</comments>
		<pubDate>Wed, 19 May 2010 04:27:33 +0000</pubDate>
		<dc:creator>ochef</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[expdp]]></category>
		<category><![CDATA[network_link]]></category>

		<guid isPermaLink="false">http://www.ochef.net/?p=833</guid>
		<description><![CDATA[expdp是server端工具，但可以通过NETWORK_LINK参数实现远端导出，但是前提是远端也安装有Oracle数据库，只有CLIENT端是没有办法利用数据泵的。 这里要指出的是：network_link不支持远端导出分区表中的某一个分区，但可以导整个分区表。以下为测试过程： 创建分区表sales： [oracle@ora10g ~]$ sqlplus &#8216;/as sysdba&#8217; SQL&#62; CREATE TABLE sales (sale_date DATE NOT NULL) PARTITION BY RANGE (sale_date) (PARTITION sales2010_q1 VALUES LESS THAN (TO_DATE(&#8217;2010-04-01&#8242;,&#8217;YYYY-MM-DD&#8217;)) TABLESPACE sp1, PARTITION sales2010_q2 VALUES LESS THAN (TO_DATE(&#8217;2010-07-01&#8242;,&#8217;YYYY-MM-DD&#8217;)) TABLESPACE sp2, PARTITION sales2010_q3 VALUES LESS THAN (TO_DATE(&#8217;2010-10-01&#8242;,&#8217;YYYY-MM-DD&#8217;)) TABLESPACE sp3); 插入4条记录： SQL&#62; select count(*) from sales; COUNT(*) &#8212;&#8212;&#8212;- 4 SQL&#62; select [...]<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ochef.net%2F2010%2F03%2Faix-network-buffer-parameter-is-set-to-rise-to-rac-failures.html&from=http%3A%2F%2Fwww.ochef.net%2F2010%2F05%2Fexpdp-of-network_link-parameters.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">AIX network buffer参数设置引起RAC故障</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ochef.net%2F2010%2F01%2Fvip-failover-take-long-time-after-network-cable-pulled.html&from=http%3A%2F%2Fwww.ochef.net%2F2010%2F05%2Fexpdp-of-network_link-parameters.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">VIP Failover Take Long Time After Network Cable Pulled</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ochef.net%2F2010%2F11%2Fstudy-aix-5l-network-performance-a.html&from=http%3A%2F%2Fwww.ochef.net%2F2010%2F05%2Fexpdp-of-network_link-parameters.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">学习：AIX 5L网络性能优化(一)</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ochef.net%2F2010%2F11%2Flearning-nfs-network-file-system-optimization-b.html&from=http%3A%2F%2Fwww.ochef.net%2F2010%2F05%2Fexpdp-of-network_link-parameters.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">学习：NFS网络文件系统优化(二)</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>expdp是server端工具，但可以通过NETWORK_LINK参数实现远端导出，但是前提是远端也安装有Oracle数据库，只有CLIENT端是没有办法利用数据泵的。</p>
<p>这里要指出的是：network_link不支持远端导出分区表中的某一个分区，但可以导整个分区表。以下为测试过程：</p>
<p><strong>创建分区表sales：</strong></p>
<p>[oracle@ora10g ~]$ sqlplus &#8216;/as sysdba&#8217;</p>
<p>SQL&gt; CREATE TABLE sales</p>
<p>(sale_date DATE NOT NULL)</p>
<p>PARTITION BY RANGE (sale_date)</p>
<p>(PARTITION sales2010_q1</p>
<p>VALUES LESS THAN (TO_DATE(&#8217;2010-04-01&#8242;,&#8217;YYYY-MM-DD&#8217;))</p>
<p>TABLESPACE sp1,</p>
<p>PARTITION sales2010_q2</p>
<p>VALUES LESS THAN (TO_DATE(&#8217;2010-07-01&#8242;,&#8217;YYYY-MM-DD&#8217;))</p>
<p>TABLESPACE sp2,</p>
<p>PARTITION sales2010_q3</p>
<p>VALUES LESS THAN (TO_DATE(&#8217;2010-10-01&#8242;,&#8217;YYYY-MM-DD&#8217;))</p>
<p>TABLESPACE sp3);</p>
<p><strong>插入4条记录： </strong></p>
<p>SQL&gt; select count(*) from sales;</p>
<p>COUNT(*)</p>
<p>&#8212;&#8212;&#8212;-</p>
<p>4</p>
<p>SQL&gt; select * from sales partition(sales2010_q1);</p>
<p>SALE_DATE</p>
<p>&#8212;&#8212;&#8212;&#8212;</p>
<p>23-MAR-10</p>
<p>SQL&gt; select * from sales partition(sales2010_q2);</p>
<p>SALE_DATE</p>
<p>&#8212;&#8212;&#8212;&#8212;</p>
<p>23-JUN-10</p>
<p>22-JUN-10</p>
<p>SQL&gt; select * from sales partition(sales2010_q3);</p>
<p>SALE_DATE</p>
<p>&#8212;&#8212;&#8212;&#8212;</p>
<p>23-SEP-10</p>
<p><strong>远端机器上创建 directory目录、赋权、创建dblink:</strong></p>
<p>[oracle@node1 /]$ sqlplus &#8216;/as sysdba&#8217;</p>
<p>SQL&gt; create directory dump_dir as &#8216;/backup&#8217;;</p>
<p>Directory created.</p>
<p>SQL&gt; grant read,write on directory dump_dir to ochef;</p>
<p>Grant succeeded.</p>
<p>SQL&gt; create database link test connect to ochef identified by oracle using &#8216;primary&#8217;;</p>
<p>Database link created.</p>
<p>SQL&gt; select count(*) from ochef.sales@test;</p>
<p>COUNT(*)</p>
<p>&#8212;&#8212;&#8212;-</p>
<p>4</p>
<p><strong>远程导出整个分区表：</strong></p>
<p>[oracle@node1 ~]$ expdp ochef/oracle directory=dump_dir dumpfile=sales.dmp network_link=test tables=sales</p>
<p>Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 &#8211; Production</p>
<p>With the Partitioning, Real Application Clusters, OLAP, Data Mining</p>
<p>and Real Application Testing options</p>
<p>Starting &#8220;OCHEF&#8221;.&#8221;SYS_EXPORT_TABLE_01&#8243;:  ochef/******** directory=dump_dir dumpfile=sales.dmp network_link=test tables=sales</p>
<p>Estimate in progress using BLOCKS method&#8230;</p>
<p>Processing object type TABLE_EXPORT/TABLE/TABLE_DATA</p>
<p>Total estimation using BLOCKS method: 384 KB</p>
<p>Processing object type TABLE_EXPORT/TABLE/TABLE</p>
<p><span style="color: #ff0000;">. . exported &#8220;OCHEF&#8221;.&#8221;SALES&#8221;                             4.960 KB       4 rows</span></p>
<p>Master table &#8220;OCHEF&#8221;.&#8221;SYS_EXPORT_TABLE_01&#8243; successfully loaded/unloaded</p>
<p>******************************************************************************</p>
<p>Dump file set for OCHEF.SYS_EXPORT_TABLE_01 is:</p>
<p>/backup/sales.dmp</p>
<p>Job &#8220;OCHEF&#8221;.&#8221;SYS_EXPORT_TABLE_01&#8243; successfully completed at 11:12:43</p>
<p><strong>远程导出分区表的某个分区：</strong></p>
<p>[oracle@node1 ~]$ expdp ochef/oracle directory=dump_dir dumpfile=sales.dmp network_link=test tables=sales:sales2010_q2</p>
<p><span style="color: #ff0000;">ORA-39001: invalid argument value</span></p>
<p><span style="color: #ff0000;">ORA-39203: Partition selection is not supported over a network link.</span></p>
<p><strong>本地导出分区表的某个分区：</strong></p>
<p>[oracle@ora10g ~]$ expdp ochef/oracle directory=dump_dir dumpfile=sales.dmp tables=sales:sales2010_q2</p>
<p>Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 &#8211; Production</p>
<p>With the Partitioning, OLAP, Data Mining and Real Application Testing options</p>
<p>Starting &#8220;OCHEF&#8221;.&#8221;SYS_EXPORT_TABLE_01&#8243;:  ochef/******** directory=dump_dir dumpfile=sales.dmp tables=sales:sales2010_q2</p>
<p>Estimate in progress using BLOCKS method&#8230;</p>
<p>Processing object type TABLE_EXPORT/TABLE/TABLE_DATA</p>
<p>Total estimation using BLOCKS method: 128 KB</p>
<p>Processing object type TABLE_EXPORT/TABLE/TABLE</p>
<p><span style="color: #ff0000;">. . exported &#8220;OCHEF&#8221;.&#8221;SALES&#8221;:&#8221;SALES2010_Q2&#8243;              4.937 KB       2 rows</span></p>
<p>Master table &#8220;OCHEF&#8221;.&#8221;SYS_EXPORT_TABLE_01&#8243; successfully loaded/unloaded</p>
<p>******************************************************************************</p>
<p>Dump file set for OCHEF.SYS_EXPORT_TABLE_01 is:</p>
<p>/backup/sales.dmp</p>
<p>Job &#8220;OCHEF&#8221;.&#8221;SYS_EXPORT_TABLE_01&#8243; successfully completed at 11:07:07</p>
<p>关于远程expdp用户权限问题，请移步<a href="http://space.itpub.net/4227/viewspace-448665" target="_blank">这里</a>。</p>
<p>-The End-</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ochef.net%2F2010%2F03%2Faix-network-buffer-parameter-is-set-to-rise-to-rac-failures.html&from=http%3A%2F%2Fwww.ochef.net%2F2010%2F05%2Fexpdp-of-network_link-parameters.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">AIX network buffer参数设置引起RAC故障</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ochef.net%2F2010%2F01%2Fvip-failover-take-long-time-after-network-cable-pulled.html&from=http%3A%2F%2Fwww.ochef.net%2F2010%2F05%2Fexpdp-of-network_link-parameters.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">VIP Failover Take Long Time After Network Cable Pulled</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ochef.net%2F2010%2F11%2Fstudy-aix-5l-network-performance-a.html&from=http%3A%2F%2Fwww.ochef.net%2F2010%2F05%2Fexpdp-of-network_link-parameters.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">学习：AIX 5L网络性能优化(一)</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ochef.net%2F2010%2F11%2Flearning-nfs-network-file-system-optimization-b.html&from=http%3A%2F%2Fwww.ochef.net%2F2010%2F05%2Fexpdp-of-network_link-parameters.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">学习：NFS网络文件系统优化(二)</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://www.ochef.net/2010/05/expdp-of-network_link-parameters.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

