forked from laiweijian4/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Lu, Huayi <luhuayi@huawei.com> Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
131 lines
24 KiB
HTML
131 lines
24 KiB
HTML
<a name="EN-US_TOPIC_0000001145710619"></a><a name="EN-US_TOPIC_0000001145710619"></a>
|
|
|
|
<h1 class="topictitle1">CREATE SERVER</h1>
|
|
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000001145710619__s13dd03a7672f48e7b6b166e1b5878d9a"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0000001145710619__afe74fe1327a9423e88057f2e98721c8b"><strong id="EN-US_TOPIC_0000001145710619__en-us_topic_0040045035_b84235270610495">CREATE SERVER</strong> creates an external server.</p>
|
|
<p id="EN-US_TOPIC_0000001145710619__a586e5bb21d3f4cb6a1ea244e1a20fa23">An external server stores information of HDFS clusters, OBS servers, DLI connections, or other homogeneous clusters.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001145710619__sddfb0f7021694502a04176b91c861329"><h4 class="sectiontitle">Precautions</h4><p id="EN-US_TOPIC_0000001145710619__af175e8b9ed484c73a4732a14880ed4d9">By default, only the system administrator can create a foreign server. Otherwise, creating a server requires permissions on the foreign data wrapper being used. Use the following syntax to grant permissions:</p>
|
|
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001145710619__sa698a1e88de0493796c1bd78642eee7b"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">GRANT</span><span class="w"> </span><span class="k">USAGE</span><span class="w"> </span><span class="k">ON</span><span class="w"> </span><span class="k">FOREIGN</span><span class="w"> </span><span class="k">DATA</span><span class="w"> </span><span class="n">WRAPPER</span><span class="w"> </span><span class="n">fdw_name</span><span class="w"> </span><span class="k">TO</span><span class="w"> </span><span class="n">username</span><span class="p">;</span><span class="w"></span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
<p id="EN-US_TOPIC_0000001145710619__abb89eb60a1fc4c79bf73111006fa5550"><strong id="EN-US_TOPIC_0000001145710619__en-us_topic_0040045035_b8423527068587">fdw_name</strong> is the name of the foreign data wrapper, and <strong id="EN-US_TOPIC_0000001145710619__b842352706155832">username</strong> is the username of creating <strong id="EN-US_TOPIC_0000001145710619__en-us_topic_0040045035_b84235270685824">SERVER</strong>.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001145710619__sb82338cecdab40e29f911262aded4897"><h4 class="sectiontitle">Syntax</h4><div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001145710619__s2bfcfe317dee47ecb847b18714b38d7a"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">CREATE</span><span class="w"> </span><span class="n">SERVER</span><span class="w"> </span><span class="k">server_name</span><span class="w"> </span>
|
|
<span class="w"> </span><span class="k">FOREIGN</span><span class="w"> </span><span class="k">DATA</span><span class="w"> </span><span class="n">WRAPPER</span><span class="w"> </span><span class="n">fdw_name</span><span class="w"></span>
|
|
<span class="w"> </span><span class="k">OPTIONS</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="err">{</span><span class="w"> </span><span class="n">option_name</span><span class="w"> </span><span class="s1">' value '</span><span class="w"> </span><span class="err">}</span><span class="w"> </span><span class="p">[,</span><span class="w"> </span><span class="p">...]</span><span class="w"> </span><span class="p">)</span><span class="w"> </span><span class="p">;</span><span class="w"></span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001145710619__s861ab5a8fd1a4852ae40de714351356e"><h4 class="sectiontitle">Parameter Description</h4><ul id="EN-US_TOPIC_0000001145710619__u4375a87799584dd2ae6aeec2a46fe854"><li id="EN-US_TOPIC_0000001145710619__l20789cbf328f4b5c8dfc419f78f4db4e"><strong id="EN-US_TOPIC_0000001145710619__a5e83dc7de87a4015a99c3c585c8f2c90">server_name</strong><p id="EN-US_TOPIC_0000001145710619__ae907d499d4aa4f7cbc2f184525c9ab52">Name of the foreign server to be created. The server name must be unique in a database.</p>
|
|
<p id="EN-US_TOPIC_0000001145710619__a4dd0efebe7e7465db6c5029928ede811">Value range: The length must be less than or equal to 63.</p>
|
|
</li><li id="EN-US_TOPIC_0000001145710619__l6d1b6ec335bf495997d5f77a63224963"><strong id="EN-US_TOPIC_0000001145710619__a6540cb05d7174b3888605c7bcfd025df">FOREIGN DATA WRAPPER fdw_name</strong><p id="EN-US_TOPIC_0000001145710619__a136bd4449263438381b4101c169f84ed">Specifies the name of the foreign data wrapper.</p>
|
|
<p id="EN-US_TOPIC_0000001145710619__a2b47950e2c72499fa73236438f537d16">Value range: <strong id="EN-US_TOPIC_0000001145710619__b84235270685852">fdw_name</strong> indicates the data wrapper created by the system in the initial phase of the database. Currently, <strong id="EN-US_TOPIC_0000001145710619__b84235270685943">fdw_name</strong> can be <strong id="EN-US_TOPIC_0000001145710619__b84235270685948">hdfs_fdw</strong> or <strong id="EN-US_TOPIC_0000001145710619__b5560627142415">dfs_fdw</strong> for the HDFS cluster, and can be <strong id="EN-US_TOPIC_0000001145710619__b0353101792416">gc_fdw</strong> for other homogeneous clusters.</p>
|
|
</li><li id="EN-US_TOPIC_0000001145710619__l6e41ba91dbfe42398be29479a23230a0"><strong id="EN-US_TOPIC_0000001145710619__a57afb7823db042f9b68414b747173bf2">OPTIONS ( { option_name ' value ' } [, ...] )</strong><p id="EN-US_TOPIC_0000001145710619__aea1103545a724f5ebd7185cf69f0da25">Specifies the parameters for the server. The detailed parameter description is as follows:</p>
|
|
<ul id="EN-US_TOPIC_0000001145710619__u70dc747f3ff44bdb8456ae9cb9c0f0e6"><li id="EN-US_TOPIC_0000001145710619__lcdcaa5c094c544dfbfb4b784eae1537c">address<p id="EN-US_TOPIC_0000001145710619__p165701729143210"><a name="EN-US_TOPIC_0000001145710619__lcdcaa5c094c544dfbfb4b784eae1537c"></a><a name="lcdcaa5c094c544dfbfb4b784eae1537c"></a>Specifies the IP address of the OBS service endpoint or HDFS cluster.</p>
|
|
<p id="EN-US_TOPIC_0000001145710619__p299840163420">OBS: <strong id="EN-US_TOPIC_0000001145710619__b174681011173516">address</strong> is the endpoint of OBS.</p>
|
|
<p id="EN-US_TOPIC_0000001145710619__p68071341153214">HDFS: Specifies the IP address and port number of a NameNode (metadata node) in the HDFS cluster, or the IP address and port number of a CN in other homogeneous clusters.</p>
|
|
<p id="EN-US_TOPIC_0000001145710619__p102135203304">HDFS NameNodes are deployed in primary/secondary mode for HA. Add the addresses of the primary and secondary NameNodes to <strong id="EN-US_TOPIC_0000001145710619__b38581435123017">address</strong>. When accessing HDFS, <span id="EN-US_TOPIC_0000001145710619__text1985858039">GaussDB(DWS)</span> dynamically searches for the active NameNode.</p>
|
|
<div class="note" id="EN-US_TOPIC_0000001145710619__n2c3b7f5959f141bf8d43c9cfa44bb286"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001145710619__p1062634193913"><strong id="EN-US_TOPIC_0000001145710619__b842352706142917">address option</strong> must exist.</p>
|
|
<p id="EN-US_TOPIC_0000001145710619__p17821337133618">If the server type is DLI, the address is the OBS address stored on DLI.</p>
|
|
</div></div>
|
|
</li><li id="EN-US_TOPIC_0000001145710619__l742de39c198c4ccca30e0e541e38f89b">hdfscfgpath<p id="EN-US_TOPIC_0000001145710619__ad6bf5244575648508d5af810a16851bc"><a name="EN-US_TOPIC_0000001145710619__l742de39c198c4ccca30e0e541e38f89b"></a><a name="l742de39c198c4ccca30e0e541e38f89b"></a>This parameter is available only when <strong id="EN-US_TOPIC_0000001145710619__b84235270610957">type</strong> is <strong id="EN-US_TOPIC_0000001145710619__b84235270610100">HDFS</strong>.</p>
|
|
<p id="EN-US_TOPIC_0000001145710619__p16761819175513">You can set the <strong id="EN-US_TOPIC_0000001145710619__b175511439102120">hdfscfgpath</strong> parameter to specify the HDFS configuration file path. <span id="EN-US_TOPIC_0000001145710619__text241035006">GaussDB(DWS)</span> accesses the HDFS cluster based on the connection configuration mode and security mode specified in the HDFS configuration file stored in that path. If the HDFS cluster is connected in non-secure mode, data transmission encryption is not supported.</p>
|
|
<p id="EN-US_TOPIC_0000001145710619__p9657204492412">If the <strong id="EN-US_TOPIC_0000001145710619__b153754613521">address option</strong> is not specified, the address specified by <strong id="EN-US_TOPIC_0000001145710619__b112118342534">hdfscfgpath</strong> in the configuration file is used by default.</p>
|
|
</li><li id="EN-US_TOPIC_0000001145710619__l847f0a51fe264453bcdaceaf1d1cff04">encrypt<p id="EN-US_TOPIC_0000001145710619__a179c4fefda5a49a891b3d27b8bfe6e54"><a name="EN-US_TOPIC_0000001145710619__l847f0a51fe264453bcdaceaf1d1cff04"></a><a name="l847f0a51fe264453bcdaceaf1d1cff04"></a>Specifies whether data is encrypted. This parameter is available only when <strong id="EN-US_TOPIC_0000001145710619__b768030577101022">type</strong> is <strong id="EN-US_TOPIC_0000001145710619__b880004859101022">OBS</strong>. The default value is <strong id="EN-US_TOPIC_0000001145710619__b188431391007">off</strong>.</p>
|
|
<p id="EN-US_TOPIC_0000001145710619__ab76f86be384b48e68c58e8f2a83dbf8e">Value range:</p>
|
|
<ul id="EN-US_TOPIC_0000001145710619__ub87aa64a2b454e4e81e84f51b6b9e2d9"><li id="EN-US_TOPIC_0000001145710619__l720a1406ebec4f3db687639223afc61f"><strong id="EN-US_TOPIC_0000001145710619__b842352706101041">on</strong> indicates that data is encrypted.</li><li id="EN-US_TOPIC_0000001145710619__l2417e942e4984447b7b834e110f96f22"><strong id="EN-US_TOPIC_0000001145710619__b1378122922101054">off</strong> indicates that data is not encrypted.</li></ul>
|
|
</li><li id="EN-US_TOPIC_0000001145710619__l2d663abccd1d4b3490e4c64c44a538d3">access_key<p id="EN-US_TOPIC_0000001145710619__a589ca08b8d6f49f09a42812a8e586edc"><a name="EN-US_TOPIC_0000001145710619__l2d663abccd1d4b3490e4c64c44a538d3"></a><a name="l2d663abccd1d4b3490e4c64c44a538d3"></a>Specifies the access key (AK) (obtained by users from the OBS console) used for the OBS access protocol. When you create a foreign table, its AK value is encrypted and saved to the metadata table of the database. This parameter is available only when <strong id="EN-US_TOPIC_0000001145710619__b810521448">type</strong> is <strong id="EN-US_TOPIC_0000001145710619__b1746317001">OBS</strong>.</p>
|
|
</li><li id="EN-US_TOPIC_0000001145710619__l37cde99d5be94fb180451c320ba3c500">secret_access_key<p id="EN-US_TOPIC_0000001145710619__ad4705a44096947f9807db36975cbb0c2"><a name="EN-US_TOPIC_0000001145710619__l37cde99d5be94fb180451c320ba3c500"></a><a name="l37cde99d5be94fb180451c320ba3c500"></a>Specifies the secret access key (SK) (obtained by users from the OBS console) used for the OBS access protocol. When you create a foreign table, its SK value is encrypted and saved to the metadata table of the database. This parameter is available only when <strong id="EN-US_TOPIC_0000001145710619__b1381745701">type</strong> is <strong id="EN-US_TOPIC_0000001145710619__b800415545">OBS</strong>.</p>
|
|
</li><li id="EN-US_TOPIC_0000001145710619__l89ee852ff8304d3bb8a71562f7c456c0">type<p id="EN-US_TOPIC_0000001145710619__en-us_topic_0059778673_p34741157387"><a name="EN-US_TOPIC_0000001145710619__l89ee852ff8304d3bb8a71562f7c456c0"></a><a name="l89ee852ff8304d3bb8a71562f7c456c0"></a>Specifies the <strong id="EN-US_TOPIC_0000001145710619__b1689671341017">dfs_fdw</strong> connection type.</p>
|
|
<p id="EN-US_TOPIC_0000001145710619__a532854f8d9b94019bafd9820f1a17483">Value range:</p>
|
|
<ul id="EN-US_TOPIC_0000001145710619__ubd4c6e5c4b204bcb887554d7f3d759b0"><li id="EN-US_TOPIC_0000001145710619__l6623699fd9c649dbba4b3aa971925534"><strong id="EN-US_TOPIC_0000001145710619__b842352706101355">OBS</strong> indicates that OBS is connected.</li><li id="EN-US_TOPIC_0000001145710619__lf8a0431c660344da9c89f7e9b64701c8"><strong id="EN-US_TOPIC_0000001145710619__b84235270610147">HDFS</strong> indicates that HDFS is connected.</li><li id="EN-US_TOPIC_0000001145710619__li1921353332620"><strong id="EN-US_TOPIC_0000001145710619__b259741690">DLI</strong> indicates that DLI is connected.</li></ul>
|
|
</li><li id="EN-US_TOPIC_0000001145710619__li42221130192714">dli_address<p id="EN-US_TOPIC_0000001145710619__p3453181672815"><a name="EN-US_TOPIC_0000001145710619__li42221130192714"></a><a name="li42221130192714"></a>Specifies the endpoint of the DLI service. This parameter is available only when <strong id="EN-US_TOPIC_0000001145710619__b1312191919212">type</strong> is <strong id="EN-US_TOPIC_0000001145710619__b931281914217">DLI</strong>.</p>
|
|
</li><li id="EN-US_TOPIC_0000001145710619__li7283184952718">dli_access_key<p id="EN-US_TOPIC_0000001145710619__p695605054612"><a name="EN-US_TOPIC_0000001145710619__li7283184952718"></a><a name="li7283184952718"></a>Specifies the access key (AK) (obtained by users from the DLI console) used for the DLI access protocol. When you create a foreign table, its AK value is encrypted and saved to the metadata table of the database. This parameter is available only when <strong id="EN-US_TOPIC_0000001145710619__b235015296216">type</strong> is <strong id="EN-US_TOPIC_0000001145710619__b3351122962114">DLI</strong>.</p>
|
|
</li><li id="EN-US_TOPIC_0000001145710619__li203411759192713">dli_secret_access_key<p id="EN-US_TOPIC_0000001145710619__p91821055144612"><a name="EN-US_TOPIC_0000001145710619__li203411759192713"></a><a name="li203411759192713"></a>Specifies the secret access key (SK) (obtained by users from the DLI console) used for the DLI access protocol. When you create a foreign table, its SK value is encrypted and saved to the metadata table of the database. This parameter is available only when <strong id="EN-US_TOPIC_0000001145710619__b1839174018216">type</strong> is <strong id="EN-US_TOPIC_0000001145710619__b1239119403211">DLI</strong>.</p>
|
|
</li><li id="EN-US_TOPIC_0000001145710619__li3786105112391">dbname<p id="EN-US_TOPIC_0000001145710619__p1778795110392"><a name="EN-US_TOPIC_0000001145710619__li3786105112391"></a><a name="li3786105112391"></a>Specifies the database name of a remote cluster to be connected. This parameter is used for collaborative analysis.</p>
|
|
</li><li id="EN-US_TOPIC_0000001145710619__li14191536114011">username<p id="EN-US_TOPIC_0000001145710619__p91920366401"><a name="EN-US_TOPIC_0000001145710619__li14191536114011"></a><a name="li14191536114011"></a>Specifies the username of a remote cluster to be connected. This parameter is used for collaborative analysis.</p>
|
|
</li><li id="EN-US_TOPIC_0000001145710619__li16426637184015">password<p id="EN-US_TOPIC_0000001145710619__p164274379404"><a name="EN-US_TOPIC_0000001145710619__li16426637184015"></a><a name="li16426637184015"></a>Specifies the user password of a remote cluster to be connected. This parameter is used for collaborative analysis.</p>
|
|
<div class="note" id="EN-US_TOPIC_0000001145710619__note638417431194"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001145710619__p530161911813">When an on-premises cluster is migrated to the cloud, the password in the server configuration exported from the on-premises cluster is in ciphertext. The encryption and decryption keys of the on-premises cluster are different from those of the cloud cluster. Therefore, if <strong id="EN-US_TOPIC_0000001145710619__b5418818174418">CREATE SERVER</strong> is executed on the cloud cluster, the execution fails and a decryption failure error is reported. In this case, you need to manually change the password in <strong id="EN-US_TOPIC_0000001145710619__b5921103419450">CREATE SERVER</strong> to a plaintext password.</p>
|
|
</div></div>
|
|
</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001145710619__sfd3ea539f79540b2bdedddb211eb1ad5"><h4 class="sectiontitle">Examples</h4><p id="EN-US_TOPIC_0000001145710619__aace6b6ff3fb449acbd1853aeb5b6e639">Create the <strong id="EN-US_TOPIC_0000001145710619__en-us_topic_0058966073_b842352706909">hdfs_server</strong> server, in which <strong id="EN-US_TOPIC_0000001145710619__a9cdc19e8d2e94919b4a49671ae056f73">hdfs_fdw</strong> is the built-in foreign data wrapper.</p>
|
|
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001145710619__s46ba4a0f2be94d528ab22d3e30374d91"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span>
|
|
<span class="normal">4</span>
|
|
<span class="normal">5</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">CREATE</span><span class="w"> </span><span class="n">SERVER</span><span class="w"> </span><span class="n">hdfs_server</span><span class="w"> </span><span class="k">FOREIGN</span><span class="w"> </span><span class="k">DATA</span><span class="w"> </span><span class="n">WRAPPER</span><span class="w"> </span><span class="n">HDFS_FDW</span><span class="w"> </span><span class="k">OPTIONS</span><span class="w"> </span>
|
|
<span class="w"> </span><span class="p">(</span><span class="n">address</span><span class="w"> </span><span class="s1">'10.10.0.100:25000,10.10.0.101:25000'</span><span class="p">,</span><span class="w"></span>
|
|
<span class="w"> </span><span class="n">hdfscfgpath</span><span class="w"> </span><span class="s1">'/opt/hadoop_client/HDFS/hadoop/etc/hadoop'</span><span class="p">,</span><span class="w"> </span>
|
|
<span class="w"> </span><span class="k">type</span><span class="w"> </span><span class="s1">'HDFS'</span><span class="w"></span>
|
|
<span class="p">)</span><span class="w"> </span><span class="p">;</span><span class="w"></span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
<p id="EN-US_TOPIC_0000001145710619__acfb12297e91f4fa2bcefd4694c2b47b5">Create the <strong id="EN-US_TOPIC_0000001145710619__b374612092415">obs_server</strong> server, in which <strong id="EN-US_TOPIC_0000001145710619__b4866923142413">dfs_fdw</strong> is the built-in foreign data wrapper.</p>
|
|
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001145710619__s59c7a176e6924e43b5a05152e1b8a251"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span>
|
|
<span class="normal">4</span>
|
|
<span class="normal">5</span>
|
|
<span class="normal">6</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">CREATE</span><span class="w"> </span><span class="n">SERVER</span><span class="w"> </span><span class="n">obs_server</span><span class="w"> </span><span class="k">FOREIGN</span><span class="w"> </span><span class="k">DATA</span><span class="w"> </span><span class="n">WRAPPER</span><span class="w"> </span><span class="n">DFS_FDW</span><span class="w"> </span><span class="k">OPTIONS</span><span class="w"> </span><span class="p">(</span><span class="w"> </span>
|
|
<span class="w"> </span><span class="n">address</span><span class="w"> </span><span class="s1">'obs.xxx.xxx.com'</span><span class="p">,</span><span class="w"> </span>
|
|
<span class="w"> </span><span class="n">access_key</span><span class="w"> </span><span class="s1">'xxxxxxxxx'</span><span class="p">,</span><span class="w"> </span>
|
|
<span class="w"> </span><span class="n">secret_access_key</span><span class="w"> </span><span class="s1">'yyyyyyyyyyyyy'</span><span class="p">,</span><span class="w"> </span>
|
|
<span class="w"> </span><span class="k">type</span><span class="w"> </span><span class="s1">'obs'</span><span class="w"></span>
|
|
<span class="p">);</span><span class="w"></span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
<p id="EN-US_TOPIC_0000001145710619__p201741055105315">Create the <strong id="EN-US_TOPIC_0000001145710619__b1358551813239">dli_server</strong> server, in which <strong id="EN-US_TOPIC_0000001145710619__b1121117269235">dfs_fdw</strong> is the built-in foreign data wrapper.</p>
|
|
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001145710619__screen217485555315"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span>
|
|
<span class="normal">4</span>
|
|
<span class="normal">5</span>
|
|
<span class="normal">6</span>
|
|
<span class="normal">7</span>
|
|
<span class="normal">8</span>
|
|
<span class="normal">9</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">CREATE</span><span class="w"> </span><span class="n">SERVER</span><span class="w"> </span><span class="n">dli_server</span><span class="w"> </span><span class="k">FOREIGN</span><span class="w"> </span><span class="k">DATA</span><span class="w"> </span><span class="n">WRAPPER</span><span class="w"> </span><span class="n">DFS_FDW</span><span class="w"> </span><span class="k">OPTIONS</span><span class="w"> </span><span class="p">(</span><span class="w"> </span>
|
|
<span class="w"> </span><span class="n">address</span><span class="w"> </span><span class="s1">'obs.xxx.xxx.com'</span><span class="p">,</span><span class="w"> </span>
|
|
<span class="w"> </span><span class="n">access_key</span><span class="w"> </span><span class="s1">'xxxxxxxxx'</span><span class="p">,</span><span class="w"> </span>
|
|
<span class="w"> </span><span class="n">secret_access_key</span><span class="w"> </span><span class="s1">'yyyyyyyyyyyyy'</span><span class="p">,</span><span class="w"> </span>
|
|
<span class="w"> </span><span class="k">type</span><span class="w"> </span><span class="s1">'dli'</span><span class="p">,</span><span class="w"></span>
|
|
<span class="w"> </span><span class="n">dli_address</span><span class="w"> </span><span class="s1">'dli.xxx.xxx.com'</span><span class="p">,</span><span class="w"></span>
|
|
<span class="w"> </span><span class="n">dli_access_key</span><span class="w"> </span><span class="s1">'xxxxxxxxx'</span><span class="p">,</span><span class="w"></span>
|
|
<span class="w"> </span><span class="n">dli_secret_access_key</span><span class="w"> </span><span class="s1">'yyyyyyyyyyyyy'</span><span class="w"></span>
|
|
<span class="p">);</span><span class="w"></span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
<p id="EN-US_TOPIC_0000001145710619__p15567195164413">Create another server in the homogeneous cluster, where <strong id="EN-US_TOPIC_0000001145710619__b58210918263">gc_fdw</strong> is the foreign data wrapper in the database.</p>
|
|
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001145710619__screen11567205134412"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span>
|
|
<span class="normal">4</span>
|
|
<span class="normal">5</span>
|
|
<span class="normal">6</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">CREATE</span><span class="w"> </span><span class="n">SERVER</span><span class="w"> </span><span class="n">server_remote</span><span class="w"> </span><span class="k">FOREIGN</span><span class="w"> </span><span class="k">DATA</span><span class="w"> </span><span class="n">WRAPPER</span><span class="w"> </span><span class="n">GC_FDW</span><span class="w"> </span><span class="k">OPTIONS</span><span class="w"> </span>
|
|
<span class="w"> </span><span class="p">(</span><span class="n">address</span><span class="w"> </span><span class="s1">'10.10.0.100:25000,10.10.0.101:25000'</span><span class="p">,</span><span class="w"></span>
|
|
<span class="w"> </span><span class="n">dbname</span><span class="w"> </span><span class="s1">'test'</span><span class="p">,</span><span class="w"> </span>
|
|
<span class="w"> </span><span class="n">username</span><span class="w"> </span><span class="s1">'test'</span><span class="p">,</span><span class="w"> </span>
|
|
<span class="w"> </span><span class="n">password</span><span class="w"> </span><span class="s1">'xxxxxxxx'</span><span class="w"></span>
|
|
<span class="p">);</span><span class="w"></span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
<p id="EN-US_TOPIC_0000001145710619__p8214174373214">Helpful Links</p>
|
|
<p id="EN-US_TOPIC_0000001145710619__p1529935518336"><a href="dws_06_0138.html">ALTER SERVER</a> <a href="dws_06_0206.html">DROP SERVER</a></p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_06_0118.html">DDL Syntax</a></div>
|
|
</div>
|
|
</div>
|
|
|