1
0
forked from docs/doc-exports

DWS UMN 20240716 version

Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Lu, Huayi <luhuayi@huawei.com>
Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
This commit is contained in:
Lu, Huayi 2024-07-31 10:31:12 +00:00 committed by zuul
parent 53ff2fdf54
commit c7583a6c9d
90 changed files with 141 additions and 405 deletions

View File

@ -1922,7 +1922,7 @@
"node_id":"en-us_topic_0000001707293881.xml",
"product_code":"dws",
"code":"102",
"des":"Cluster-level restoration consists of two steps:Data restoration: Restores data in the backup set to the data directory of each primary DN/CN instance in parallel.Rebuild",
"des":"Cluster-level restoration consists of two steps:Data restoration: The backup tool simultaneously restores data from the backup set to the data directory of each instance,",
"doc_type":"usermanual",
"kw":"Constraints on Restoring a Snapshot,Restoration Using a Snapshot,User Guide",
"search_title":"",
@ -3575,7 +3575,7 @@
"node_id":"en-us_topic_0000001330808740.xml",
"product_code":"dws",
"code":"189",
"des":"After a GaussDB(DWS) cluster is created, you can add, delete, or modify security group rules in the current security group.Modifying an existing security group rule:Log i",
"des":"After a GaussDB(DWS) cluster is created, you can add, delete, or modify security group rules in the current security group.Modify an existing security group rule:Log in t",
"doc_type":"usermanual",
"kw":"Can I Modify the Security Group of a GaussDB(DWS) Cluster?,General Problems,User Guide",
"search_title":"",
@ -4238,7 +4238,7 @@
"node_id":"en-us_topic_0000001330648772.xml",
"product_code":"dws",
"code":"224",
"des":"CN is short for Coordinator Node. A CN is an important component of GaussDB(DWS) and is closely related to users. It provides interfaces to external applications, optimiz",
"des":"Coordinator Node (CN) is an important component in GaussDB(DWS) that is most closely related to users. It provides external application interfaces, optimizes global execu",
"doc_type":"usermanual",
"kw":"When Should I Add CNs or Scale out a cluster?,Cluster Management,User Guide",
"search_title":"",
@ -4371,7 +4371,7 @@
"node_id":"en-us_topic_0000001330488828.xml",
"product_code":"dws",
"code":"231",
"des":"No, direct access is not supported. VMs at the bottom layer of GaussDB(DWS) serve as the compute nodes for data analysis. Access cluster databases using the private or pu",
"des":"No, you can't, VMs at the bottom layer of GaussDB(DWS) serve as the compute nodes for data analysis. However, the GaussDB(DWS) compute nodes cannot be accessed directly. ",
"doc_type":"usermanual",
"kw":"Can I Connect to GaussDB(DWS) Cluster Nodes Using SSH?,Database Connections,User Guide",
"search_title":"",
@ -4409,7 +4409,7 @@
"node_id":"en-us_topic_0000001381889069.xml",
"product_code":"dws",
"code":"233",
"des":"After the EIP is unbound, the network may be disconnected. However, the TCP layer does not detect a faulty physical connection in time due to keepalive settings. As a res",
"des":"The network is disconnected when the EIP is unbound. However, the TCP layer does not detect a faulty physical connection in time due to keepalive settings. As a result, t",
"doc_type":"usermanual",
"kw":"Why Was I Not Notified of Failure Unbinding the EIP When GaussDB(DWS) Is Connected Over the Internet",
"search_title":"",
@ -4597,7 +4597,7 @@
"node_id":"en-us_topic_0000001330648780.xml",
"product_code":"dws",
"code":"243",
"des":"Heterogeneous data can be imported to GaussDB(DWS) using CDM. You can migrate an entire Oracle, MySQL, SQL Server, or GaussDB(DWS) database to a GaussDB(DWS) databse. For",
"des":"Heterogeneous data can be imported to GaussDB(DWS) using CDM. You can migrate an entire Oracle, MySQL, SQL Server, or GaussDB(DWS) database to a GaussDB(DWS) database. Fo",
"doc_type":"usermanual",
"kw":"How Do I Import GaussDB(DWS)/Oracle/MySQL/SQL Server Data to GaussDB(DWS) (Whole Database Migration)",
"search_title":"",
@ -4730,7 +4730,7 @@
"node_id":"en-us_topic_0000001330808760.xml",
"product_code":"dws",
"code":"250",
"des":"This section describes how to grant the query permission for a schema as an example. For more information, see \"How Do I Grant Table Permissions to a User?\" in FAQs:Perm",
"des":"This section describes how to grant the query permission for a schema as an example. For more information, see \"How Do I Grant Table Permissions to a User?\" in FAQ. You ",
"doc_type":"usermanual",
"kw":"How Do I Grant Schema Permissions to a User?,Account, Password, and Permission,User Guide",
"search_title":"",
@ -4958,7 +4958,7 @@
"node_id":"en-us_topic_0000001533476366.xml",
"product_code":"dws",
"code":"262",
"des":"The execution speed of an ordinary user is slower than that of the dbadmin user in the following scenarios:Ordinary users queuing: waiting in queue/waiting in global queu",
"des":"The execution speed of an ordinary user is slower than that of the dbadmin user in the following scenarios:Ordinary users are queuing: waiting in queue/waiting in global ",
"doc_type":"usermanual",
"kw":"Why the Tasks Executed by an Ordinary User Are Slower Than That Executed by the dbadmin User?,Databa",
"search_title":"",

View File

@ -909,7 +909,7 @@
"code":"101"
},
{
"desc":"Cluster-level restoration consists of two steps:Data restoration: Restores data in the backup set to the data directory of each primary DN/CN instance in parallel.Rebuild",
"desc":"Cluster-level restoration consists of two steps:Data restoration: The backup tool simultaneously restores data from the backup set to the data directory of each instance,",
"product_code":"dws",
"title":"Constraints on Restoring a Snapshot",
"uri":"dws_01_1029.html",
@ -1692,7 +1692,7 @@
"code":"188"
},
{
"desc":"After a GaussDB(DWS) cluster is created, you can add, delete, or modify security group rules in the current security group.Modifying an existing security group rule:Log i",
"desc":"After a GaussDB(DWS) cluster is created, you can add, delete, or modify security group rules in the current security group.Modify an existing security group rule:Log in t",
"product_code":"dws",
"title":"Can I Modify the Security Group of a GaussDB(DWS) Cluster?",
"uri":"dws_03_0053.html",
@ -2007,7 +2007,7 @@
"code":"223"
},
{
"desc":"CN is short for Coordinator Node. A CN is an important component of GaussDB(DWS) and is closely related to users. It provides interfaces to external applications, optimiz",
"desc":"Coordinator Node (CN) is an important component in GaussDB(DWS) that is most closely related to users. It provides external application interfaces, optimizes global execu",
"product_code":"dws",
"title":"When Should I Add CNs or Scale out a cluster?",
"uri":"dws_03_2140.html",
@ -2070,7 +2070,7 @@
"code":"230"
},
{
"desc":"No, direct access is not supported. VMs at the bottom layer of GaussDB(DWS) serve as the compute nodes for data analysis. Access cluster databases using the private or pu",
"desc":"No, you can't, VMs at the bottom layer of GaussDB(DWS) serve as the compute nodes for data analysis. However, the GaussDB(DWS) compute nodes cannot be accessed directly. ",
"product_code":"dws",
"title":"Can I Connect to GaussDB(DWS) Cluster Nodes Using SSH?",
"uri":"dws_03_0040.html",
@ -2088,7 +2088,7 @@
"code":"232"
},
{
"desc":"After the EIP is unbound, the network may be disconnected. However, the TCP layer does not detect a faulty physical connection in time due to keepalive settings. As a res",
"desc":"The network is disconnected when the EIP is unbound. However, the TCP layer does not detect a faulty physical connection in time due to keepalive settings. As a result, t",
"product_code":"dws",
"title":"Why Was I Not Notified of Failure Unbinding the EIP When GaussDB(DWS) Is Connected Over the Internet?",
"uri":"dws_03_0025.html",
@ -2178,7 +2178,7 @@
"code":"242"
},
{
"desc":"Heterogeneous data can be imported to GaussDB(DWS) using CDM. You can migrate an entire Oracle, MySQL, SQL Server, or GaussDB(DWS) database to a GaussDB(DWS) databse. For",
"desc":"Heterogeneous data can be imported to GaussDB(DWS) using CDM. You can migrate an entire Oracle, MySQL, SQL Server, or GaussDB(DWS) database to a GaussDB(DWS) database. Fo",
"product_code":"dws",
"title":"How Do I Import GaussDB(DWS)/Oracle/MySQL/SQL Server Data to GaussDB(DWS) (Whole Database Migration)?",
"uri":"dws_03_0074.html",
@ -2241,7 +2241,7 @@
"code":"249"
},
{
"desc":"This section describes how to grant the query permission for a schema as an example. For more information, see \"How Do I Grant Table Permissions to a User?\" in FAQs:Perm",
"desc":"This section describes how to grant the query permission for a schema as an example. For more information, see \"How Do I Grant Table Permissions to a User?\" in FAQ. You ",
"product_code":"dws",
"title":"How Do I Grant Schema Permissions to a User?",
"uri":"dws_03_0196.html",
@ -2349,7 +2349,7 @@
"code":"261"
},
{
"desc":"The execution speed of an ordinary user is slower than that of the dbadmin user in the following scenarios:Ordinary users queuing: waiting in queue/waiting in global queu",
"desc":"The execution speed of an ordinary user is slower than that of the dbadmin user in the following scenarios:Ordinary users are queuing: waiting in queue/waiting in global ",
"product_code":"dws",
"title":"Why the Tasks Executed by an Ordinary User Are Slower Than That Executed by the dbadmin User?",
"uri":"dws_03_2112.html",

View File

@ -16,7 +16,7 @@
</li><li id="EN-US_TOPIC_0000001707254473__en-us_topic_0000001372520090_li6828131174311">Fast data loading<p id="EN-US_TOPIC_0000001707254473__en-us_topic_0000001372520090_p3228133419433"><a name="EN-US_TOPIC_0000001707254473__en-us_topic_0000001372520090_li6828131174311"></a><a name="en-us_topic_0000001372520090_li6828131174311"></a>GDS is a tool that helps you with high-speed massively parallel data loading.</p>
</li></ul>
<p id="EN-US_TOPIC_0000001707254473__en-us_topic_0000001372520090_p1158713055011"><strong id="EN-US_TOPIC_0000001707254473__en-us_topic_0000001372520090_b2855114411256">High scalability</strong></p>
<ul id="EN-US_TOPIC_0000001707254473__en-us_topic_0000001372520090_ul78605212443"><li id="EN-US_TOPIC_0000001707254473__en-us_topic_0000001372520090_li138611021134415">On-demand scale-out: With the shared-nothing open architecture, nodes can be added at any time to enhance the data storage, query, and analysis capabilities of the system.</li><li id="EN-US_TOPIC_0000001707254473__en-us_topic_0000001372520090_li20861521114410">Enhanced linear performance after scale-out: The capacity and performance increase linearly with the cluster scale. The linear rate is 0.8.</li><li id="EN-US_TOPIC_0000001707254473__en-us_topic_0000001372520090_li1861112115446">Service continuity: During scale-out, data can be added, deleted, modified, and queried, and DDL operations (<strong id="EN-US_TOPIC_0000001707254473__en-us_topic_0000001372520090_b193984207321">DROP</strong>/<strong id="EN-US_TOPIC_0000001707254473__en-us_topic_0000001372520090_b18749141893217">TRUNCATE</strong>/<strong id="EN-US_TOPIC_0000001707254473__en-us_topic_0000001372520090_b188631315113217">ALTER TABLE</strong>) can be performed. Online table-level scale-out ensures service continuity.</li></ul>
<ul id="EN-US_TOPIC_0000001707254473__en-us_topic_0000001372520090_ul78605212443"><li id="EN-US_TOPIC_0000001707254473__en-us_topic_0000001372520090_li138611021134415">On-demand scale-out: With the shared-nothing open architecture, nodes can be added at any time to enhance the data storage, query, and analysis capabilities of the system.</li><li id="EN-US_TOPIC_0000001707254473__en-us_topic_0000001372520090_li20861521114410">Enhanced linear performance after scale-out: The capacity and performance increase linearly with the cluster scale. The linear rate is 0.8.</li><li id="EN-US_TOPIC_0000001707254473__en-us_topic_0000001372520090_li1861112115446">Service continuity: During scale-out, data can be added, deleted, modified, and queried, and DDL operations (<strong id="EN-US_TOPIC_0000001707254473__en-us_topic_0000001372520090_b193984207321">DROP</strong>/<strong id="EN-US_TOPIC_0000001707254473__en-us_topic_0000001372520090_b18749141893217">TRUNCATE</strong>/<strong id="EN-US_TOPIC_0000001707254473__en-us_topic_0000001372520090_b188631315113217">ALTER TABLE</strong>) can be performed. Online table-level scale-out ensures service continuity.</li><li id="EN-US_TOPIC_0000001707254473__en-us_topic_0000001372520090_li1553710301151">Online upgrade: Upgrading major versions online from 8.1.1 and performing online patch upgrades from 8.1.3 and later versions is now possible without interrupting your services. Any interruptions will only last a few seconds.</li></ul>
<p id="EN-US_TOPIC_0000001707254473__en-us_topic_0000001372520090_p165903323451"><strong id="EN-US_TOPIC_0000001707254473__en-us_topic_0000001372520090_b201191347143213">Robust reliability</strong></p>
<ul id="EN-US_TOPIC_0000001707254473__en-us_topic_0000001372520090_ul82779085716"><li id="EN-US_TOPIC_0000001707254473__en-us_topic_0000001372520090_li476413451473">ACID<p id="EN-US_TOPIC_0000001707254473__en-us_topic_0000001372520090_p39168473713"><a name="EN-US_TOPIC_0000001707254473__en-us_topic_0000001372520090_li476413451473"></a><a name="en-us_topic_0000001372520090_li476413451473"></a>Support for the atomicity, consistency, isolation, and durability (ACID) feature, which ensures strong data consistency for distributed transactions.</p>
</li><li id="EN-US_TOPIC_0000001707254473__en-us_topic_0000001372520090_li15287142010580">Comprehensive HA design<p id="EN-US_TOPIC_0000001707254473__en-us_topic_0000001372520090_p1961452325818"><a name="EN-US_TOPIC_0000001707254473__en-us_topic_0000001372520090_li15287142010580"></a><a name="en-us_topic_0000001372520090_li15287142010580"></a>All software processes of GaussDB(DWS) are in active/standby mode. Logical components such as the CNs and DNs of each cluster also work in active/standby mode. This ensures data reliability and consistency when any single point of failure (SPOF) occurs.</p>

View File

@ -2,11 +2,11 @@
<h1 class="topictitle1">Step 2: Creating a Cluster</h1>
<div id="body8662426"><p id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_p291616474813">Before using GaussDB(DWS) to analyze data, create a cluster. A cluster consists of multiple nodes in the same subnet. These nodes jointly provide services. This section describes how to create a GaussDB(DWS) cluster.</p>
<div class="section" id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_section104149431131"><h4 class="sectiontitle">Creating a Cluster</h4><ol id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_ol1649726614233"><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li6029015714233"><span>Log in to the GaussDB(DWS) management console.</span></li><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li226234352"><span>In the navigation pane on the left, choose <span class="uicontrol" id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_u2246c2b3da084fdb8fdd78254cfafda9"><b>Cluster &gt; Dedicated Cluster</b></span>.</span></li><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li63277252161245"><span>On the <strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b6271644544">Dedicated Cluster</strong> page, click <strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b2773104918208">Create Cluster</strong> in the upper right corner.</span></li><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li1422605291313"><span>Select the region to which the cluster to be created belongs.</span><p><ul id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_ul2673243141713"><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li0591886205"><strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b9652420192017">Region</strong>: Select the current working area of the cluster.</li><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li768864321715"><strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b27921748435">AZ</strong>: Retain the default value. </li></ul>
<div class="section" id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_section104149431131"><h4 class="sectiontitle">Creating a Cluster</h4><ol id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_ol1649726614233"><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li6029015714233"><span>Log in to the GaussDB(DWS) management console.</span></li><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li226234352"><span>In the navigation pane, choose <strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b4998185711718">Cluster</strong> &gt; <strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b177619317811">Dedicated Clusters<span id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_text114261216165419"></span></strong>.</span></li><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li63277252161245"><span>On the <strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b1388419371283">Dedicated Clusters<span id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_text163383245542"></span></strong> page, click <strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b2088518371815">Create Cluster</strong> in the upper right corner.</span></li><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li1422605291313"><span>Select the region to which the cluster to be created belongs.</span><p><ul id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_ul2673243141713"><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li0591886205"><strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b9652420192017">Region</strong>: Select the current working area of the cluster.</li><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li768864321715"><strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b27921748435">AZ</strong>: Retain the default value. </li></ul>
</p></li><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li3509811181412"><span>Configure node parameters.</span><p><ul id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_ul3617182404112"><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li16136361151"><strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b412811719564">Resource</strong>: For example, <strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b6128317135610">Standard</strong>.</li><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li12608533142115"><strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b106646351267">CPU Architecture</strong>: Select a CPU architecture based on your requirements, for example, <strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b14664183511265">x86</strong>.</li><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li174125558519"><strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b108993477207">Node Flavor</strong>: Retain the default value.</li><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li1363312424111"><strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b18633253159">Nodes</strong>: Retain the default value. At least <strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b122512111846">3</strong> nodes are required.</li></ul>
</p></li><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li250803614263"><span>Configure cluster parameters.</span><p><ul id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_ul132177543292"><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li721765419298"><strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b16036229252">Cluster Name</strong>: Enter <strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b34153269254">dws-demo</strong>.</li><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li132295612719"><strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b982211416481">Cluster Version</strong>: The current cluster version is displayed and cannot be changed.</li><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li132331754192915"><strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b9837143942513">Default Database</strong>: The value is <span class="parmvalue" id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_parmvalue2233354112917"><b><span id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_text1287103795414">gaussdb</span></b></span>, which cannot be changed.</li><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li1224918542292"><strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b79781929142612">Administrator Account</strong>: The default value is <strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b12853163612269">dbadmin</strong>. Use the default value. After a cluster is created, the client uses this database administrator account and its password to connect to the cluster's database.</li><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li12249954192911"><strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b46931626115914">Administrator Password</strong>: Enter the password.</li><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li326314541299"><strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b377523253011">Confirm Password</strong>: Enter the database administrator password again.</li><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li12263154172918"><strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b13527436304">Database Port</strong>: Use the default port number. This port is used by the client or application to connect to the cluster's database.</li></ul>
<div class="fignone" id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_fig8713143792811"><span class="figcap"><b>Figure 1 </b>Configuring the cluster</span><br><span><img id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_image164010498163" src="figure/en-us_image_0000001231389497.png" title="Click to enlarge" class="imgResize"></span></div>
</p></li><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li123915537131"><span>Configure network parameters.</span><p><ul id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_ul12330104953110"><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li12345144913118"><strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b95040215231">VPC</strong>: You can select an existing VPC from the drop-down list. If no VPC has been configured, click <strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b55104218233">View VPC</strong> to enter the VPC management console to create one, for example, <strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b7511621152316">vpc-dws</strong>. Then, go back to the page for creating a cluster on the GaussDB(DWS) management console, click <span><img id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_image0584421174519" src="figure/en-us_image_0000001231389491.png"></span> next to the <span class="parmname" id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_parmname18621165214224"><b>VPC</b></span> drop-down list, and select the new VPC.</li><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li936111493311"><strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b115255215450">Subnet</strong>: When you create a VPC, a subnet is created by default. You can select the corresponding subnet.</li><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li5378124919315"><strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b1067772324620">Security Group</strong>: Select <span class="parmvalue" id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_parmvalue85217455468"><b>Automatic creation</b></span>.<p id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_p1439310499315">The automatically created security group is named <strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b5899171819170">GaussDB(DWS)</strong>-&lt;<em id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_i139006183174">Cluster name</em>&gt;-&lt;<em id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_i129001318121712">GaussDB(DWS) cluster database port</em>&gt;. The outbound allows all access requests, while the inbound enables only <strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b0900218181711">Database Port</strong> for access requests from clients or applications.</p>
</p></li><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li123915537131"><span>Configure network parameters.</span><p><ul id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_ul12330104953110"><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li12345144913118"><strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b95040215231">VPC</strong>: You can select an existing VPC from the drop-down list. If no VPC has been configured, click <strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b55104218233">View VPC</strong> to enter the VPC management console to create one, for example, <strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b7511621152316">vpc-dws</strong>. Then, go back to the page for creating a cluster on the GaussDB(DWS) console, click <span><img id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_image0584421174519" src="figure/en-us_image_0000001231389491.png"></span> next to the <span class="parmname" id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_parmname18621165214224"><b>VPC</b></span> drop-down list, and select the new VPC.</li><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li936111493311"><strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b115255215450">Subnet</strong>: When you create a VPC, a subnet is created by default. You can select the corresponding subnet.</li><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li5378124919315"><strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b1067772324620">Security Group</strong>: Select <span class="parmvalue" id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_parmvalue85217455468"><b>Automatic creation</b></span>.<p id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_p1439310499315">The automatically created security group is named <strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b5899171819170">GaussDB(DWS)</strong>-&lt;<em id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_i139006183174">Cluster name</em>&gt;-&lt;<em id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_i129001318121712">GaussDB(DWS) cluster database port</em>&gt;. The outbound allows all access requests, while the inbound enables only <strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b0900218181711">Database Port</strong> for access requests from clients or applications.</p>
<p id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_p10928141314713">If you select a custom security group, add an inbound rule to it to enable <strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b426010387576">Database Port</strong> for client hosts to access GaussDB(DWS). <a href="#EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_table19508017113430">Table 1</a> shows an example. For details about how to add an inbound rule, see "Security &gt; Security Group &gt; Adding a Security Group Rule" in the <em id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_i4561624851">Virtual Private Cloud User Guide</em>.</p>
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_table19508017113430"></a><a name="en-us_topic_0000001372679790_table19508017113430"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_table19508017113430" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Inbound rule example</caption><thead align="left"><tr id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_row23155325113430"><th align="left" class="cellrowborder" valign="top" width="30.64%" id="mcps1.3.2.2.7.2.1.3.5.2.3.1.1"><p id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_p43667920113430"><strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_en-us_topic_0111441330_b63022988143745">Parameter</strong></p>
@ -41,7 +41,7 @@
<p id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_p43059551051">You can select the default enterprise project <span class="parmvalue" id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_parmvalue179951447105213"><b>default</b></span> or other existing enterprise projects. To create an enterprise project, log in to the Enterprise Management console. For details, see <em id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_i517384915539">Enterprise Management User Guide</em>.</p>
</p></li><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li12731024123113"><span>Select <span class="parmname" id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_parmname199906301105"><b>Default</b></span> for <strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b537753715815">Advanced Settings</strong> in this example.</span><p><ul id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_ul5460153173816"><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li1446015343814"><strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b153054615712">Default</strong>: indicates that the following advanced settings use the default configurations.<ul id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_ul1986713232429"><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li4252191818248"><strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b53419195119">CNs</strong>: Three CNs are deployed by default.</li><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li6380852173414"><strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b1384220244151">Tag</strong>: By default, no tag is added to the cluster.</li><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li4561835194015"><strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b1317095821514">Encrypt DataStore</strong>: This parameter is disabled by default, indicating that the database is not encrypted.</li></ul>
</li><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li3460133384"><strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b366894713817">Custom</strong>: Select this option to configure the following advanced parameters: <strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b066824715815">Automated Snapshot</strong>, <strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b66681476818">CNs</strong>, <strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b116681447589">Tag</strong></li></ul>
</p></li><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li36258555152115"><span>Click <strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b99883153910">Create Now</strong>. The <strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b398811518914">Confirm</strong> page is displayed.</span></li><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li47734902152356"><span>Click <strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b817385610281">Submit</strong>.</span><p><p id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_en-us_topic_0106894662_p4318009414">After the submission is successful, the creation starts. Click <span class="uicontrol" id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_uicontrol69391146151"><b>Back to Cluster List</b></span>. The <strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b20131103310512">Dedicated Cluster</strong> page is displayed. The initial status of the cluster is <span class="parmvalue" id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_parmvalue169465410159"><b>Creating</b></span>. Cluster creation takes some time. Wait for a while. Clusters in the <span class="parmname" id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_parmname769647905151646"><b>Available</b></span> state are ready for use.</p>
</p></li><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li36258555152115"><span>Click <strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b1789818521385">Create Now</strong>. The <strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b138986521780">Confirm</strong> page is displayed.</span></li><li id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_li47734902152356"><span>Click <strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b817385610281">Submit</strong>.</span><p><p id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_en-us_topic_0106894662_p4318009414">After the submission is successful, the creation starts. Click <span class="uicontrol" id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_uicontrol167661830590"><b>Back to Cluster List</b></span>. The <strong id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_b207668300913">Dedicated Clusters<span id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_text129867382545"></span></strong> page is displayed. The initial status of the cluster is <span class="parmvalue" id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_parmvalue1276614308919"><b>Creating</b></span>. Cluster creation takes some time. Wait for a while. Clusters in the <span class="parmname" id="EN-US_TOPIC_0000001658895142__en-us_topic_0000001372679790_parmname769647905151646"><b>Available</b></span> state are ready for use.</p>
</p></li></ol>
</div>
</div>

View File

@ -2,7 +2,7 @@
<h1 class="topictitle1">Settings</h1>
<div id="body8662426"><p id="EN-US_TOPIC_0000001658895206__en-us_topic_0000001423119253_en-us_topic_0000001076708691_p3469165714610">The <strong id="EN-US_TOPIC_0000001658895206__en-us_topic_0000001076708691_b9150125812432">Monitoring</strong> page displays the collection period and data aging period of monitoring metrics.</p>
<div class="note" id="EN-US_TOPIC_0000001658895206__en-us_topic_0000001423119253_en-us_topic_0000001076708691_note211041641515"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="EN-US_TOPIC_0000001658895206__en-us_topic_0000001423119253_en-us_topic_0000001076708691_ul1779182553417"><li id="EN-US_TOPIC_0000001658895206__en-us_topic_0000001423119253_en-us_topic_0000001076708691_li1477922523411">The cluster monitoring function is enabled by default.</li><li id="EN-US_TOPIC_0000001658895206__en-us_topic_0000001423119253_en-us_topic_0000001076708691_li677982513417">Disable the function if the cluster is being recovered. Enable the function when the fault is rectified.</li><li id="EN-US_TOPIC_0000001658895206__en-us_topic_0000001423119253_en-us_topic_0000001076708691_li14538104683317">When a node in the cluster is powered off or the IP address of the dedicated cluster is unavailable, the cluster monitoring switch and the button for configuring cluster meitric collection are unavailable.</li></ul>
<div class="note" id="EN-US_TOPIC_0000001658895206__en-us_topic_0000001423119253_en-us_topic_0000001076708691_note211041641515"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="EN-US_TOPIC_0000001658895206__en-us_topic_0000001423119253_en-us_topic_0000001076708691_ul1779182553417"><li id="EN-US_TOPIC_0000001658895206__en-us_topic_0000001423119253_en-us_topic_0000001076708691_li1477922523411">The cluster monitoring function is enabled by default.</li><li id="EN-US_TOPIC_0000001658895206__en-us_topic_0000001423119253_en-us_topic_0000001076708691_li677982513417">Disable the function if the cluster is being recovered. Enable the function when the fault is rectified.</li><li id="EN-US_TOPIC_0000001658895206__en-us_topic_0000001423119253_en-us_topic_0000001076708691_li14538104683317">When a node in the cluster is powered off or the IP address of the dedicated cluster is unavailable, the cluster monitoring switch and the button for configuring cluster metric collection are unavailable.</li></ul>
</div></div>
<div class="section" id="EN-US_TOPIC_0000001658895206__en-us_topic_0000001423119253_en-us_topic_0000001076708691_section149871230683"><a name="EN-US_TOPIC_0000001658895206__en-us_topic_0000001423119253_en-us_topic_0000001076708691_section149871230683"></a><a name="en-us_topic_0000001423119253_en-us_topic_0000001076708691_section149871230683"></a><h4 class="sectiontitle">Monitoring Collection</h4><ol id="EN-US_TOPIC_0000001658895206__en-us_topic_0000001423119253_en-us_topic_0000001076708691_o4d27c72c9c5b483283c532fd703af879"><li id="EN-US_TOPIC_0000001658895206__en-us_topic_0000001423119253_en-us_topic_0000001076708691_l3bf4b8bc45d343b6aec0b48be7dfc1aa"><span>Log in to the GaussDB(DWS) management console.</span></li><li id="EN-US_TOPIC_0000001658895206__en-us_topic_0000001423119253_en-us_topic_0000001076708691_li11952509114244"><span>On the <strong id="EN-US_TOPIC_0000001658895206__b626673717442">Clusters</strong> &gt; <strong id="EN-US_TOPIC_0000001658895206__b10266163711445">Dedicated Clusters</strong> page, locate the cluster to be monitored.</span></li><li id="EN-US_TOPIC_0000001658895206__en-us_topic_0000001423119253_en-us_topic_0000001076708691_li8798326172918"><span>In the <strong id="EN-US_TOPIC_0000001658895206__b9498559124914">Operation</strong> column of the target cluster, choose <strong id="EN-US_TOPIC_0000001658895206__b1549819593491">Monitoring Panel</strong>. The database monitoring page is displayed.</span></li><li id="EN-US_TOPIC_0000001658895206__en-us_topic_0000001076708691_li32311493910"><span>In the navigation pane on the left, choose <strong id="EN-US_TOPIC_0000001658895206__b13650153994417">Monitoring Settings</strong> &gt; <strong id="EN-US_TOPIC_0000001658895206__b2650123917448">Monitoring Collection</strong>. You can reconfigure the collection frequency or disable the collection of the monitoring item.</span><p><p id="EN-US_TOPIC_0000001658895206__en-us_topic_0000001076708691_p1428184522919"><span><img id="EN-US_TOPIC_0000001658895206__image1290363815518" src="figure/en-us_image_0000001859083697.png" title="Click to enlarge" class="imgResize"></span></p>
</p></li></ol>

View File

@ -6,7 +6,7 @@
<div class="section" id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_section15419130142012"><h4 class="sectiontitle">Preparations Before Creating a Cluster</h4><ul id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_ul31312184142054"><li id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_li60603325142054">You have evaluated the flavor of cluster nodes.<p id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_p65134720142823"><a name="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_li60603325142054"></a><a name="en-us_topic_0000001423119181_li60603325142054"></a>You can select the number of nodes by data volume, service load, and performance. More nodes bring you stronger storage and compute capabilities.</p>
<p id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_p178761821171918">When first using GaussDB(DWS), you can create a cluster with a smaller flavor. Then, you can adjust the cluster scale and node flavor based on the data volume and service load changes without interrupting services. For details, see <a href="dws_01_0023.html">Scaling Out a Cluster</a>.</p>
</li><li id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_li698334261918">Determine the number of nodes that can be used by users.<p id="EN-US_TOPIC_0000001659054474__p11737144162810"><a name="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_li698334261918"></a><a name="en-us_topic_0000001423119181_li698334261918"></a>The number of nodes that can be used by users must meet the following requirements. Otherwise, the system displays a message indicating that the cluster cannot be created.</p>
<p id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_p173955063512">The number of nodes that can be used by a user depends on the product type you select.A hybrid data warehouse cluster (standalone mode) has only one node. For other types of clusters, the number of nodes can be greater than or equal to 3. You can view the number of available nodes on the <span class="wintitle" id="EN-US_TOPIC_0000001659054474__wintitle285227114115"><b>Clusters &gt; Dedicated Clusters</b></span> page.</p>
<p id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_p173955063512">The number of nodes available to a user depends on the type of product selected. A hybrid data warehouse cluster in standalone mode only has one node, while other cluster types can have three or more nodes. You can view the number of available nodes on the <span class="wintitle" id="EN-US_TOPIC_0000001659054474__wintitle285227114115"><b>Clusters &gt; Dedicated Clusters</b></span> page.</p>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_section19523079142249"><h4 class="sectiontitle">Creating a Cluster</h4><ol id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_ol1649726614233"><li id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_li6029015714233"><span>Log in to the GaussDB(DWS) management console.</span></li><li id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_li12411775511"><span>In the navigation pane on the left, choose <span class="uicontrol" id="EN-US_TOPIC_0000001659054474__uicontrol170942803719"><b>Clusters &gt; Dedicated Clusters</b></span>.</span></li><li id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_li63277252161245"><span>On the <span class="wintitle" id="EN-US_TOPIC_0000001659054474__wintitle19127333143718"><b>Dedicated Clusters</b></span> page, click <span class="uicontrol" id="EN-US_TOPIC_0000001659054474__uicontrol1012716336372"><b>Create GaussDB(DWS) Cluster</b></span>.</span></li><li id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_li6930226165913"><span>Select <span class="parmname" id="EN-US_TOPIC_0000001659054474__parmname39321429135910"><b>Region</b></span>.</span><p>
@ -42,11 +42,11 @@
</p></li><li id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_li3509811181412"><span>Configure <strong id="EN-US_TOPIC_0000001659054474__b06964103285">Resource</strong>, <strong id="EN-US_TOPIC_0000001659054474__b369611019282">CPU Architecture</strong>, and <strong id="EN-US_TOPIC_0000001659054474__b1069641072811">Node Flavor</strong>.</span><p><div class="note" id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_note851817116149"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_ul480831016411"><li id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_li1180801016413">The number of nodes in a new cluster cannot exceed the quota that can be used by a user or 256. If the node quota is insufficient, click <strong id="EN-US_TOPIC_0000001659054474__b3933525102910">Increase quota</strong> to submit a service ticket and apply for higher node quota.</li></ul>
</div></div>
<div class="p" id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_p898910512257">
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_table11569171131419" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Node configuration parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_row1858451161414"><th align="left" class="cellrowborder" valign="top" width="19.59%" id="mcps1.3.4.2.6.2.2.1.2.4.1.1"><p id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_p859013118144"><strong id="EN-US_TOPIC_0000001659054474__b1197178926">Parameter</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_table11569171131419" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Node configuration parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_row1858451161414"><th align="left" class="cellrowborder" valign="top" width="19.59%" id="mcps1.3.4.2.6.2.2.1.2.4.1.1"><p id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_p859013118144"><strong id="EN-US_TOPIC_0000001659054474__b115214573">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="61.25000000000001%" id="mcps1.3.4.2.6.2.2.1.2.4.1.2"><p id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_p16598111101411"><strong id="EN-US_TOPIC_0000001659054474__b1501618341">Description</strong></p>
<th align="left" class="cellrowborder" valign="top" width="61.25000000000001%" id="mcps1.3.4.2.6.2.2.1.2.4.1.2"><p id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_p16598111101411"><strong id="EN-US_TOPIC_0000001659054474__b1115270377">Description</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.16%" id="mcps1.3.4.2.6.2.2.1.2.4.1.3"><p id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_p10605111110145"><strong id="EN-US_TOPIC_0000001659054474__b521605543">Example Value</strong></p>
<th align="left" class="cellrowborder" valign="top" width="19.16%" id="mcps1.3.4.2.6.2.2.1.2.4.1.3"><p id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_p10605111110145"><strong id="EN-US_TOPIC_0000001659054474__b297097095">Example Value</strong></p>
</th>
</tr>
</thead>
@ -128,11 +128,11 @@
</div>
</div>
</p></li><li id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_li8697330164911"><span>Click <strong id="EN-US_TOPIC_0000001659054474__b4127135615113">Next: Configure Network</strong>.</span></li><li id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_li161034402505"><span>Configure the network.</span><p><div class="p" id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_p1710412406509">
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_table17104840155011" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Network parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_row15104134095017"><th align="left" class="cellrowborder" valign="top" width="20.32673267326733%" id="mcps1.3.4.2.8.2.1.1.2.4.1.1"><p id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_p1810484015012"><strong id="EN-US_TOPIC_0000001659054474__b1502201888">Parameter</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_table17104840155011" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Network parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_row15104134095017"><th align="left" class="cellrowborder" valign="top" width="20.32673267326733%" id="mcps1.3.4.2.8.2.1.1.2.4.1.1"><p id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_p1810484015012"><strong id="EN-US_TOPIC_0000001659054474__b144316972">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60.99009900990099%" id="mcps1.3.4.2.8.2.1.1.2.4.1.2"><p id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_p2010519407505"><strong id="EN-US_TOPIC_0000001659054474__b1727017229">Description</strong></p>
<th align="left" class="cellrowborder" valign="top" width="60.99009900990099%" id="mcps1.3.4.2.8.2.1.1.2.4.1.2"><p id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_p2010519407505"><strong id="EN-US_TOPIC_0000001659054474__b1653052384">Description</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.683168316831683%" id="mcps1.3.4.2.8.2.1.1.2.4.1.3"><p id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_p6105440115014"><strong id="EN-US_TOPIC_0000001659054474__b795737300">Example Value</strong></p>
<th align="left" class="cellrowborder" valign="top" width="18.683168316831683%" id="mcps1.3.4.2.8.2.1.1.2.4.1.3"><p id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_p6105440115014"><strong id="EN-US_TOPIC_0000001659054474__b1023094473">Example Value</strong></p>
</th>
</tr>
</thead>
@ -166,7 +166,7 @@
<p id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_p16109134045018">The format of the default security group name is dws-&lt;<em id="EN-US_TOPIC_0000001659054474__i7958674717">Cluster_name</em>&gt;-&lt;<em id="EN-US_TOPIC_0000001659054474__i69584711719">Cluster_database_port</em>&gt;, for example, <strong id="EN-US_TOPIC_0000001659054474__b1295887276">dws-dws-demo-8000</strong>.</p>
<div class="note" id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_note1110984095010"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_p61091840195019">If the quotas of the security group and the security group rule are insufficient, an error message will be displayed after you submit the cluster creation application. Select an existing group and retry.</p>
</div></div>
</li><li id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_li10109104017503">Manual creation<p id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_p2110104017509"><a name="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_li10109104017503"></a><a name="en-us_topic_0000001423119181_li10109104017503"></a>You can also log in to the VPC management console to manually create a security group. Then, go back to the page for creating data warehouse clusters, click the <span><img id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_image2110144085013" src="figure/en-us_image_0000001711015240.png"></span> button next to the <span class="parmname" id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_parmname18164815141419"><b>Security Group</b></span> drop-down list to refresh the page, and select the new security group.</p>
</li><li id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_li10109104017503">Manual creation<p id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_p2110104017509"><a name="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_li10109104017503"></a><a name="en-us_topic_0000001423119181_li10109104017503"></a>You can also log in to the VPC management console to manually create a security group. Then, go back to the page for creating data warehouse clusters, click <span><img id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_image2110144085013" src="figure/en-us_image_0000001711015240.png"></span> next to the <span class="parmname" id="EN-US_TOPIC_0000001659054474__parmname7238162285618"><b>Security Group</b></span> drop-down list to refresh the page, and select the new security group.</p>
<p id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_p51101240115017">To enable the GaussDB(DWS) client to connect to the cluster, you need to add an inbound rule to the new security group to grant the access permission to the database port of the GaussDB(DWS) cluster. The following is an example of an inbound rule..</p>
<ul id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_ul1211114408509"><li id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_li011117404507"><strong id="EN-US_TOPIC_0000001659054474__b842352706111211">Protocol</strong>: <strong id="EN-US_TOPIC_0000001659054474__b842352706111216">TCP</strong></li><li id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_li11111540155019"><strong id="EN-US_TOPIC_0000001659054474__b2418462181044">Port</strong>: <strong id="EN-US_TOPIC_0000001659054474__b40326830181048">8000</strong>. Use the database port set when creating the GaussDB(DWS) cluster. This port is used for receiving client connections to GaussDB(DWS).</li><li id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_li6111040125018"><strong id="EN-US_TOPIC_0000001659054474__b842352706111337">Source</strong>: Select <strong id="EN-US_TOPIC_0000001659054474__b842352706111342">IP address</strong> and use the host IP address of the client host, for example, <strong id="EN-US_TOPIC_0000001659054474__b842352706111428">192.168.0.10/32</strong>.</li></ul>
<p id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_p111104014507">The security group of a cluster cannot be changed but can be modified. For details, see <a href="dws_03_0053.html">Modifying a Security Group</a>.</p>
@ -205,11 +205,11 @@
</div>
</div>
</p></li><li id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_li434112359592"><span>Click <strong id="EN-US_TOPIC_0000001659054474__b0597173410191">Next: Configure Advanced Settings</strong>.</span></li><li id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_li250803614263"><span>Configure cluster parameters.</span><p><div class="p" id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_p124222307444">
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_table175013003914" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Cluster parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_row9384101317142"><th align="left" class="cellrowborder" valign="top" width="16.7029702970297%" id="mcps1.3.4.2.10.2.1.1.2.4.1.1"><p id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_p1438491319146"><strong id="EN-US_TOPIC_0000001659054474__b1084088360">Parameter</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_table175013003914" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Cluster parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_row9384101317142"><th align="left" class="cellrowborder" valign="top" width="16.7029702970297%" id="mcps1.3.4.2.10.2.1.1.2.4.1.1"><p id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_p1438491319146"><strong id="EN-US_TOPIC_0000001659054474__b1138909157">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="62.475247524752476%" id="mcps1.3.4.2.10.2.1.1.2.4.1.2"><p id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_p1138413133148"><strong id="EN-US_TOPIC_0000001659054474__b960691544">Description</strong></p>
<th align="left" class="cellrowborder" valign="top" width="62.475247524752476%" id="mcps1.3.4.2.10.2.1.1.2.4.1.2"><p id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_p1138413133148"><strong id="EN-US_TOPIC_0000001659054474__b1979683963">Description</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20.82178217821782%" id="mcps1.3.4.2.10.2.1.1.2.4.1.3"><p id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_p038431301410"><strong id="EN-US_TOPIC_0000001659054474__b403863313">Example Value</strong></p>
<th align="left" class="cellrowborder" valign="top" width="20.82178217821782%" id="mcps1.3.4.2.10.2.1.1.2.4.1.3"><p id="EN-US_TOPIC_0000001659054474__en-us_topic_0000001423119181_p038431301410"><strong id="EN-US_TOPIC_0000001659054474__b480385520">Example Value</strong></p>
</th>
</tr>
</thead>

View File

@ -42,7 +42,7 @@
</tr>
<tr id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_row1241899616226"><td class="cellrowborder" valign="top" width="16.07%" headers="mcps1.3.2.6.2.3.1.1 "><p id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_p3154882516226">Operation</p>
</td>
<td class="cellrowborder" valign="top" width="83.93%" headers="mcps1.3.2.6.2.3.1.2 "><ul id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_ul8157907161719"><li id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_li34739029161719"><strong id="EN-US_TOPIC_0000001707293901__b423334017439">More</strong><ul id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_ul63475607161741"><li id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_li16011509493"><strong id="EN-US_TOPIC_0000001707293901__b3758923152214">View Metric</strong>: For details, see <a href="dws_01_0022.html">Monitoring Clusters Using Cloud Eye</a>.</li><li id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_li241315301583"><strong id="EN-US_TOPIC_0000001707293901__b132715820439">Restart</strong>: Click <span class="uicontrol" id="EN-US_TOPIC_0000001707293901__uicontrol5732216124314"><b>Restart</b></span> to restart a cluster. For details, see <a href="dws_01_0024.html">Cluster Restart</a>.</li><li id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_li154514462344"><strong id="EN-US_TOPIC_0000001707293901__b1094615716268">Scale Out</strong>: For details, see <a href="dws_01_0023.html">Scaling Out a Cluster</a>.</li><li id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_li1028969194918"><strong id="EN-US_TOPIC_0000001707293901__b91404537403">Change all specifications</strong>: For details, see <a href="dws_01_0825.html">Changing All Specifications</a>.</li><li id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_li1191010204"><strong id="EN-US_TOPIC_0000001707293901__b8689376499133">Redistribute</strong>: For details, see <a href="dws_01_8201.html">Redistributing Data</a>.</li><li id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_li13603102642010"><strong id="EN-US_TOPIC_0000001707293901__b17821202073612">View Scaling Details</strong>: For details, see <a href="dws_01_8202.html">Viewing Redistribution Details</a>.</li><li id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_li4778162065512"><strong id="EN-US_TOPIC_0000001707293901__b1139053664418">Reset Password</strong>: For details, see <a href="dws_01_0026.html">Resetting a Password</a>.</li><li id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_li146371531195212"><strong id="EN-US_TOPIC_0000001707293901__b9774356152919">Create Snapshot</strong>: For details, see <a href="dws_01_0092.html">Manual Snapshots</a>.</li><li id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_li163612251514"><strong id="EN-US_TOPIC_0000001707293901__b175225610138">Cancel Readonly</strong>: For details, see <a href="dws_01_0035.html">Removing the Read-only Status</a>.</li><li id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_li59718290161756"><strong id="EN-US_TOPIC_0000001707293901__b205001347124511">Delete</strong>: Click <strong id="EN-US_TOPIC_0000001707293901__b20968165112457">Delete</strong> to delete a cluster. For details, see <a href="dws_01_0025.html">Deleting a Cluster</a>.</li><li id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_li1745134118499"><strong id="EN-US_TOPIC_0000001707293901__b1428735194111">Change node flavor</strong>: For details, see <a href="dws_01_0829.html">Changing the Node Flavor</a>.</li><li id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_li7290144642413"><strong id="EN-US_TOPIC_0000001707293901__b16164035649133">Manage CN</strong>: For details, see <a href="dws_01_7115.html">Managing CNs</a>.</li></ul>
<td class="cellrowborder" valign="top" width="83.93%" headers="mcps1.3.2.6.2.3.1.2 "><ul id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_ul8157907161719"><li id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_li34739029161719"><strong id="EN-US_TOPIC_0000001707293901__b423334017439">More</strong><ul id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_ul63475607161741"><li id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_li16011509493"><strong id="EN-US_TOPIC_0000001707293901__b3758923152214">View Metric</strong>: For details, see <a href="dws_01_0022.html">Monitoring Clusters Using Cloud Eye</a>.</li><li id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_li241315301583"><strong id="EN-US_TOPIC_0000001707293901__b132715820439">Restart</strong>: Click <span class="uicontrol" id="EN-US_TOPIC_0000001707293901__uicontrol5732216124314"><b>Restart</b></span> to restart a cluster. For details, see <a href="dws_01_0024.html">Cluster Restart</a>.</li><li id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_li154514462344"><strong id="EN-US_TOPIC_0000001707293901__b1094615716268">Scale Out</strong>: For details, see <a href="dws_01_0023.html">Scaling Out a Cluster</a>.</li><li id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_li1028969194918"><strong id="EN-US_TOPIC_0000001707293901__b91404537403">Change all specifications</strong>: For details, see <a href="dws_01_0825.html">Changing All Specifications</a>.</li><li id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_li21991440171818"><strong id="EN-US_TOPIC_0000001707293901__b17340547509133">Scale In</strong>: For details, see <a href="dws_01_0821.html">Scaling In a Cluster</a>.</li><li id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_li1191010204"><strong id="EN-US_TOPIC_0000001707293901__b8689376499133">Redistribute</strong>: For details, see <a href="dws_01_8201.html">Redistributing Data</a>.</li><li id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_li13603102642010"><strong id="EN-US_TOPIC_0000001707293901__b17821202073612">View Scaling Details</strong>: For details, see <a href="dws_01_8202.html">Viewing Redistribution Details</a>.</li><li id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_li121275311395"><strong id="EN-US_TOPIC_0000001707293901__b4770841514">Expand Disk Capacity</strong>: For details, see <a href="dws_01_0828.html">Disk Capacity Expansion of an EVS Cluster</a>.</li><li id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_li4778162065512"><strong id="EN-US_TOPIC_0000001707293901__b1139053664418">Reset Password</strong>: For details, see <a href="dws_01_0026.html">Resetting a Password</a>.</li><li id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_li146371531195212"><strong id="EN-US_TOPIC_0000001707293901__b9774356152919">Create Snapshot</strong>: For details, see <a href="dws_01_0092.html">Manual Snapshots</a>.</li><li id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_li163612251514"><strong id="EN-US_TOPIC_0000001707293901__b175225610138">Cancel Readonly</strong>: For details, see <a href="dws_01_0035.html">Removing the Read-only Status</a>.</li><li id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_li59718290161756"><strong id="EN-US_TOPIC_0000001707293901__b205001347124511">Delete</strong>: Click <strong id="EN-US_TOPIC_0000001707293901__b20968165112457">Delete</strong> to delete a cluster. For details, see <a href="dws_01_0025.html">Deleting a Cluster</a>.</li><li id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_li1745134118499"><strong id="EN-US_TOPIC_0000001707293901__b1428735194111">Change node flavor</strong>: For details, see <a href="dws_01_0829.html">Changing the Node Flavor</a>.</li><li id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_li7290144642413"><strong id="EN-US_TOPIC_0000001707293901__b16164035649133">Manage CN</strong>: For details, see <a href="dws_01_7115.html">Managing CNs</a>.</li></ul>
</li></ul>
</td>
</tr>
@ -68,7 +68,6 @@
<p id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_p0997113316285">After the read-only status is canceled for the cluster, you are advised to perform the following operations:</p>
<ul id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_ul1599813312281"><li id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_li2998833162817">Use the SQL client tool to connect to the database as the administrator and run the following command to periodically clear and reclaim the storage space:<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_screen11474195825410"><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">VACUUM</span><span class="w"> </span><span class="k">FULL</span><span class="p">;</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_p11998733162813">After you delete data stored in GaussDB(DWS) data warehouses, dirty data may be generated possibly because the disk space is not released. This results in disk space waste. It is recommended that the storage space be cleared periodically.</p>
</li><li id="EN-US_TOPIC_0000001707293901__en-us_topic_0000001422959285_li199823314283">You are advised to check the disk capacity and analyze whether the existing cluster specifications meet service requirements. If not, expand the cluster capacity. For details, see <a href="dws_01_0023.html">Scaling Out a Cluster</a>.</li></ul>

View File

@ -476,7 +476,7 @@
</li><li id="EN-US_TOPIC_0000001707293809__en-us_topic_0000001372839390_li293710361168">Configure the alarm notification parameters as prompted.<div class="p" id="EN-US_TOPIC_0000001707293809__en-us_topic_0000001372839390_p11818131018182"><a name="EN-US_TOPIC_0000001707293809__en-us_topic_0000001372839390_li293710361168"></a><a name="en-us_topic_0000001372839390_li293710361168"></a><span><img id="EN-US_TOPIC_0000001707293809__en-us_topic_0000001372839390_image8490115314484" src="figure/en-us_image_0000001711597812.png" title="Click to enlarge" class="imgResize"></span>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001707293809__en-us_topic_0000001372839390_table514135314176" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Configuring alarm notifications</caption><thead align="left"><tr id="EN-US_TOPIC_0000001707293809__en-us_topic_0000001372839390_row1113755311716"><th align="left" class="cellrowborder" valign="top" width="14.879999999999999%" id="mcps1.3.7.4.6.2.1.3.1.2.2.4.1.1"><p id="EN-US_TOPIC_0000001707293809__en-us_topic_0000001372839390_p613717535170"><strong id="EN-US_TOPIC_0000001707293809__b15823181614320">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="66.08000000000001%" id="mcps1.3.7.4.6.2.1.3.1.2.2.4.1.2"><p id="EN-US_TOPIC_0000001707293809__en-us_topic_0000001372839390_p4137145371719"><strong id="EN-US_TOPIC_0000001707293809__b959093199">Description</strong></p>
<th align="left" class="cellrowborder" valign="top" width="66.08000000000001%" id="mcps1.3.7.4.6.2.1.3.1.2.2.4.1.2"><p id="EN-US_TOPIC_0000001707293809__en-us_topic_0000001372839390_p4137145371719"><strong id="EN-US_TOPIC_0000001707293809__b1874020089">Description</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.040000000000003%" id="mcps1.3.7.4.6.2.1.3.1.2.2.4.1.3"><p id="EN-US_TOPIC_0000001707293809__en-us_topic_0000001372839390_p81372538175"><strong id="EN-US_TOPIC_0000001707293809__b39334199438">Example Value</strong></p>
</th>

View File

@ -7,7 +7,7 @@
</div>
<div class="section" id="EN-US_TOPIC_0000001659054494__en-us_topic_0000001372520218_section8483877102527"><h4 class="sectiontitle">Downloading the JDBC or ODBC Driver</h4><ol id="EN-US_TOPIC_0000001659054494__en-us_topic_0000001372520218_ol60630376102536"><li id="EN-US_TOPIC_0000001659054494__en-us_topic_0000001372520218_li6029015714233"><span>Log in to the GaussDB(DWS) management console.</span></li><li id="EN-US_TOPIC_0000001659054494__en-us_topic_0000001372520218_li14529230102538"><span>In the navigation tree on the left, choose <span class="uicontrol" id="EN-US_TOPIC_0000001659054494__uicontrol14412182432617"><b>Client Connections</b></span>.</span></li><li id="EN-US_TOPIC_0000001659054494__en-us_topic_0000001372520218_li6336035910265"><span>In the <span class="parmname" id="EN-US_TOPIC_0000001659054494__en-us_topic_0000001372520218_parmname4924706595638"><b>Driver</b></span> area, choose a driver that you want to download.</span><p><ul id="EN-US_TOPIC_0000001659054494__en-us_topic_0000001372520218_ul14144775102648"><li id="EN-US_TOPIC_0000001659054494__en-us_topic_0000001372520218_li21256942102648"><strong id="EN-US_TOPIC_0000001659054494__en-us_topic_0000001372520218_b2097114105119">JDBC Driver</strong><p id="EN-US_TOPIC_0000001659054494__en-us_topic_0000001372520218_p9642102818492">Select <span class="parmvalue" id="EN-US_TOPIC_0000001659054494__parmvalue4376553955819"><b>DWS JDBC Driver</b></span> and click <span class="uicontrol" id="EN-US_TOPIC_0000001659054494__uicontrol14011692535819"><b>Download</b></span> to download the JDBC driver matching the current cluster version. The driver package name is <strong id="EN-US_TOPIC_0000001659054494__b13737922905819">dws_8.1.x_jdbc_driver.zip</strong>.</p>
<p id="EN-US_TOPIC_0000001659054494__en-us_topic_0000001372520218_p4385957103243">If clusters of different versions are available, you will download the JDBC driver matching the earliest cluster version after clicking <strong id="EN-US_TOPIC_0000001659054494__b20519151613109">Download</strong>. If there is no cluster, you will download the JDBC driver of the earliest version after clicking <strong id="EN-US_TOPIC_0000001659054494__b751981671012">Download</strong>. GaussDB(DWS) clusters are compatible with earlier versions of JDBC drivers.</p>
<p id="EN-US_TOPIC_0000001659054494__en-us_topic_0000001372520218_p4385957103243">If clusters of different versions are available, you will download the JDBC driver matching the earliest cluster version after clicking <strong id="EN-US_TOPIC_0000001659054494__b34119219209">Download</strong>. If there is no cluster, you will download the JDBC driver of the earliest version after clicking <strong id="EN-US_TOPIC_0000001659054494__b2630102810207">Download</strong>. GaussDB(DWS) clusters are compatible with earlier versions of JDBC drivers.</p>
<p id="EN-US_TOPIC_0000001659054494__en-us_topic_0000001372520218_p11241008371">Click <strong id="EN-US_TOPIC_0000001659054494__b8091553355819">Historical Version</strong> to download the corresponding JDBC driver version. You are advised to download the JDBC driver based on the cluster version.</p>
<p id="EN-US_TOPIC_0000001659054494__en-us_topic_0000001372520218_p21797570103353">The JDBC driver can be used on all platforms and depends on JDK 1.6 or later.</p>
</li><li id="EN-US_TOPIC_0000001659054494__en-us_topic_0000001372520218_li27972870103241"><strong id="EN-US_TOPIC_0000001659054494__en-us_topic_0000001372520218_b132941011125117">ODBC Driver</strong><p id="EN-US_TOPIC_0000001659054494__en-us_topic_0000001372520218_p5529786010357">Select a corresponding version and click <span class="uicontrol" id="EN-US_TOPIC_0000001659054494__en-us_topic_0000001372520218_uicontrol31718090103551"><b>Download</b></span> to download the ODBC driver matching the current cluster version. If clusters of different versions are available, you will download the ODBC driver matching the earliest cluster version after clicking <strong id="EN-US_TOPIC_0000001659054494__b10475530121020">Download</strong>. If there is no cluster, you will download the ODBC driver of the earliest version after clicking <strong id="EN-US_TOPIC_0000001659054494__b74751830111010">Download</strong>. GaussDB(DWS) clusters are compatible with earlier versions of ODBC drivers.</p>

View File

@ -24,7 +24,6 @@
<p id="EN-US_TOPIC_0000001707254537__en-us_topic_0000001422799513_p2754133018133">Alternatively, you can remotely manage the Linux server where the gsql is to be installed in SSH mode and run the following command in the Linux command window to download the Linux gsql client:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707254537__en-us_topic_0000001422799513_screen0169162716481"><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="n">wget</span><span class="w"> </span><span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">obs</span><span class="p">.</span><span class="n">otc</span><span class="p">.</span><span class="n">t</span><span class="o">-</span><span class="n">systems</span><span class="p">.</span><span class="n">com</span><span class="o">/</span><span class="n">dws</span><span class="o">/</span><span class="n">download</span><span class="o">/</span><span class="n">dws_client_8</span><span class="p">.</span><span class="mi">1</span><span class="p">.</span><span class="n">x_redhat_x64</span><span class="p">.</span><span class="n">zip</span><span class="w"> </span><span class="c1">--no-check-certificate</span>
</pre></div></td></tr></table></div>
</div>
</p></li><li id="EN-US_TOPIC_0000001707254537__en-us_topic_0000001422799513_li14921556171524"><span>Use the SSH tool to remotely manage the host where the client is installed.</span><p><p id="EN-US_TOPIC_0000001707254537__en-us_topic_0000001422799513_en-us_topic_0106888034_p141041143523">For details about how to log in to an ECS, see "ECSs&gt; Logging In to a Linux ECS &gt; Login Using an SSH Password" in the <i><cite id="EN-US_TOPIC_0000001707254537__cite9b3ede3b7a324b06924352c7e7551901165018">Elastic Cloud Server User Guide</cite></i>.</p>
</p></li><li id="EN-US_TOPIC_0000001707254537__en-us_topic_0000001422799513_li143598191920"><span>(Optional) <span id="EN-US_TOPIC_0000001707254537__text443615881913">To connect to the cluster in SSL mode</span>, configure SSL authentication parameters on the host where the client is installed. For details, see <a href="dws_01_0038.html">Establishing Secure TCP/IP Connections in SSL Mode</a>.</span><p><div class="note" id="EN-US_TOPIC_0000001707254537__en-us_topic_0000001422799513_note04362085193"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001707254537__en-us_topic_0000001422799513_p943638171915">The SSL connection mode is more secure than the non-SSL mode. You are advised to connect the client to the cluster in SSL mode.</p>
@ -42,12 +41,10 @@ unzip <em id="EN-US_TOPIC_0000001707254537__en-us_topic_0000001422799513_i105172
<p id="EN-US_TOPIC_0000001707254537__en-us_topic_0000001422799513_p4649355413199">For example, run the following command to connect to the default database <strong id="EN-US_TOPIC_0000001707254537__b4518103716511"><span id="EN-US_TOPIC_0000001707254537__en-us_topic_0000001422799513_text16675135114313">gaussdb</span></strong> in the GaussDB(DWS) cluster:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707254537__en-us_topic_0000001422799513_screen157451922201313"><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="n">gsql</span><span class="w"> </span><span class="o">-</span><span class="n">d</span><span class="w"> </span><span class="n">gaussdb</span><span class="w"> </span><span class="o">-</span><span class="n">h</span><span class="w"> </span><span class="mi">10</span><span class="p">.</span><span class="mi">168</span><span class="p">.</span><span class="mi">0</span><span class="p">.</span><span class="mi">74</span><span class="w"> </span><span class="o">-</span><span class="n">U</span><span class="w"> </span><span class="n">dbadmin</span><span class="w"> </span><span class="o">-</span><span class="n">p</span><span class="w"> </span><span class="mi">8000</span><span class="w"> </span><span class="o">-</span><span class="n">W</span><span class="w"> </span><span class="n">password</span><span class="w"> </span><span class="o">-</span><span class="n">r</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001707254537__en-us_topic_0000001422799513_p14596465113158">If the following information is displayed, the connection succeeded:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707254537__en-us_topic_0000001422799513_screen64259327113158"><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="n">gaussdb</span><span class="o">=&gt;</span>
</pre></div></td></tr></table></div>
</div>
</p></li></ol>
</div>
@ -60,7 +57,6 @@ unzip <em id="EN-US_TOPIC_0000001707254537__en-us_topic_0000001422799513_i105172
<span class="normal">2</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">cd</span><span class="w"> </span><span class="n">sample</span>
<span class="o">/</span><span class="n">bin</span><span class="o">/</span><span class="n">bash</span><span class="w"> </span><span class="n">setup</span><span class="p">.</span><span class="n">sh</span><span class="w"> </span><span class="o">-</span><span class="n">ak</span><span class="w"> </span><span class="o">&lt;</span><span class="n">Access_Key_Id</span><span class="o">&gt;</span><span class="w"> </span><span class="o">-</span><span class="n">sk</span><span class="w"> </span><span class="o">&lt;</span><span class="n">Secret_Access_Key</span><span class="o">&gt;</span><span class="w"> </span><span class="o">-</span><span class="n">obs_location</span><span class="w"> </span><span class="n">obs</span><span class="p">.</span><span class="n">otc</span><span class="p">.</span><span class="n">t</span><span class="o">-</span><span class="n">systems</span><span class="p">.</span><span class="n">com</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001707254537__en-us_topic_0000001422799513_p66971501171">If the following information is displayed, the settings are successful:</p>
<pre class="screen" id="EN-US_TOPIC_0000001707254537__en-us_topic_0000001422799513_screen569735012718">setup successfully!</pre>
@ -72,17 +68,14 @@ unzip <em id="EN-US_TOPIC_0000001707254537__en-us_topic_0000001422799513_i105172
<span class="k">source</span><span class="w"> </span><span class="n">gsql_env</span><span class="p">.</span><span class="n">sh</span>
<span class="n">cd</span><span class="w"> </span><span class="n">bin</span>
</pre></div></td></tr></table></div>
</div>
</p></li><li id="EN-US_TOPIC_0000001707254537__en-us_topic_0000001422799513_li07034507712"><span>Import the sample data to the data warehouse.</span><p><p id="EN-US_TOPIC_0000001707254537__en-us_topic_0000001422799513_p14375203571114">Command format:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707254537__en-us_topic_0000001422799513_screen1354517342593"><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="n">gsql</span><span class="w"> </span><span class="o">-</span><span class="n">d</span><span class="w"> </span><span class="o">&lt;</span><span class="k">Database</span><span class="w"> </span><span class="n">name</span><span class="o">&gt;</span><span class="w"> </span><span class="o">-</span><span class="n">h</span><span class="w"> </span><span class="o">&lt;</span><span class="k">Public</span><span class="w"> </span><span class="n">network</span><span class="w"> </span><span class="n">address</span><span class="w"> </span><span class="k">of</span><span class="w"> </span><span class="n">the</span><span class="w"> </span><span class="k">cluster</span><span class="o">&gt;</span><span class="w"> </span><span class="o">-</span><span class="n">U</span><span class="w"> </span><span class="o">&lt;</span><span class="n">Administrator</span><span class="o">&gt;</span><span class="w"> </span><span class="o">-</span><span class="n">p</span><span class="w"> </span><span class="o">&lt;</span><span class="k">Data</span><span class="w"> </span><span class="n">warehouse</span><span class="w"> </span><span class="n">port</span><span class="w"> </span><span class="nb">number</span><span class="o">&gt;</span><span class="w"> </span><span class="o">-</span><span class="n">f</span><span class="w"> </span><span class="o">&lt;</span><span class="n">Path</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">storing</span><span class="w"> </span><span class="n">the</span><span class="w"> </span><span class="n">sample</span><span class="w"> </span><span class="k">data</span><span class="w"> </span><span class="n">script</span><span class="o">&gt;</span><span class="w"> </span><span class="o">-</span><span class="n">r</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001707254537__en-us_topic_0000001422799513_p549564951117">Sample command:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707254537__en-us_topic_0000001422799513_screen398214551593"><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="n">gsql</span><span class="w"> </span><span class="o">-</span><span class="n">d</span><span class="w"> </span><span class="n">gaussdb</span><span class="w"> </span><span class="o">-</span><span class="n">h</span><span class="w"> </span><span class="mi">10</span><span class="p">.</span><span class="mi">168</span><span class="p">.</span><span class="mi">0</span><span class="p">.</span><span class="mi">74</span><span class="w"> </span><span class="o">-</span><span class="n">U</span><span class="w"> </span><span class="n">dbadmin</span><span class="w"> </span><span class="o">-</span><span class="n">p</span><span class="w"> </span><span class="mi">8000</span><span class="w"> </span><span class="o">-</span><span class="n">f</span><span class="w"> </span><span class="o">/</span><span class="n">opt</span><span class="o">/</span><span class="n">sample</span><span class="o">/</span><span class="n">tpcds_load_data_from_obs</span><span class="p">.</span><span class="k">sql</span><span class="w"> </span><span class="o">-</span><span class="n">r</span>
</pre></div></td></tr></table></div>
</div>
<div class="note" id="EN-US_TOPIC_0000001707254537__en-us_topic_0000001422799513_note1870365011711"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001707254537__en-us_topic_0000001422799513_p117032502710">In the preceding command, sample data script <span class="filepath" id="EN-US_TOPIC_0000001707254537__filepath126419481688"><b>tpcds_load_data_from_obs.sql</b></span> is stored in the sample directory (for example, <strong id="EN-US_TOPIC_0000001707254537__b1264114819812">/opt/sample/</strong>) of the GaussDB(DWS) client.</p>
</div></div>
@ -90,13 +83,11 @@ unzip <em id="EN-US_TOPIC_0000001707254537__en-us_topic_0000001422799513_i105172
<p id="EN-US_TOPIC_0000001707254537__en-us_topic_0000001422799513_p1270312509710">The time required for importing a large dataset depends on the current GaussDB(DWS) cluster specifications. Generally, the import takes about 10 to 20 minutes. If information similar to the following is displayed, the import is successful.</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707254537__en-us_topic_0000001422799513_screen15703115012718"><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">Time</span><span class="p">:</span><span class="mi">1845600</span><span class="p">.</span><span class="mi">524</span><span class="w"> </span><span class="n">ms</span>
</pre></div></td></tr></table></div>
</div>
</p></li></ol><ol start="5" id="EN-US_TOPIC_0000001707254537__en-us_topic_0000001422799513_ol146958501712"><li id="EN-US_TOPIC_0000001707254537__en-us_topic_0000001422799513_li969412502719"><span>In the Linux command window, run the following commands to switch to a specific directory and query the sample data:</span><p><div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707254537__en-us_topic_0000001422799513_screen7422039141412"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">cd</span><span class="w"> </span><span class="o">/</span><span class="n">opt</span><span class="o">/</span><span class="n">sample</span><span class="o">/</span><span class="n">query_sql</span><span class="o">/</span>
<span class="o">/</span><span class="n">bin</span><span class="o">/</span><span class="n">bash</span><span class="w"> </span><span class="n">tpcds100x</span><span class="p">.</span><span class="n">sh</span>
</pre></div></td></tr></table></div>
</div>
</p></li><li id="EN-US_TOPIC_0000001707254537__en-us_topic_0000001422799513_li116951502710"><span>Enter the cluster's public network IP address, access port, database name, user who accesses the database, and password of the user as prompted.</span><p><ul id="EN-US_TOPIC_0000001707254537__en-us_topic_0000001422799513_ul11694115016711"><li id="EN-US_TOPIC_0000001707254537__en-us_topic_0000001422799513_li269445010716">The default database name is <span class="parmname" id="EN-US_TOPIC_0000001707254537__parmname1769413501973"><b><span id="EN-US_TOPIC_0000001707254537__text149310555455">gaussdb</span></b></span>.</li><li id="EN-US_TOPIC_0000001707254537__en-us_topic_0000001422799513_li26941502712">Use the administrator username and password configured during cluster creation as the username and password for accessing the database.</li></ul>
<p id="EN-US_TOPIC_0000001707254537__en-us_topic_0000001422799513_p46944501878">After the query is complete, a directory for storing the query result, such as <strong id="EN-US_TOPIC_0000001707254537__b842352706184710">query_output_20170914_072341</strong>, will be generated in the current query directory, for example, <span class="filepath" id="EN-US_TOPIC_0000001707254537__filepath494650861184645"><b>sample/query_sql/</b></span>.</p>

View File

@ -44,7 +44,6 @@
</div>
<div class="section" id="EN-US_TOPIC_0000001707293777__en-us_topic_0000001372520070_section63237288162656"><h4 class="sectiontitle">Viewing the Maximum Number of Connections</h4><ol id="EN-US_TOPIC_0000001707293777__en-us_topic_0000001372520070_ol7904741162927"><li id="EN-US_TOPIC_0000001707293777__en-us_topic_0000001372520070_li19203152162927"><span>Use the SQL client tool to connect to the database in a cluster.</span></li><li id="EN-US_TOPIC_0000001707293777__en-us_topic_0000001372520070_li32991024162943"><span>Run the following command:</span><p><div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707293777__en-us_topic_0000001372520070_screen2825194581012"><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">SHOW</span><span class="w"> </span><span class="n">max_connections</span><span class="p">;</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001707293777__en-us_topic_0000001372520070_p61212335163113">Information similar to the following is displayed, showing that the maximum number of database connections is <strong id="EN-US_TOPIC_0000001707293777__b842352706113115">200</strong> by default.</p>
<pre class="screen" id="EN-US_TOPIC_0000001707293777__en-us_topic_0000001372520070_screen55741306163042">max_connections
@ -67,7 +66,6 @@
<td class="cellrowborder" valign="top" width="68.58999999999999%" headers="mcps1.3.4.2.2.2.2.2.3.1.2 "><p id="EN-US_TOPIC_0000001707293777__en-us_topic_0000001372520070_p13379174213154">Run the following command to view the maximum number of sessions connected to user <strong id="EN-US_TOPIC_0000001707293777__b865093478115336">dbadmin</strong>. </p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707293777__en-us_topic_0000001372520070_screen2212164912153"><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">SELECT</span><span class="w"> </span><span class="n">ROLNAME</span><span class="p">,</span><span class="n">ROLCONNLIMIT</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">PG_ROLES</span><span class="w"> </span><span class="k">WHERE</span><span class="w"> </span><span class="n">ROLNAME</span><span class="o">=</span><span class="s1">'dbadmin'</span><span class="p">;</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001707293777__en-us_topic_0000001372520070_ab8dd33c527184267906ad039a6609f45">Information similar to the following is displayed. <span class="parmvalue" id="EN-US_TOPIC_0000001707293777__parmvalue1796574260115424"><b>-1</b></span> indicates that the number of sessions connected to user <strong id="EN-US_TOPIC_0000001707293777__b2043011165115517">dbadmin</strong> is not limited.</p>
<pre class="screen" id="EN-US_TOPIC_0000001707293777__en-us_topic_0000001372520070_screen5384699191838"> rolname | rolconnlimit
@ -81,7 +79,6 @@
<td class="cellrowborder" valign="top" width="68.58999999999999%" headers="mcps1.3.4.2.2.2.2.2.3.1.2 "><p id="EN-US_TOPIC_0000001707293777__en-us_topic_0000001372520070_p4469493185">Run the following command to view the number of session connections that have been used by <strong id="EN-US_TOPIC_0000001707293777__b125312233611565">dbadmin</strong>.</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707293777__en-us_topic_0000001372520070_screen104591518171819"><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">SELECT</span><span class="w"> </span><span class="k">COUNT</span><span class="p">(</span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">V$SESSION</span><span class="w"> </span><span class="k">WHERE</span><span class="w"> </span><span class="n">USERNAME</span><span class="o">=</span><span class="s1">'dbadmin'</span><span class="p">;</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001707293777__en-us_topic_0000001372520070_a7bbf9e48551c4e42bc4e3d96f03ef5f9">Information similar to the following is displayed. <span class="parmvalue" id="EN-US_TOPIC_0000001707293777__parmvalue6572030216394"><b>1</b></span> indicates the number of session connections used by user <strong id="EN-US_TOPIC_0000001707293777__b3268088416391">dbadmin</strong>.</p>
<pre class="screen" id="EN-US_TOPIC_0000001707293777__en-us_topic_0000001372520070_screen32646809135149"> count
@ -95,7 +92,6 @@
<td class="cellrowborder" valign="top" width="68.58999999999999%" headers="mcps1.3.4.2.2.2.2.2.3.1.2 "><p id="EN-US_TOPIC_0000001707293777__en-us_topic_0000001372520070_p1666713314192">Run the following command to view the upper limit of connections used by the <strong id="EN-US_TOPIC_0000001707293777__en-us_topic_0000001372520070_b173494105285">postgres</strong><strong id="EN-US_TOPIC_0000001707293777__en-us_topic_0000001372520070_b9349111014288"></strong> database:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707293777__en-us_topic_0000001372520070_screen11272363194"><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">SELECT</span><span class="w"> </span><span class="n">DATNAME</span><span class="p">,</span><span class="n">DATCONNLIMIT</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">PG_DATABASE</span><span class="w"> </span><span class="k">WHERE</span><span class="w"> </span><span class="n">DATNAME</span><span class="o">=</span><span class="s1">'postgres'</span><span class="p">;</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001707293777__en-us_topic_0000001372520070_ac7ab9e1f26c84b959f03594e27683d08">Information similar to the following is displayed. <span class="parmvalue" id="EN-US_TOPIC_0000001707293777__en-us_topic_0000001372520070_parmvalue1562701316182"><b>-1</b></span> indicates that the number of sessions connected to the <strong id="EN-US_TOPIC_0000001707293777__en-us_topic_0000001372520070_b457415258282">postgres</strong><strong id="EN-US_TOPIC_0000001707293777__en-us_topic_0000001372520070_b165749255289"></strong> database is not limited.</p>
<pre class="screen" id="EN-US_TOPIC_0000001707293777__en-us_topic_0000001372520070_s116628f616314f27a5a02cd806cf7e23"> datname | datconnlimit
@ -109,7 +105,6 @@
<td class="cellrowborder" valign="top" width="68.58999999999999%" headers="mcps1.3.4.2.2.2.2.2.3.1.2 "><p id="EN-US_TOPIC_0000001707293777__en-us_topic_0000001372520070_p18457121482013">Run the following command to view the number of session connections that have been used by the <strong id="EN-US_TOPIC_0000001707293777__en-us_topic_0000001372520070_b1784655192812">postgres</strong><strong id="EN-US_TOPIC_0000001707293777__en-us_topic_0000001372520070_b87841255102817"></strong> database:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707293777__en-us_topic_0000001372520070_screen15485102911204"><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">SELECT</span><span class="w"> </span><span class="k">COUNT</span><span class="p">(</span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">PG_STAT_ACTIVITY</span><span class="w"> </span><span class="k">WHERE</span><span class="w"> </span><span class="n">DATNAME</span><span class="o">=</span><span class="s1">'postgres'</span><span class="p">;</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001707293777__en-us_topic_0000001372520070_adc65e02e0fde4ae2ae7bda282f3eb6a4">Information similar to the following is displayed. <span class="parmvalue" id="EN-US_TOPIC_0000001707293777__en-us_topic_0000001372520070_parmvalue918624171816"><b>1</b></span> indicates the number of session connections used by the <strong id="EN-US_TOPIC_0000001707293777__en-us_topic_0000001372520070_b195101700294">postgres</strong><strong id="EN-US_TOPIC_0000001707293777__en-us_topic_0000001372520070_b7510107293"></strong> database.</p>
<pre class="screen" id="EN-US_TOPIC_0000001707293777__en-us_topic_0000001372520070_screen502887401659"> count
@ -133,7 +128,6 @@
<span class="w"> </span><span class="mi">10</span>
<span class="p">(</span><span class="mi">1</span><span class="w"> </span><span class="k">row</span><span class="p">)</span>
</pre></div></td></tr></table></div>
</div>
</td>
</tr>

View File

@ -8,7 +8,12 @@
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001707254749__row75256478251"><td class="cellrowborder" valign="top" width="20.69%" headers="mcps1.3.1.1.3.1.1 "><p id="EN-US_TOPIC_0000001707254749__p10729115452518">2024-04-02</p>
<tbody><tr id="EN-US_TOPIC_0000001707254749__row6815152795715"><td class="cellrowborder" valign="top" width="20.69%" headers="mcps1.3.1.1.3.1.1 "><p id="EN-US_TOPIC_0000001707254749__p10816132735713">2024-06-05</p>
</td>
<td class="cellrowborder" valign="top" width="79.31%" headers="mcps1.3.1.1.3.1.2 "><p id="EN-US_TOPIC_0000001707254749__p11816227115715">This issue is the eighteenth official release for the 8.2.1.220 cluster.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001707254749__row75256478251"><td class="cellrowborder" valign="top" width="20.69%" headers="mcps1.3.1.1.3.1.1 "><p id="EN-US_TOPIC_0000001707254749__p10729115452518">2024-04-02</p>
</td>
<td class="cellrowborder" valign="top" width="79.31%" headers="mcps1.3.1.1.3.1.2 "><p id="EN-US_TOPIC_0000001707254749__p117291254102514">This issue is the seventeenth official release for the 8.1.3.325 cluster.</p>
<p id="EN-US_TOPIC_0000001707254749__p1672995492517">Added the following functions:</p>

View File

@ -13,7 +13,7 @@
<ol id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_ol195807631459"><li id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_li11791050122517"><span>Determine whether you want to use the SSL mode to connect to the GaussDB(DWS) cluster.</span><p><ul id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_ul22572261122934"><li id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_li65793432122934">If yes, enable SSL connection by referring to <a href="dws_01_0038.html#EN-US_TOPIC_0000001659054490__en-us_topic_0000001372520154_section131774823014">Configuring SSL Connection</a>. SSL connection is enabled by default. Then go to <a href="#EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_li55435426144245">2</a>.</li><li id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_li33835963201131">If no, disable SSL connection by referring to <a href="dws_01_0038.html#EN-US_TOPIC_0000001659054490__en-us_topic_0000001372520154_section131774823014">Configuring SSL Connection</a> and go to <a href="#EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_li19193115114292">4</a>.</li></ul>
</p></li><li id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_li55435426144245"><a name="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_li55435426144245"></a><a name="en-us_topic_0000001372679694_li55435426144245"></a><span>(Optional) On Linux, use WinSCP to upload the downloaded SSL certificate file to the Linux environment.</span></li><li id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_li52456717144453"><span>Configure the certificate to enable SSL connection.</span><p><ol type="a" id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_ol22252865144519"><li id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_li17933203911019">Download the OpenSSL tool for Windows. Download address: <a href="https://slproweb.com/products/Win32OpenSSL.html" target="_blank" rel="noopener noreferrer">https://slproweb.com/products/Win32OpenSSL.html</a>. Currently, OpenSSL 3.0.0 is not supported. Download <strong id="EN-US_TOPIC_0000001658895174__b182981052163013">Win64 OpenSSL v1.1.1w Light</strong>.</li><li id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_li19793203818129">Double-click the installation package <strong id="EN-US_TOPIC_0000001658895174__b103271256193012">Win64OpenSSL_Light-1_1_1w.exe</strong> and install it to the default path on drive C. Copy the DLLs to the OpenSSL directory, as shown in the following figure. Retain the default settings in the remaining steps until the installation is successful.<p id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_p1765314621511"><span><img id="EN-US_TOPIC_0000001658895174__image72728253311" src="figure/en-us_image_0000001735984732.png" title="Click to enlarge" class="imgResize"></span></p>
</li><li id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_li5429344201519">Install an environment variable. Click <strong id="EN-US_TOPIC_0000001658895174__b165522116239">Start</strong> in the lower left corner of the local PC, right-click <strong id="EN-US_TOPIC_0000001658895174__b836619285241">This PC</strong>, choose <strong id="EN-US_TOPIC_0000001658895174__b12579143118247">More</strong> &gt; <strong id="EN-US_TOPIC_0000001658895174__b17995134210249">Properties</strong> &gt; <strong id="EN-US_TOPIC_0000001658895174__b251610239268">View advanced system settings</strong>. Switch to the <strong id="EN-US_TOPIC_0000001658895174__b1860915232720">Advanced</strong> tab and click <strong id="EN-US_TOPIC_0000001658895174__b122515106275">Environment Variables</strong>.<p id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_p641918506200"><span><img id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_image1123835117201" src="figure/en-us_image_0000001759351881.png" title="Click to enlarge" class="imgResize"></span></p>
</li><li id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_li2754348162014">In the <strong id="EN-US_TOPIC_0000001658895174__b197937214018">System variables</strong> area, double-click <strong id="EN-US_TOPIC_0000001658895174__b107261787403">Path</strong> and click <strong id="EN-US_TOPIC_0000001658895174__b116181844016">New</strong> in the window displayed. Add the OpenSSL <strong id="EN-US_TOPIC_0000001658895174__b1768844694018">bin</strong> path to the last line, for example, <strong id="EN-US_TOPIC_0000001658895174__b1021195064013">C:\Program Files\OpenSSL-Win64\bin</strong>, and click <strong id="EN-US_TOPIC_0000001658895174__b132901352144014">OK</strong>. Click <strong id="EN-US_TOPIC_0000001658895174__b563410591402">OK</strong> again and the variable is configured successfully.<p id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_p15723144011227"><span><img id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_image202612428225" src="figure/en-us_image_0000001711592328.png" title="Click to enlarge" class="imgResize"></span></p>
</li><li id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_li2754348162014">In the <strong id="EN-US_TOPIC_0000001658895174__b197937214018">System variables</strong> area, double-click <strong id="EN-US_TOPIC_0000001658895174__b107261787403">Path</strong> and click <strong id="EN-US_TOPIC_0000001658895174__b116181844016">New</strong> in the window displayed. Add the OpenSSL <strong id="EN-US_TOPIC_0000001658895174__b1768844694018">bin</strong> path to the last line, for example, <strong id="EN-US_TOPIC_0000001658895174__b1021195064013">C:\Program Files\OpenSSL-Win64\bin</strong>, and click <strong id="EN-US_TOPIC_0000001658895174__b132901352144014">OK</strong>. Click <strong id="EN-US_TOPIC_0000001658895174__b563410591402">OK</strong> again and the variable is configured successfully.<p id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_p15723144011227"><span><img id="EN-US_TOPIC_0000001658895174__image10145115631018" src="figure/en-us_image_0000001962140553.png" title="Click to enlarge" class="imgResize"></span></p>
</li><li id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_li8379608144519">Decompress the package to obtain the certificate file. Decompression path <strong id="EN-US_TOPIC_0000001658895174__b842352706182052">C:\</strong> is used as an example.<p id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_p48280457154633">You are advised to store the certificate file in a path of the English version and can specify the actual path when configuring the certificate. If the path is incorrect, a message stating that the file does not exist will be prompted.</p>
</li><li id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_li34839599144529">Open <span class="parmname" id="EN-US_TOPIC_0000001658895174__parmname769647905182113"><b>Command Prompt</b></span> and switch to the <strong id="EN-US_TOPIC_0000001658895174__b1953293212467">C:\dws_ssl_cert\sslcert</strong> path. Run the following commands to import the root license to the truststore:<pre class="screen" id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_screen95697417401"><strong id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_b16125141013408">openssl</strong> <strong id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_b11125111013408">x509</strong> <strong id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_b20125710134018">-in</strong> <em id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_i1612561014017">cacert.pem</em> <strong id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_b5125510164014">-out</strong> <em id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_i131259102408">cacert.crt.der</em> <strong id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_b312515107402">-outform</strong> <em id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_i9125121012409">der</em>
<strong id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_b13125151024015">keytool</strong> <strong id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_b212581013404">-keystore</strong> <em id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_i1612531016403">mytruststore</em> <strong id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_b16125191015406">-alias</strong> <em id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_i201251310124010">cacert</em> <strong id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_b212551024015">-import</strong> <strong id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_b112521016404">-file</strong> <em id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_i7125710104013">cacert.crt.der</em></pre>
@ -32,7 +32,7 @@
</p></li><li id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_li19193115114292"><a name="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_li19193115114292"></a><a name="en-us_topic_0000001372679694_li19193115114292"></a><span>Download the driver package <strong id="EN-US_TOPIC_0000001658895174__b1217110121217">dws_8.1.x_jdbc_driver.zip</strong> and decompress it. There will be two JDBC drive JAR packages, <strong id="EN-US_TOPIC_0000001658895174__b665924017211">gsjdbc4.jar</strong> and <strong id="EN-US_TOPIC_0000001658895174__b1253124410217">gsjdbc200.jar</strong>. Use either of them as required.</span></li><li id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_li6445271046"><span>Add the JAR file to the application project so that applications can reference the JAR file.</span><p><p id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_p19218649143013">Take the Eclipse project as an example. Store the JAR file to the project directory, for example, the <strong id="EN-US_TOPIC_0000001658895174__b84235270694758">lib</strong> directory in the project directory. In the Eclipse project, right-click the JAR file in the <strong id="EN-US_TOPIC_0000001658895174__b84235270694834">lib</strong> directory and choose <strong id="EN-US_TOPIC_0000001658895174__b84235270694854">Build Path</strong> to reference the JAR file.</p>
<div class="fignone" id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_fig18599113514410"><span class="figcap"><b>Figure 1 </b>Referencing a JAR file</span><br><span><img id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_image16355726201812" src="figure/en-us_image_0000001759511761.png" title="Click to enlarge" class="imgResize"></span></div>
</p></li><li id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_li51389053141123"><span>Load the driver.</span><p><p id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_p6696698141143">The following methods are available:</p>
<ul id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_ul38409173141159"><li id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_li1918654141159">Using a code: <strong id="EN-US_TOPIC_0000001658895174__b842352706145014">Class.forName("org.postgresql.Driver");</strong></li><li id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_li2181879814120">Using a parameter during the JVM startup: <strong id="EN-US_TOPIC_0000001658895174__b842352706145022">java -Djdbc.drivers=org.postgresql.Driver jdbctest</strong><div class="note" id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_note141631220154715"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_p816422004718">The JDBC driver package downloaded on GaussDB(DWS)<span id="EN-US_TOPIC_0000001658895174__ph1463975661011">contains <strong id="EN-US_TOPIC_0000001658895174__b1563975661017">gsjdbc.jar</strong></span>.</p>
<ul id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_ul38409173141159"><li id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_li1918654141159">Using a code: <strong id="EN-US_TOPIC_0000001658895174__b842352706145014">Class.forName("org.postgresql.Driver");</strong></li><li id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_li2181879814120">Using a parameter during the JVM startup: <strong id="EN-US_TOPIC_0000001658895174__b842352706145022">java -Djdbc.drivers=org.postgresql.Driver jdbctest</strong><div class="note" id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_note141631220154715"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_p816422004718">The JDBC driver package downloaded on GaussDB(DWS)<span id="EN-US_TOPIC_0000001658895174__ph117051642642">contains <strong id="EN-US_TOPIC_0000001658895174__b77041421241">gsjdbc.jar</strong></span>.</p>
<ul id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_ul71640202478"><li id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_li91651120184715"><strong id="EN-US_TOPIC_0000001658895174__b4975445174110">gsjdbc4.jar</strong>: The <strong id="EN-US_TOPIC_0000001658895174__b19761456417">gsjdbc4.jar</strong> driver package is compatible with PostgreSQL. Its class names and class structures are the same as those of the PostgreSQL driver. Applications that run in PostgreSQL can be directly migrated to the current system.</li></ul>
</div></div>
</li></ul>
@ -148,26 +148,22 @@
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">conn</span><span class="p">;</span>
<span class="err">}</span>
</pre></div></td></tr></table></div>
</div>
</div>
</p></li><li id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_li57737405142236"><span>Run SQL statements.</span><p><ol type="a" id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_ol4106272914244"><li id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_li3008150414244">Run the following command to create a statement object:<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_screen31528705142436"><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="n">Statement</span><span class="w"> </span><span class="n">stmt</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">con</span><span class="p">.</span><span class="na">createStatement</span><span class="p">();</span>
</pre></div></td></tr></table></div>
</div>
</li><li id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_li30042520142412">Run the following command to execute the statement object:<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_screen24378355142452"><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="kt">int</span><span class="w"> </span><span class="n">rc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">stmt</span><span class="p">.</span><span class="na">executeUpdate</span><span class="p">(</span><span class="s">&quot;CREATE TABLE tab1(id INTEGER, name VARCHAR(32));&quot;</span><span class="p">);</span>
</pre></div></td></tr></table></div>
</div>
</li><li id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_li52424185142422">Run the following command to release the statement object:<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_screen3966348014252"><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="n">stmt</span><span class="p">.</span><span class="na">close</span><span class="p">();</span>
</pre></div></td></tr></table></div>
</div>
</li></ol>
</p></li><li id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_li642819315415"><span>Call <strong id="EN-US_TOPIC_0000001658895174__b842352706153452">close()</strong> to close the connection.</span></li></ol>
</div>
<div class="section" id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_section12107104719399"><h4 class="sectiontitle">Sample Code</h4><p id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_a531804ad67df4007b0b2308fd92611db">This code sample illustrates how to develop applications based on the JDBC API provided by GaussDB(DWS).</p>
<div class="note" id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_note183201195518"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_p6320181125511">Before completing the following example, you need to create a stored procedure. For details, see "Guide: JDBC- or ODBC-Based Development" in the <em id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_i181751858163510">Data Warehouse Service Developer Guide</em>.</p>
<div class="note" id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_note183201195518"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_p6320181125511">Before completing the following example, you need to create a stored procedure. For details, see "Tutorial: Development Using JDBC or ODBC" in the <em id="EN-US_TOPIC_0000001658895174__i6321150549">Data Warehouse Service (DWS) Developer Guide</em>.</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_s9dfd0fc5586d464ebdf741ac5a35b8fc"><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>
@ -190,7 +186,6 @@
<span class="k">end</span><span class="p">;</span>
<span class="o">/</span>
</pre></div></td></tr></table></div>
</div>
</div></div>
<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0000001658895174__en-us_topic_0000001372679694_screen19148144710390"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span>
@ -531,7 +526,6 @@
<span class="p">}</span>
</pre></div></td></tr></table></div>
</div>
</div>
</div>

View File

@ -7,7 +7,7 @@
<div class="section" id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_section1947515211228"><h4 class="sectiontitle">Deleting Resources</h4><p id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_p230022382216">After performing the steps in "Getting Started," if you do not need to use the sample data, clusters, ECSs, or VPCs, delete the resources so that your service quotas will not be wasted or occupied.</p>
</div>
<ol id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_ol4364421917155"><li id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_li57137789173339"><span>Delete the ECS created in <a href="dws_01_0107.html#EN-US_TOPIC_0000001707254513">Step 3: Connecting to a Cluster</a> for connecting to the GaussDB(DWS) cluster.</span><p><ol type="a" id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_ol308897309560"><li id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_li3849280117125">Log in to the <span id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_text202275411174">cloud</span> console.</li><li id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_li4694663095636">Click <span class="uicontrol" id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_uicontrol1858462681154253"><b>Service List</b></span> and choose <span class="menucascade" id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_menucascade407049684141742"><b><span class="uicontrol" id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_uicontrol989335090141724">Computing</span></b> &gt; <b><span class="uicontrol" id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_uicontrol9271191153413">Elastic Cloud Server</span></b></span> to enter the ECS console.</li><li id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_li1462270295638">In the navigation tree on the left, click <span class="uicontrol" id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_uicontrol56199637420611"><b>Elastic Cloud Server</b></span>. In the ECS list, select the ECS to be deleted and click <strong id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_b84235270620656">Delete</strong>. You can choose to delete the associated EIP and data disks at the same time. If you do not delete them, they are reserved. If necessary, you can manually delete them later.</li><li id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_li18588741101358">Click <span class="uicontrol" id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_uicontrol63859519323"><b>OK</b></span>.</li></ol>
</p></li><li id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_li2112487817244"><span>Delete a GaussDB(DWS) cluster.</span><p><p id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_p105688014312">On the GaussDB(DWS) management console, click <strong id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_b194216375155">Cluster</strong> &gt; <strong id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_b1946183091610">Dedicated Cluster</strong>, locate the row that contains <strong id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_b1516573614314">dws-demo</strong> in the cluster list, and choose <strong id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_b14546115217153">More &gt; Delete</strong>. In the dialog box that is displayed, select <span class="uicontrol" id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_uicontrol4984589421559"><b>Release the EIP bound with the cluster</b></span> and click <strong id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_b459623715162">OK</strong>.</p>
</p></li><li id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_li2112487817244"><span>Delete a GaussDB(DWS) cluster.</span><p><p id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_p105688014312">On the GaussDB(DWS) console, click <strong id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_b75039487471">Clusters</strong> &gt; <strong id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_b14503124815479">Dedicated Clusters<span id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_text131001553145520"></span></strong>, locate the row that contains <strong id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_b65031648174712">dws-demo</strong> in the cluster list, and choose <strong id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_b1978113385505">More</strong> &gt; <strong id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_b9906144015509">Delete</strong>. In the dialog box that is displayed, select <span class="uicontrol" id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_uicontrol4984589421559"><b>Release the EIP bound with the cluster</b></span> and click <strong id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_b459623715162">OK</strong>.</p>
<p id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_p1155820538397">If the cluster to be deleted uses an automatically created security group that is not used by other clusters, the security group is automatically deleted when the cluster is deleted.</p>
</p></li><li id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_li167271144181919"><span>Delete a subnet. Before deleting the subnet, ensure that it is not bound to other resources.</span><p><p id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_p327025614206">Log in to the VPC management console. In the navigation tree on the left, click <strong id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_b2156115144415">Virtual Private Cloud</strong>. In the VPC list, click <strong id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_b216114150447">vpc-dws</strong>. In the subnet list, locate the row that contains <strong id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_b151621015184418">subnet-dws</strong> and click <strong id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_b816371514449">Delete</strong>.</p>
</p></li><li id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_li25067375172931"><span>Delete a VPC. Before deleting the VPC, ensure that it is not bound to other resources.</span><p><p id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_p920124651812">Log in to the VPC management console, locate the row that contains <strong id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_b1713442024411">vpc-dws</strong> in the VPC list, and click <strong id="EN-US_TOPIC_0000001707293745__en-us_topic_0000001422959193_b114020202443">Delete</strong>.</p>

View File

@ -15,11 +15,9 @@
<span class="n">make</span>
<span class="n">make</span><span class="w"> </span><span class="n">install</span>
</pre></div></td></tr></table></div>
</div>
<div class="note" id="EN-US_TOPIC_0000001659054498__note69312159488"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="EN-US_TOPIC_0000001659054498__ul12637252506"><li id="EN-US_TOPIC_0000001659054498__li4637145155010">After the unixODBC is compiled and installed, the <strong id="EN-US_TOPIC_0000001659054498__b033216214820">*.so.2</strong> library file will be in the installation directory. To create the <strong id="EN-US_TOPIC_0000001659054498__b16591191354819">*.so.1</strong> library file, change <strong id="EN-US_TOPIC_0000001659054498__b4606105514471">LIB_VERSION</strong> in the configure file to <strong id="EN-US_TOPIC_0000001659054498__b84291451124713">1:0:0</strong>.<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001659054498__screen134015019565"><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="n">LIB_VERSION</span><span class="o">=</span><span class="ss">&quot;1:0:0&quot;</span>
</pre></div></td></tr></table></div>
</div>
</li><li id="EN-US_TOPIC_0000001659054498__li58222049131515">This driver dynamically loads the <strong id="EN-US_TOPIC_0000001659054498__b5866924220">libodbcinst.so.</strong>* library files. If one of the library files is successfully loaded, the library file is loaded. The loading priority is <strong id="EN-US_TOPIC_0000001659054498__b32163014556">libodbcinst.so</strong> &gt; <strong id="EN-US_TOPIC_0000001659054498__b565314315510">libodbcinst.so.1</strong> &gt; <strong id="EN-US_TOPIC_0000001659054498__b1248120719556">libodbcinst.so.1.0.0</strong> &gt; <strong id="EN-US_TOPIC_0000001659054498__b8620111119555">libodbcinst.so.2</strong> &gt; <strong id="EN-US_TOPIC_0000001659054498__b1656201515550">libodbcinst.so.2.0.0</strong>.<p id="EN-US_TOPIC_0000001659054498__p6296185810152">For example, a directory can be dynamically linked to <strong id="EN-US_TOPIC_0000001659054498__b851210351431">libodbcinst.so.1</strong>, <strong id="EN-US_TOPIC_0000001659054498__b888843913315">libodbcinst.so.1.0.0</strong>, and <strong id="EN-US_TOPIC_0000001659054498__b4492443530">libodbcinst.so.2</strong>. The driver file loads <strong id="EN-US_TOPIC_0000001659054498__b214859636">libodbcinst.so</strong> first. If <strong id="EN-US_TOPIC_0000001659054498__b1686683644">libodbcinst.so</strong> cannot be found in the current environment, the driver file searches for <strong id="EN-US_TOPIC_0000001659054498__b17813122410">libodbcinst.so.1</strong>, which has a lower priority. After <strong id="EN-US_TOPIC_0000001659054498__b1445812526411">libodbcinst.so.1</strong> is loaded, the loading is complete.</p>
</li></ul>
@ -143,7 +141,6 @@ export ODBCINI=/usr/local/etc/odbc.ini</pre>
<span class="o">+</span><span class="c1">---------------------------------------+ </span>
<span class="k">SQL</span><span class="o">&gt;</span><span class="w"> </span>
</pre></div></td></tr></table></div>
</div>
</p></li></ol>
</div>
@ -334,7 +331,6 @@ export ODBCINI=/usr/local/etc/odbc.ini</pre>
<span class="w"> </span><span class="k">return</span><span class="p">(</span><span class="mi">0</span><span class="p">);</span>
<span class="w"> </span><span class="p">}</span>
</pre></div></td></tr></table></div>
</div>
</p></li></ol>
</div>

View File

@ -2,7 +2,7 @@
<h1 class="topictitle1">Subscribing to Event Notifications</h1>
<div id="body8662426"><p id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_p1637252785818">After subscribing to GaussDB(DWS) event notification, you will receive notifications by text message, email, or application when management, monitoring, or security events occur in a specific cluster or snapshot.</p>
<div class="section" id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_section29431612141618"><h4 class="sectiontitle">Creating a Subscription</h4><ol id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_ol618381192220"><li id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_li646412255419"><span>Log in to the GaussDB(DWS) management console.</span></li><li id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_li5247206216936"><span>In the navigation tree on the left, click <span class="uicontrol" id="EN-US_TOPIC_0000001658895230__uicontrol19723021153812"><b>Event Management</b></span>.</span></li><li id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_li3444153313462"><span>On the <span class="wintitle" id="EN-US_TOPIC_0000001658895230__wintitle18537912285"><b>Event Management</b></span> page, choose <span class="uicontrol" id="EN-US_TOPIC_0000001658895230__uicontrol125433124818"><b>Subscription</b></span> &gt; <span class="uicontrol" id="EN-US_TOPIC_0000001658895230__uicontrol17543171219818"><b>Create Subscription</b></span>.</span></li><li id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_li18772435125416"><a name="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_li18772435125416"></a><a name="en-us_topic_0000001423119165_li18772435125416"></a><span>In the <span class="wintitle" id="EN-US_TOPIC_0000001658895230__wintitle72665175195812"><b>Subscription Settings</b></span> area, set basic subscription information and event filtering.</span><p><p id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_p39911636205410">The <span class="wintitle" id="EN-US_TOPIC_0000001658895230__wintitle103978123494852"><b>Subscribed Event List</b></span> area displays the events filtered by the system based on the subscription settings.</p>
<div class="section" id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_section29431612141618"><h4 class="sectiontitle">Creating a Subscription</h4><ol id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_ol618381192220"><li id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_li646412255419"><span>Log in to the GaussDB(DWS) console.</span></li><li id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_li5247206216936"><span>In the navigation tree on the left, click <span class="uicontrol" id="EN-US_TOPIC_0000001658895230__uicontrol19723021153812"><b>Event Management</b></span>.</span></li><li id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_li3444153313462"><span>On the <span class="wintitle" id="EN-US_TOPIC_0000001658895230__wintitle18537912285"><b>Event Management</b></span> page, choose <span class="uicontrol" id="EN-US_TOPIC_0000001658895230__uicontrol125433124818"><b>Subscription</b></span> &gt; <span class="uicontrol" id="EN-US_TOPIC_0000001658895230__uicontrol17543171219818"><b>Create Subscription</b></span>.</span></li><li id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_li18772435125416"><a name="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_li18772435125416"></a><a name="en-us_topic_0000001423119165_li18772435125416"></a><span>In the <span class="wintitle" id="EN-US_TOPIC_0000001658895230__wintitle72665175195812"><b>Subscription Settings</b></span> area, set basic subscription information and event filtering.</span><p><p id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_p39911636205410">The <span class="wintitle" id="EN-US_TOPIC_0000001658895230__wintitle103978123494852"><b>Subscribed Event List</b></span> area displays the events filtered by the system based on the subscription settings.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_table197058275115" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Subscription parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_row4704172711114"><th align="left" class="cellrowborder" valign="top" width="15.7%" id="mcps1.3.2.2.4.2.2.2.3.1.1"><p id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_p1270452717114"><strong id="EN-US_TOPIC_0000001658895230__b7617970162543">Parameter</strong></p>
</th>
@ -13,7 +13,7 @@
<tbody><tr id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_row127045270117"><td class="cellrowborder" valign="top" width="15.7%" headers="mcps1.3.2.2.4.2.2.2.3.1.1 "><p id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_p970452716119">Notification</p>
</td>
<td class="cellrowborder" valign="top" width="84.3%" headers="mcps1.3.2.2.4.2.2.2.3.1.2 "><p id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_p1370413271118">Enable or disable event subscription.</p>
<p id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_p2704172741117"><span><img id="EN-US_TOPIC_0000001658895230__image1670422721112" src="figure/en-us_image_0000001759357481.png"></span> indicates that event subscription is enabled. <span><img id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_image55811736102112" src="figure/en-us_image_0000001759517349.jpg"></span> indicates that event subscription is disabled. This function is enabled by default. After the function is disabled, the system stops sending notifications of subscribed events but does not delete the subscription.</p>
<p id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_p2704172741117"><span><img id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_image1670422721112" src="figure/en-us_image_0000001759357481.png"></span> indicates that event subscription is enabled. <span><img id="EN-US_TOPIC_0000001658895230__image1519619502117" src="figure/en-us_image_0000001759517349.jpg"></span> indicates that event subscription is disabled. This function is enabled by default. After the function is disabled, the system stops sending notifications of subscribed events but does not delete the subscription.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_row137055276114"><td class="cellrowborder" valign="top" width="15.7%" headers="mcps1.3.2.2.4.2.2.2.3.1.1 "><p id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_p137043275113">Subscription Name</p>
@ -40,7 +40,7 @@
</tbody>
</table>
</div>
</p></li><li id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_li89041225162317"><span>Select a message notification topic from the <span class="wintitle" id="EN-US_TOPIC_0000001658895230__wintitle482655675172616"><b>Message Notification Topic</b></span> drop-down list.</span><p><ul id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_ul88471435184815"><li id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_li684783517484">The selected topic must have granted GaussDB(DWS) the permission to publish messages to the topic.<p id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_p1955418612514"><a name="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_li684783517484"></a><a name="en-us_topic_0000001423119165_li684783517484"></a>If GaussDB(DWS) has not been authorized to publish messages to the selected topic, go to the topic management page of the SMN console to configure topic authorization. For details, see <strong id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_b3400201419432">Topic </strong><strong id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_b240091411439">Management</strong> &gt; <strong id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_b174001148438">Configuring Topic Policies</strong> in the <i><cite id="EN-US_TOPIC_0000001658895230__cite398f2edb390b4b20b84dd2c4d28854e2165021">Simple Message Notification User Guide</cite></i>. When configuring the topic policy, select <span class="parmvalue" id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_parmvalue340014149431"><b>GaussDB(DWS)</b></span> for <span class="wintitle" id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_wintitle1140013145433"><b>Services that can publish messages to this topic</b></span>.</p>
</p></li><li id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_li89041225162317"><span>Select a message notification topic from the <span class="wintitle" id="EN-US_TOPIC_0000001658895230__wintitle482655675172616"><b>Message Notification Topic</b></span> drop-down list.</span><p><ul id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_ul88471435184815"><li id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_li684783517484">The selected topic must have granted GaussDB(DWS) the permission to publish messages to the topic.<p id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_p1955418612514"><a name="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_li684783517484"></a><a name="en-us_topic_0000001423119165_li684783517484"></a>If GaussDB(DWS) has not been authorized to publish messages to the selected topic, go to the topic management page of the SMN console to configure topic authorization. For details, see <strong id="EN-US_TOPIC_0000001658895230__b364731913228">Topic </strong><strong id="EN-US_TOPIC_0000001658895230__b13647719112217">Management</strong> &gt; <strong id="EN-US_TOPIC_0000001658895230__b0647171912218">Configuring Topic Policies</strong> in the <i><cite id="EN-US_TOPIC_0000001658895230__cite1464741918225">Simple Message Notification User Guide</cite></i>. When configuring the topic policy, select <span class="parmvalue" id="EN-US_TOPIC_0000001658895230__parmvalue2648131913225"><b>GaussDB(DWS)</b></span> for <span class="wintitle" id="EN-US_TOPIC_0000001658895230__wintitle176481194221"><b>Services that can publish messages to this topic</b></span>.</p>
</li><li id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_li179733504571">To create a topic, click <span class="uicontrol" id="EN-US_TOPIC_0000001658895230__uicontrol119711919101115"><b>Create Topic</b></span>. The SMN console is displayed. For details, see <span class="parmname" id="EN-US_TOPIC_0000001658895230__parmname149722197116"><b>Topic Management &gt; Creating a Topic</b></span> in the <i><cite id="EN-US_TOPIC_0000001658895230__cite86bd79c20b8748dbb61d38a431793b40165021">Simple Message Notification User Guide</cite></i>.</li></ul>
</p></li><li id="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_li164751612342"><a name="EN-US_TOPIC_0000001658895230__en-us_topic_0000001423119165_li164751612342"></a><a name="en-us_topic_0000001423119165_li164751612342"></a><span>Click <strong id="EN-US_TOPIC_0000001658895230__b84235270692711">OK</strong> to complete the subscription.</span></li></ol>
</div>

View File

@ -5,7 +5,7 @@
<ol id="EN-US_TOPIC_0000001707254513__en-us_topic_0000001423159613_ol1131365102135"><li id="EN-US_TOPIC_0000001707254513__en-us_topic_0000001423159613_li6884192062018">Obtain the name, username, and password of the database to be connected.<p id="EN-US_TOPIC_0000001707254513__en-us_topic_0000001423159613_p2408234205"><a name="EN-US_TOPIC_0000001707254513__en-us_topic_0000001423159613_li6884192062018"></a><a name="en-us_topic_0000001423159613_li6884192062018"></a>If you use the client to connect to the cluster for the first time, use the administrator username and password set in <a href="dws_01_0013.html">Step 2: Creating a Cluster</a> to connect to the default database <span class="parmvalue" id="EN-US_TOPIC_0000001707254513__en-us_topic_0000001423159613_parmvalue135411726164018"><b><span id="EN-US_TOPIC_0000001707254513__en-us_topic_0000001423159613_text171906415556">gaussdb</span></b></span>.</p>
</li><li id="EN-US_TOPIC_0000001707254513__en-us_topic_0000001423159613_li29704753122535"><a href="#EN-US_TOPIC_0000001707254513__en-us_topic_0000001423159613_section2301113635">Obtaining the Public Network Address of the Cluster</a>: Connect to the cluster database using the public network address.</li><li id="EN-US_TOPIC_0000001707254513__en-us_topic_0000001423159613_li11594561122535"><a href="#EN-US_TOPIC_0000001707254513__en-us_topic_0000001423159613_section99729517811">Connecting to the Cluster Database Using Data Studio</a>: Download and configure the Data Studio client and connect to the cluster database.</li></ol>
</div>
<div class="section" id="EN-US_TOPIC_0000001707254513__en-us_topic_0000001423159613_section2301113635"><a name="EN-US_TOPIC_0000001707254513__en-us_topic_0000001423159613_section2301113635"></a><a name="en-us_topic_0000001423159613_section2301113635"></a><h4 class="sectiontitle">Obtaining the Public Network Address of the Cluster</h4><ol id="EN-US_TOPIC_0000001707254513__en-us_topic_0000001423159613_ol430273838"><li id="EN-US_TOPIC_0000001707254513__en-us_topic_0000001423159613_li1630211312315"><span>Log in to the GaussDB(DWS) management console.</span></li><li id="EN-US_TOPIC_0000001707254513__en-us_topic_0000001423159613_li18302336310"><span>In the navigation pane on the left, choose <span class="uicontrol" id="EN-US_TOPIC_0000001707254513__en-us_topic_0000001423159613_uicontrol13304836319"><b>Clusters &gt; Dedicated Clusters</b></span>.</span></li><li id="EN-US_TOPIC_0000001707254513__en-us_topic_0000001423159613_li4308203433"><span>In the cluster list, select a created cluster (for example, <strong id="EN-US_TOPIC_0000001707254513__en-us_topic_0000001423159613_b56348177398">dws-demo</strong>) and click <span><img id="EN-US_TOPIC_0000001707254513__en-us_topic_0000001423159613_image11308238317" src="figure/en-us_image_0000001231470859.png"></span> next to the cluster name to obtain the public network address.</span><p><p id="EN-US_TOPIC_0000001707254513__en-us_topic_0000001423159613_p103081731439">The public network address will be used in <a href="#EN-US_TOPIC_0000001707254513__en-us_topic_0000001423159613_section99729517811">Connecting to the Cluster Database Using Data Studio</a>.</p>
<div class="section" id="EN-US_TOPIC_0000001707254513__en-us_topic_0000001423159613_section2301113635"><a name="EN-US_TOPIC_0000001707254513__en-us_topic_0000001423159613_section2301113635"></a><a name="en-us_topic_0000001423159613_section2301113635"></a><h4 class="sectiontitle">Obtaining the Public Network Address of the Cluster</h4><ol id="EN-US_TOPIC_0000001707254513__en-us_topic_0000001423159613_ol430273838"><li id="EN-US_TOPIC_0000001707254513__en-us_topic_0000001423159613_li1630211312315"><span>Log in to the GaussDB(DWS) management console.</span></li><li id="EN-US_TOPIC_0000001707254513__en-us_topic_0000001423159613_li18302336310"><span>In the navigation pane on the left, choose <span class="uicontrol" id="EN-US_TOPIC_0000001707254513__en-us_topic_0000001423159613_uicontrol13304836319"><b>Clusters &gt; Dedicated Clusters<span id="EN-US_TOPIC_0000001707254513__en-us_topic_0000001423159613_text864019447540"></span></b></span>.</span></li><li id="EN-US_TOPIC_0000001707254513__en-us_topic_0000001423159613_li4308203433"><span>In the cluster list, select a created cluster (for example, <strong id="EN-US_TOPIC_0000001707254513__en-us_topic_0000001423159613_b56348177398">dws-demo</strong>) and click <span><img id="EN-US_TOPIC_0000001707254513__en-us_topic_0000001423159613_image11308238317" src="figure/en-us_image_0000001231470859.png"></span> next to the cluster name to obtain the public network address.</span><p><p id="EN-US_TOPIC_0000001707254513__en-us_topic_0000001423159613_p103081731439">The public network address will be used in <a href="#EN-US_TOPIC_0000001707254513__en-us_topic_0000001423159613_section99729517811">Connecting to the Cluster Database Using Data Studio</a>.</p>
<div class="fignone" id="EN-US_TOPIC_0000001707254513__en-us_topic_0000001423159613_fig19228787245"><span class="figcap"><b>Figure 1 </b>Cluster management</span><br><span><img id="EN-US_TOPIC_0000001707254513__en-us_topic_0000001423159613_image10228882243" src="figure/en-us_image_0000001185831246.png" title="Click to enlarge" class="imgResize"></span></div>
</p></li></ol>
</div>

View File

@ -9,7 +9,7 @@
</p></li><li id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_li1180614455343"><a name="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_li1180614455343"></a><a name="en-us_topic_0000001662557549_li1180614455343"></a><span>Complete the user information as required, confirm the information, and click <strong id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_b162011227140">Next</strong>.</span><p><ul id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_ul108211145193417"><li id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_li16314141333511"><strong id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_b55231437147">Username</strong>: A username must start with a letter and can contain letters, numbers, and underscores (_). The length cannot exceed 63 characters.</li><li id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_li2314111343515"><strong id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_b16563648171416">Password</strong>: A password must start with a letter and can contain letters, numbers, and underscores (_). The length cannot exceed 63 characters.<div class="note" id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_note7874182613515"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_p11629634113510">Must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters (~!?,.:;_(){}[]/&lt;&gt;@#%^&amp;*+|\=-)</p>
</div></div>
</li><li id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_li2031418139355"><strong id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_b1914044119154">Maximum Connections</strong>: The maximum number of database connections that a user can set up. The value <strong id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_b124296125167">-1</strong> indicates that the number of connections is not limited.</li><li id="EN-US_TOPIC_0000001658828846__li4742125123715"><strong id="EN-US_TOPIC_0000001658828846__b272614211102">Expires</strong>: Set the expiration time of the user permission.</li><li id="EN-US_TOPIC_0000001658828846__li6380130133719"><strong id="EN-US_TOPIC_0000001658828846__b1312515014369">System Administrator</strong>: Whether the user has the system administrator rights.</li><li id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_li1531416135359"><strong id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_b11401322111816">Create Database</strong>: Whether the user has the permission to create databases.</li><li id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_li15314131315355"><strong id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_b1023113719181">Create Role</strong>: Whether the user has the permission to create users and roles.</li><li id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_li18315813103516"><strong id="EN-US_TOPIC_0000001658828846__b1733419541974">Inherited Permissions</strong>: Whether the user inherits role permissions from its group. <strong id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_b181244131202">This function is enabled by default. You are advised to retain this setting.</strong></li></ul>
</p></li><li id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_en-us_topic_0000001098976722_li10272211162717"><span>Select the role to be granted to the user and click <strong id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_b16801957172111">Next</strong>.</span></li><li id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_li492217111503"><span>Configure permissions not included in the roles of the user.</span><p><p id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_p1397713105547">Click <strong id="EN-US_TOPIC_0000001658828846__b168930592775757">Add</strong> to add a permission configuration. Select the database object type and corresponding database object, and select the permission to complete assignment For details about permission definitions, see "DCL Syntax &gt; GRANT" in <em id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_i133482030182318">SQL Syntax Reference</em>.</p>
</p></li><li id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_en-us_topic_0000001098976722_li10272211162717"><span>Select the role to be granted to the user and click <strong id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_b16801957172111">Next</strong>.</span></li><li id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_li492217111503"><span>Configure permissions not included in the roles of the user.</span><p><p id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_p1397713105547">Click <strong id="EN-US_TOPIC_0000001658828846__b168930592775757">Add</strong> to add a permission configuration. Select the database object type and corresponding database object, and select the permission to complete assignment For details about permission definitions, see "DCL Syntax" &gt; "GRANT" in <em id="EN-US_TOPIC_0000001658828846__i910210438417">SQL Syntax Reference</em>.</p>
<p id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_p86961285544"><span><img id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_image769613810541" src="figure/en-us_image_0000001759419497.png" title="Click to enlarge" class="imgResize"></span></p>
</p></li><li id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_li10948133095616"><span>After the authorization is complete, click <strong id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_b62914133714">Create</strong>.</span></li></ol>
</div>
@ -17,7 +17,7 @@
</p></li><li id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_li18882141714219"><span>Select the role to be granted to the user and click <strong id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_b1757472252">Next</strong>.</span></li><li id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_li138827179212"><span>Add or remove permissions as required.</span><p><p id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_p1288218171214"><span><img id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_image87641156699" src="figure/en-us_image_0000001759579393.png" title="Click to enlarge" class="imgResize"></span></p>
</p></li><li id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_li128839171222"><span>Confirm the permissions. Click lick <strong id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_b6832195015252">Save</strong>.</span></li></ol>
</div>
<div class="section" id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_section1645112582495"><h4 class="sectiontitle">Deleting a User</h4><ol id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_ol147794514105"><li id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_li107720450106"><span>Log in to the GaussDB(DWS) console. In the navigation pane, choose <strong id="EN-US_TOPIC_0000001658828846__b16299192514362">Clusters</strong> &gt; <strong id="EN-US_TOPIC_0000001658828846__b20300725193610">Dedicated Clusters</strong>.</span></li><li id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_li13777453102"><span>In the cluster list, click the name of the target cluster. The <span class="parmname" id="EN-US_TOPIC_0000001658828846__parmname1459999541"><b>Cluster Information</b></span> page is displayed.</span></li><li id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_li27714520104"><span>In the navigation pane, choose <strong id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_b19738135417127">User Management</strong>.</span></li><li id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_li1277154514108"><span>Select a user from the user list and click <strong id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_b10209208142610">Delete</strong>. A confirmation dialog box is displayed.</span></li><li id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_li8773457107"><span>Click <strong id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_b842352706142631">OK</strong>.</span><p><div class="note" id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_note18960102835617"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_p251603885013">If a user has dependencies on database objects, such as tables, that have not been deleted, the user will fail to be deleted.</p>
<div class="section" id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_section1645112582495"><h4 class="sectiontitle">Deleting a User</h4><ol id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_ol147794514105"><li id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_li107720450106"><span>Log in to the GaussDB(DWS) console. In the navigation pane, choose <strong id="EN-US_TOPIC_0000001658828846__b16299192514362">Clusters</strong> &gt; <strong id="EN-US_TOPIC_0000001658828846__b20300725193610">Dedicated Clusters</strong>.</span></li><li id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_li13777453102"><span>In the cluster list, click the name of the target cluster. The <span class="parmname" id="EN-US_TOPIC_0000001658828846__parmname1376334295"><b>Cluster Information</b></span> page is displayed.</span></li><li id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_li27714520104"><span>In the navigation pane, choose <strong id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_b19738135417127">User Management</strong>.</span></li><li id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_li1277154514108"><span>Select a user from the user list and click <strong id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_b10209208142610">Delete</strong>. A confirmation dialog box is displayed.</span></li><li id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_li8773457107"><span>Click <strong id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_b842352706142631">OK</strong>.</span><p><div class="note" id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_note18960102835617"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001658828846__en-us_topic_0000001662557549_p251603885013">If a user has dependencies on database objects, such as tables, that have not been deleted, the user will fail to be deleted.</p>
</div></div>
</p></li></ol>
</div>

View File

@ -3,15 +3,15 @@
<h1 class="topictitle1">Managing Roles</h1>
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_section15374815011"><h4 class="sectiontitle">Creating a Role</h4><ol id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_en-us_topic_0000001098976722_ol68915820275"><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li1316155620562"><span>Log in to the GaussDB(DWS) console. In the navigation pane, choose <strong id="EN-US_TOPIC_0000001707107473__b1867318471395">Clusters</strong> &gt; <strong id="EN-US_TOPIC_0000001707107473__b1767444711919">Dedicated Clusters</strong>.</span></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li197770975716"><span>In the cluster list, click the name of the target cluster. The <span class="parmname" id="EN-US_TOPIC_0000001707107473__parmname316614485198"><b>Cluster Information</b></span> page is displayed.</span></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_en-us_topic_0000001098976722_li1227291172718"><span>In the navigation pane, choose <strong id="EN-US_TOPIC_0000001707107473__b6612184814199">User Management</strong>.</span></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li19216200101419"><span>Click the <strong id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_b45924018210">Roles</strong> tab and click <strong id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_b7860164517218">Create Role</strong>. The role creation page is displayed.</span><p><p id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_p1978219384367"><span><img id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_image713493923611" src="figure/en-us_image_0000001759419545.png" title="Click to enlarge" class="imgResize"></span></p>
</p></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li195441210175213"><span>Complete the role information, confirm the information, and click <strong id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_b584516127231">Next</strong>.</span><p><ul id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_ul9886216115218"><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li0886216195211"><strong id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_b1994161518238">Role Name</strong>: A username must start with a letter and can contain letters, numbers, and underscores (_). The length cannot exceed 63 characters.</li><li id="EN-US_TOPIC_0000001707107473__li4742125123715"><strong id="EN-US_TOPIC_0000001707107473__b967475013912">Expires</strong>: Set the expiration time of the role permission.</li><li id="EN-US_TOPIC_0000001707107473__li6380130133719"><strong id="EN-US_TOPIC_0000001707107473__b19851115213914">System Administrator</strong>: Whether the role has the system administrator rights.</li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li14886201611521"><strong id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_b16941163573812">Create Database</strong>: Whether the role has the permission to create databases.</li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li7886416195218"><strong id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_b66121641183817">Create Role</strong>: Whether the role has the permission to create users and roles.</li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li28866168521"><strong id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_b637984723819">Inherit Permissions</strong>: Whether a role inherits permissions from its group. This function is enabled by default. You are advised to retain this setting.</li></ul>
</p></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li492217111503"><span>Configure the permissions of the role.</span><p><p id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_p1397713105547">Click <strong id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_b44113380392">Add</strong> to add a permission configuration. Select the database object type and the corresponding objects. Then, select permissions. For details about permission definitions, see "DCL Syntax &gt; GRANT" in <em id="EN-US_TOPIC_0000001707107473__i133482030182318">SQL Syntax Reference</em>.</p>
</p></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li492217111503"><span>Configure the permissions of the role.</span><p><p id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_p1397713105547">Click <strong id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_b44113380392">Add</strong> to add a permission configuration. Select the database object type and the corresponding objects. Then, select permissions. For details about permission definitions, see "DCL Syntax" &gt; "GRANT" in <em id="EN-US_TOPIC_0000001707107473__i4962124815412">SQL Syntax Reference</em>.</p>
<p id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_p86961285544"><span><img id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_image9557239161815" src="figure/en-us_image_0000001711660448.png" title="Click to enlarge" class="imgResize"></span></p>
</p></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li10948133095616"><span>After the authorization is complete, click <strong id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_b1366752415445">Create</strong>. The role is created.</span></li></ol>
</div>
<div class="section" id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_section7443115025318"><h4 class="sectiontitle">Modifying a Role</h4><ol id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_ol178821717722"><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li8882417620"><span>Log in to the GaussDB(DWS) console. In the navigation pane, choose <strong id="EN-US_TOPIC_0000001707107473__b11658154910110">Clusters</strong> &gt; <strong id="EN-US_TOPIC_0000001707107473__b19658134981113">Dedicated Clusters</strong>.</span></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li13882161716218"><span>In the cluster list, click the name of the target cluster. The <span class="parmname" id="EN-US_TOPIC_0000001707107473__parmname1878209061"><b>Cluster Information</b></span> page is displayed.</span></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li98828171727"><span>In the navigation pane, choose <strong id="EN-US_TOPIC_0000001707107473__b370310811">User Management</strong>.</span></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li988219171120"><span>In the role list, select a user and click <strong id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_b1622105115814">Modify</strong>. The page for modifying role details is displayed.</span></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li15775214135410"><span>Modify the role information, confirm the information, and click <strong id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_b733774216580">Next</strong>.</span><p><ul id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_ul11496351115417"><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li54969514547"><strong id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_b17467151717383">Role Name</strong>: A username must start with a letter and can contain letters, numbers, and underscores (_). The length cannot exceed 63 characters.</li><li id="EN-US_TOPIC_0000001707107473__li189835914307"><strong id="EN-US_TOPIC_0000001707107473__b2065095061116">Expires</strong>: Set the expiration time of the role permission.</li><li id="EN-US_TOPIC_0000001707107473__li1198155953013"><strong id="EN-US_TOPIC_0000001707107473__b11366552181111">System Administrator</strong>: Whether the role has the system administrator rights.</li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li44961651135410"><strong id="EN-US_TOPIC_0000001707107473__b1491021316">Create Database</strong>: Whether the role has the permission to create databases.</li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li1049615514541"><strong id="EN-US_TOPIC_0000001707107473__b139155434">Create Role</strong>: Whether the role has the permission to create users and roles.</li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li549615510547"><strong id="EN-US_TOPIC_0000001707107473__b798719913">Inherit Permissions</strong>: Whether a role inherits the permissions from its group. This function is enabled by default. You are advised to retain this setting.</li></ul>
<div class="section" id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_section7443115025318"><h4 class="sectiontitle">Modifying a Role</h4><ol id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_ol178821717722"><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li8882417620"><span>Log in to the GaussDB(DWS) console. In the navigation pane, choose <strong id="EN-US_TOPIC_0000001707107473__b11658154910110">Clusters</strong> &gt; <strong id="EN-US_TOPIC_0000001707107473__b19658134981113">Dedicated Clusters</strong>.</span></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li13882161716218"><span>In the cluster list, click the name of the target cluster. The <span class="parmname" id="EN-US_TOPIC_0000001707107473__parmname2022244711"><b>Cluster Information</b></span> page is displayed.</span></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li98828171727"><span>In the navigation pane, choose <strong id="EN-US_TOPIC_0000001707107473__b178470980">User Management</strong>.</span></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li988219171120"><span>In the role list, select a user and click <strong id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_b1622105115814">Modify</strong>. The page for modifying role details is displayed.</span></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li15775214135410"><span>Modify the role information, confirm the information, and click <strong id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_b733774216580">Next</strong>.</span><p><ul id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_ul11496351115417"><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li54969514547"><strong id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_b17467151717383">Role Name</strong>: A username must start with a letter and can contain letters, numbers, and underscores (_). The length cannot exceed 63 characters.</li><li id="EN-US_TOPIC_0000001707107473__li189835914307"><strong id="EN-US_TOPIC_0000001707107473__b2065095061116">Expires</strong>: Set the expiration time of the role permission.</li><li id="EN-US_TOPIC_0000001707107473__li1198155953013"><strong id="EN-US_TOPIC_0000001707107473__b11366552181111">System Administrator</strong>: Whether the role has the system administrator rights.</li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li44961651135410"><strong id="EN-US_TOPIC_0000001707107473__b954803218">Create Database</strong>: Whether the role has the permission to create databases.</li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li1049615514541"><strong id="EN-US_TOPIC_0000001707107473__b1930395584">Create Role</strong>: Whether the role has the permission to create users and roles.</li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li549615510547"><strong id="EN-US_TOPIC_0000001707107473__b622312142">Inherit Permissions</strong>: Whether a role inherits the permissions from its group. This function is enabled by default. You are advised to retain this setting.</li></ul>
</p></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li138827179212"><span>Add or remove permissions as required.</span><p><p id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_p1288218171214"><span><img id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_image87641156699" src="figure/en-us_image_0000001711660452.png" title="Click to enlarge" class="imgResize"></span></p>
</p></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li128839171222"><span>Confirm the permissions. Click lick <strong id="EN-US_TOPIC_0000001707107473__b6832195015252">Save</strong>.</span></li></ol>
</div>
<div class="section" id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_section39211459105512"><h4 class="sectiontitle">Deleting a Role</h4><ol id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_ol147794514105"><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li107720450106"><span>Log in to the GaussDB(DWS) console. In the navigation pane, choose <strong id="EN-US_TOPIC_0000001707107473__b141551455191118">Clusters</strong> &gt; <strong id="EN-US_TOPIC_0000001707107473__b41552055111116">Dedicated Clusters</strong>.</span></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li13777453102"><span>In the cluster list, click the name of the target cluster. The <span class="parmname" id="EN-US_TOPIC_0000001707107473__parmname428390312"><b>Cluster Information</b></span> page is displayed.</span></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li27714520104"><span>In the navigation pane, choose <strong id="EN-US_TOPIC_0000001707107473__b1529795354">User Management</strong>.</span></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li1277154514108"><span>Select a role from the role list and click <strong id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_b38745531311">Delete</strong>. A confirmation dialog box is displayed.</span></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li8773457107"><span>Click <strong id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_b12721779213">OK</strong> to delete the role.</span><p><div class="note" id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_note18960102835617"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_p18848185510562">If the role has dependencies, such as database objects, that have not been deleted, the role will fail to be deleted.</p>
<div class="section" id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_section39211459105512"><h4 class="sectiontitle">Deleting a Role</h4><ol id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_ol147794514105"><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li107720450106"><span>Log in to the GaussDB(DWS) console. In the navigation pane, choose <strong id="EN-US_TOPIC_0000001707107473__b141551455191118">Clusters</strong> &gt; <strong id="EN-US_TOPIC_0000001707107473__b41552055111116">Dedicated Clusters</strong>.</span></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li13777453102"><span>In the cluster list, click the name of the target cluster. The <span class="parmname" id="EN-US_TOPIC_0000001707107473__parmname1851119873"><b>Cluster Information</b></span> page is displayed.</span></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li27714520104"><span>In the navigation pane, choose <strong id="EN-US_TOPIC_0000001707107473__b134667881">User Management</strong>.</span></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li1277154514108"><span>Select a role from the role list and click <strong id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_b38745531311">Delete</strong>. A confirmation dialog box is displayed.</span></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li8773457107"><span>Click <strong id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_b12721779213">OK</strong> to delete the role.</span><p><div class="note" id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_note18960102835617"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_p18848185510562">If the role has dependencies, such as database objects, that have not been deleted, the role will fail to be deleted.</p>
</div></div>
</p></li></ol>
</div>

View File

@ -1,7 +1,7 @@
<a name="EN-US_TOPIC_0000001707293909"></a><a name="EN-US_TOPIC_0000001707293909"></a>
<h1 class="topictitle1">Managing Enterprise Projects</h1>
<div id="body8662426"><p id="EN-US_TOPIC_0000001707293909__en-us_topic_0000001372520146_p926823291318">An enterprise project is a cloud resource management mode. Enterprise Management provides users with comprehensive management in cloud-based resources, personnel, and permissions. Unlike common management consoles that feature independent control and configuration of cloud products, the Enterprise Management console is oriented to resource management. It helps enterprises with cloud-based management in resources, personnel, and permissions in the hierarchy of companies, departments, and projects.</p>
<div id="body8662426"><p id="EN-US_TOPIC_0000001707293909__en-us_topic_0000001372520146_p926823291318">An enterprise project is a cloud resource management mode. Enterprise Management provides users with comprehensive management in cloud-based resources, personnel, and permissions. The Enterprise Management console differs from typical management consoles as it focuses on resource management rather than independent control and configuration of cloud products. It assists enterprises in managing resources, personnel, and permissions within the hierarchy of companies, departments, and projects.</p>
<div class="section" id="EN-US_TOPIC_0000001707293909__en-us_topic_0000001372520146_section1323291617427"><h4 class="sectiontitle">Binding an Enterprise Project</h4><p id="EN-US_TOPIC_0000001707293909__en-us_topic_0000001372520146_p3876191732818">You can select an enterprise project during cluster creation to associate it with the cluster. For details, see <a href="dws_01_0019.html">Creating a Cluster</a>. The <span class="parmname" id="EN-US_TOPIC_0000001707293909__parmname14876191762813"><b>Enterprise Project</b></span> drop-down list displays the projects you created. In addition, the system has a built-in enterprise project (<span class="parmvalue" id="EN-US_TOPIC_0000001707293909__parmvalue84427473810"><b>default</b></span>). If you do not select an enterprise project for the cluster, the default project is used.</p>
<p id="EN-US_TOPIC_0000001707293909__en-us_topic_0000001372520146_p425792432815">During cluster creation, if the cluster is successfully bound to an enterprise project, the cluster will be successfully created. If the binding fails, the system sends an alarm and the cluster fails to be created.</p>
<p id="EN-US_TOPIC_0000001707293909__en-us_topic_0000001372520146_p646714145508">Snapshots of a cluster retain the association between the cluster and its enterprise project. When the cluster is restored, the association is also restored.</p>

View File

@ -7,7 +7,6 @@
</div>
</li><li id="EN-US_TOPIC_0000001658895178__en-us_topic_0000001422799441_li21675327154819">You have obtained the public network address, including the IP address and port number in the data warehouse cluster. For details, see <a href="dws_01_0033.html">Obtaining the Cluster Connection Address</a>.</li><li id="EN-US_TOPIC_0000001658895178__en-us_topic_0000001422799441_li324310331382">You have installed the third-party function library psycopg2. Download address: <a href="https://pypi.org/project/psycopg2/" target="_blank" rel="noopener noreferrer">https://pypi.org/project/psycopg2/</a>. For details about installation and deployment, see <a href="https://www.psycopg.org/install/" target="_blank" rel="noopener noreferrer">https://www.psycopg.org/install/</a>.<div class="note" id="EN-US_TOPIC_0000001658895178__en-us_topic_0000001422799441_note776310276369"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="EN-US_TOPIC_0000001658895178__en-us_topic_0000001422799441_ul1899113312362"><li id="EN-US_TOPIC_0000001658895178__en-us_topic_0000001422799441_li14249171043715">In CentOS and Red Hat OS, run the following <strong id="EN-US_TOPIC_0000001658895178__b1732615713915">yum</strong> command:<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001658895178__en-us_topic_0000001422799441_screen63001030133719"><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="n">yum</span><span class="w"> </span><span class="n">install</span><span class="w"> </span><span class="n">python</span><span class="o">-</span><span class="n">psycopg2</span>
</pre></div></td></tr></table></div>
</div>
</li><li id="EN-US_TOPIC_0000001658895178__en-us_topic_0000001422799441_li119001933173619">psycopg2 depends on the libpq dynamic library of PostgreSQL (32-bit or 64-bit version, whichever matches the psycopg2 bit version). In Linux, you can run the <strong id="EN-US_TOPIC_0000001658895178__b128091758105916">yum</strong> command and do not need to install the library. Before using psycopg2 in Windows, you need to install libpq in either of the following ways:<ul id="EN-US_TOPIC_0000001658895178__en-us_topic_0000001422799441_ul84531241123611"><li id="EN-US_TOPIC_0000001658895178__en-us_topic_0000001422799441_li4899133113611">Install PostgreSQL and configure the libpq, ssl, and crypto dynamic libraries in the environment variable <strong id="EN-US_TOPIC_0000001658895178__b16879151715116">PATH</strong>.</li><li id="EN-US_TOPIC_0000001658895178__en-us_topic_0000001422799441_li6900113315367">Install psqlodbc and use the libpq, ssl, and crypto dynamic libraries carried by the PostgreSQL ODBC driver.</li></ul>
</li></ul>
@ -766,7 +765,6 @@
<span class="w"> </span><span class="n">delete_data</span><span class="p">(</span><span class="n">conn</span><span class="p">)</span>
<span class="w"> </span><span class="n">conn</span><span class="p">.</span><span class="k">close</span><span class="p">()</span>
</pre></div></td></tr></table></div>
</div>
</p></li><li id="EN-US_TOPIC_0000001658895178__en-us_topic_0000001422799441_li588916576452"><span>Change the public network address, cluster port number, database name, database username, and database password in the <strong id="EN-US_TOPIC_0000001658895178__b155512201955">python_dws.py</strong> file based on the actual cluster information.</span><p><p id="EN-US_TOPIC_0000001658895178__en-us_topic_0000001422799441_p85251859476">The psycopg2 API does not provide the connection retry capability. You need to implement the retry processing in the service code.</p>
<div class="codecoloring" codetype="Python" id="EN-US_TOPIC_0000001658895178__en-us_topic_0000001422799441_screen564514258497"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
@ -779,7 +777,6 @@
<span class="n">user</span><span class="o">=</span><span class="s1">'dbadmin'</span><span class="p">,</span>
<span class="n">password</span><span class="o">=</span><span class="s1">'password'</span><span class="p">)</span> <span class="c1"># Database user password</span>
</pre></div></td></tr></table></div>
</div>
</p></li><li id="EN-US_TOPIC_0000001658895178__en-us_topic_0000001422799441_li14630228275"><span>Run the following command to connect to the cluster using the third-party function library psycopg:</span><p><pre class="screen" id="EN-US_TOPIC_0000001658895178__en-us_topic_0000001422799441_screen7708154816498">python python_dws.py</pre>
</p></li></ol>
@ -1002,7 +999,6 @@
<span class="n">delete_data</span><span class="p">(</span><span class="n">conn</span><span class="p">)</span>
<span class="n">conn</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
</pre></div></td></tr></table></div>
</div>
</p></li><li id="EN-US_TOPIC_0000001658895178__en-us_topic_0000001422799441_li16531113610418"><span>Change the public network address, cluster port number, database name, database username, and database password in the <strong id="EN-US_TOPIC_0000001658895178__b1788513164717">python_dws.py</strong> file based on the actual cluster information.</span><p><div class="codecoloring" codetype="Python" id="EN-US_TOPIC_0000001658895178__en-us_topic_0000001422799441_screen1556618184915"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span>
@ -1014,7 +1010,6 @@
<span class="n">user</span><span class="o">=</span><span class="s1">'dbadmin'</span><span class="p">,</span>
<span class="n">password</span><span class="o">=</span><span class="s1">'password'</span><span class="p">)</span> <span class="c1"># Database user password</span>
</pre></div></td></tr></table></div>
</div>
</p></li><li id="EN-US_TOPIC_0000001658895178__en-us_topic_0000001422799441_li13538193684120"><span>On the CLI, run the following command to use psycopg to connect to the cluster:</span><p><pre class="screen" id="EN-US_TOPIC_0000001658895178__en-us_topic_0000001422799441_screen462293513529">python python_dws.py</pre>
</p></li></ol>
@ -1022,7 +1017,6 @@
<div class="section" id="EN-US_TOPIC_0000001658895178__en-us_topic_0000001422799441_section9354311165719"><h4 class="sectiontitle">Why CN Retry Is Not Supported When psycopg2 Is Connected to a Cluster?</h4><p id="EN-US_TOPIC_0000001658895178__en-us_topic_0000001422799441_p1250531910422">With the CN retry feature, GaussDB(DWS) retries a statement that failed to be executed and identifies the failure type. However, in a session connected using psycopg2, a failed SQL statement will report an error and stop to be executed. In a primary/standby switchover, if a failed SQL statement is not retried, the following error will be reported. If the switchover is complete during an automatic retry, the correct result will be returned.</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001658895178__en-us_topic_0000001422799441_screen13655155814018"><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="n">psycopg2</span><span class="p">.</span><span class="n">errors</span><span class="p">.</span><span class="n">ConnectionFailure</span><span class="p">:</span><span class="w"> </span><span class="n">pooler</span><span class="p">:</span><span class="w"> </span><span class="n">failed</span><span class="w"> </span><span class="k">to</span><span class="w"> </span><span class="k">create</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="n">connections</span><span class="p">,</span><span class="w"> </span><span class="n">Error</span><span class="w"> </span><span class="n">Message</span><span class="p">:</span><span class="w"> </span><span class="n">remote</span><span class="w"> </span><span class="n">node</span><span class="w"> </span><span class="n">dn_6003_6004</span><span class="p">,</span><span class="w"> </span><span class="n">detail</span><span class="p">:</span><span class="w"> </span><span class="n">could</span><span class="w"> </span><span class="k">not</span><span class="w"> </span><span class="k">connect</span><span class="w"> </span><span class="k">to</span><span class="w"> </span><span class="n">server</span><span class="p">:</span><span class="w"> </span><span class="k">Operation</span><span class="w"> </span><span class="n">now</span><span class="w"> </span><span class="k">in</span><span class="w"> </span><span class="n">progress</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001658895178__en-us_topic_0000001422799441_p10437611105711"><strong id="EN-US_TOPIC_0000001658895178__b07861950191610">Error causes:</strong></p>
<ol id="EN-US_TOPIC_0000001658895178__en-us_topic_0000001422799441_ol2437141112577"><li id="EN-US_TOPIC_0000001658895178__en-us_topic_0000001422799441_li92361321171516">psycopg2 sends the <strong id="EN-US_TOPIC_0000001658895178__b1371713576167">BEGIN</strong> statement to start a transaction before sending an SQL statement.</li><li id="EN-US_TOPIC_0000001658895178__en-us_topic_0000001422799441_li1583913220161">CN retry does not support statements in transaction blocks.</li></ol>
@ -1035,7 +1029,6 @@
<span class="k">cursor</span><span class="p">.</span><span class="k">execute</span><span class="p">(</span><span class="ss">&quot;end; select * from test order by 1;&quot;</span><span class="p">)</span><span class="w"> </span>
<span class="k">rows</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">cursor</span><span class="p">.</span><span class="n">fetchall</span><span class="p">()</span>
</pre></div></td></tr></table></div>
</div>
</li><li id="EN-US_TOPIC_0000001658895178__en-us_topic_0000001422799441_li19379348101819">Start a transaction in an asynchronous connection. For details, visit the PyScopg official website at: <a href="https://www.psycopg.org/docs/advanced.html?highlight=async" target="_blank" rel="noopener noreferrer">https://www.psycopg.org/docs/advanced.html?highlight=async</a><div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001658895178__en-us_topic_0000001422799441_screen2437191112575"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span>
<span class="normal"> 2</span>
@ -1123,7 +1116,6 @@
<span class="k">if</span><span class="w"> </span><span class="n">__name__</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="s1">'__main__'</span><span class="p">:</span>
<span class="w"> </span><span class="n">psycopg2_cnretry_async</span><span class="p">()</span>
</pre></div></td></tr></table></div>
</div>
</li></ul>
</div>

View File

@ -5,7 +5,6 @@
<div class="section" id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_section12411851132117"><h4 class="sectiontitle">Procedure</h4><ol id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_ol263873216325"><li id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_li96361432183210"><span>Install and run the gsql client on the local Windows server (in Windows CLI). Windows Server 2008/Windows 7 and later are supported.</span></li><li id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_li14636203216326"><span>Download the Windows gsql client by referring to <a href="dws_01_0031.html">Downloading the Data Studio client</a> and decompress the package to a local folder.</span></li><li id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_li8776942203618"><span>On the local server, click <strong id="EN-US_TOPIC_0000001707293765__b207071518104519">Start</strong>, search for <strong id="EN-US_TOPIC_0000001707293765__b675362219457">cmd</strong>, and run the program as the administrator. Alternatively, press <strong id="EN-US_TOPIC_0000001707293765__b7834115984511">Win</strong>+<strong id="EN-US_TOPIC_0000001707293765__b1493670184617">R</strong> to open the Windows CLI.</span></li><li id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_li1663719321323"><span>Set environment variables. For a 32-bit OS, select the <strong id="EN-US_TOPIC_0000001707293765__b19638586537">x86</strong> folder. For a 64-bit OS, select the <strong id="EN-US_TOPIC_0000001707293765__b133851861533">x64</strong> folder.</span><p><p id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_p126363327323">Method 1: Configure environment variables in the Windows CLI. Open the command prompt and run the<strong id="EN-US_TOPIC_0000001707293765__b7243629185414"> set path=</strong><em id="EN-US_TOPIC_0000001707293765__i3246813175410">&lt;window_gsql&gt;</em><strong id="EN-US_TOPIC_0000001707293765__b8153123519547">;%path%</strong> command, where <em id="EN-US_TOPIC_0000001707293765__i68152385410">&lt;window_gsql&gt;</em> indicates the folder path where the Windows gsql client was decompressed to in the previous step. For example:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_screen1663693293210"><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">set</span><span class="w"> </span><span class="n">path</span><span class="o">=</span><span class="k">C</span><span class="p">:</span><span class="err">\</span><span class="n">Users</span><span class="err">\</span><span class="n">xx</span><span class="err">\</span><span class="n">Desktop</span><span class="err">\</span><span class="n">dws_8</span><span class="p">.</span><span class="mi">1</span><span class="p">.</span><span class="n">x_gsql_for_windows</span><span class="err">\</span><span class="n">x64</span><span class="p">;</span><span class="o">%</span><span class="n">path</span><span class="o">%</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_p1163616321323">Method 2: In the <strong id="EN-US_TOPIC_0000001707293765__b5839516105611">Control Panel</strong> window, search for <strong id="EN-US_TOPIC_0000001707293765__b712116718577">System</strong> and click <strong id="EN-US_TOPIC_0000001707293765__b760751935712">View advanced system settings</strong>. Click the <strong id="EN-US_TOPIC_0000001707293765__b14261141711588">Advanced</strong> tab, and click <strong id="EN-US_TOPIC_0000001707293765__b1741492635819">Environment Variables</strong>. Select the <strong id="EN-US_TOPIC_0000001707293765__b1354953485819">Path</strong> parameter and click <strong id="EN-US_TOPIC_0000001707293765__b8561135912">Edit</strong>. Add the gsql path in the parameter value. For example:</p>
<div class="fignone" id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_fig133013019481"><span class="figcap"><b>Figure 1 </b>Configuring Windows environment variables</span><br><span><img id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_image18309020480" src="figure/en-us_image_0000001711432800.png" title="Click to enlarge" class="imgResize"></span></div>
@ -13,19 +12,16 @@
</div></div>
</p></li><li id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_li1638203215325"><span>In the Windows CLI, run the following command to connect to the database in the GaussDB(DWS) cluster using the gsql client:</span><p><div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_screen5637113263219"><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="n">gsql</span><span class="w"> </span><span class="o">-</span><span class="n">d</span><span class="w"> </span><span class="o">&lt;</span><span class="n">Database_name</span><span class="o">&gt;</span><span class="w"> </span><span class="o">-</span><span class="n">h</span><span class="w"> </span><span class="o">&lt;</span><span class="n">Cluster_address</span><span class="o">&gt;</span><span class="w"> </span><span class="o">-</span><span class="n">U</span><span class="w"> </span><span class="o">&lt;</span><span class="n">Database_user</span><span class="o">&gt;</span><span class="w"> </span><span class="o">-</span><span class="n">p</span><span class="w"> </span><span class="o">&lt;</span><span class="n">Database_port</span><span class="o">&gt;</span><span class="w"> </span><span class="o">-</span><span class="n">W</span><span class="w"> </span><span class="o">&lt;</span><span class="n">Cluster_password</span><span class="o">&gt;</span><span class="w"> </span><span class="o">-</span><span class="n">r</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_p363712323324">The parameters are as follows:</p>
<ul id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_ul14638163273215"><li id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_li1563714328329"><span class="parmname" id="EN-US_TOPIC_0000001707293765__parmname10637103216328"><b>Database name</b></span>: Enter the name of the database to be connected. If you use the client to connect to the cluster for the first time, enter the default database <span class="parmvalue" id="EN-US_TOPIC_0000001707293765__parmvalue963793283219"><b><span id="EN-US_TOPIC_0000001707293765__text1863718322328">gaussdb</span></b></span>.</li><li id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_li10638163213323"><span class="parmname" id="EN-US_TOPIC_0000001707293765__parmname76371732143220"><b>Cluster address</b></span>: For details about how to obtain this address, see <a href="dws_01_0033.html">Obtaining the Cluster Connection Address</a>. If a public network address is used for connection, set this parameter to the public network domain name. If a private network address is used for connection, set this parameter to the private network domain name. </li><li id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_li76381032103211"><span class="parmname" id="EN-US_TOPIC_0000001707293765__parmname1638163212329"><b>Database user</b></span>: Enter the username of the cluster's database. If you use the client to connect to the cluster for the first time, set this parameter to the default administrator configured during cluster creation, for example, <span class="parmvalue" id="EN-US_TOPIC_0000001707293765__parmvalue13638032133212"><b>dbadmin</b></span>.</li><li id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_li1063811326328"><span class="parmname" id="EN-US_TOPIC_0000001707293765__parmname21883356410541"><b>Database port</b></span>: Enter the database port set during cluster creation.</li></ul>
<p id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_p263813223219">For example, run the following command to connect to the default database <strong id="EN-US_TOPIC_0000001707293765__b168126544410541"><span id="EN-US_TOPIC_0000001707293765__text1063853233212">gaussdb</span></strong> in the GaussDB(DWS) cluster:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_screen463813327321"><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="n">gsql</span><span class="w"> </span><span class="o">-</span><span class="n">d</span><span class="w"> </span><span class="n">gaussdb</span><span class="w"> </span><span class="o">-</span><span class="n">h</span><span class="w"> </span><span class="mi">10</span><span class="p">.</span><span class="mi">168</span><span class="p">.</span><span class="mi">0</span><span class="p">.</span><span class="mi">74</span><span class="w"> </span><span class="o">-</span><span class="n">U</span><span class="w"> </span><span class="n">dbadmin</span><span class="w"> </span><span class="o">-</span><span class="n">p</span><span class="w"> </span><span class="mi">8000</span><span class="w"> </span><span class="o">-</span><span class="n">W</span><span class="w"> </span><span class="n">password</span><span class="w"> </span><span class="o">-</span><span class="n">r</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_p1863816327325">If the following information is displayed, the connection succeeded:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_screen16638132123214"><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="n">gaussdb</span><span class="o">=&gt;</span>
</pre></div></td></tr></table></div>
</div>
</p></li></ol>
</div>
@ -44,7 +40,6 @@
<span class="w"> </span><span class="mi">1</span>
<span class="p">(</span><span class="mi">1</span><span class="w"> </span><span class="k">row</span><span class="p">)</span>
</pre></div></td></tr></table></div>
</div>
</li><li id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_li18980113105814">To use the <strong id="EN-US_TOPIC_0000001707293765__b20636143813175">\!</strong> metacommand to run a system command in Windows gsql, be sure to use the path separator required by the system command. Generally, the path separator is a backslash (\).<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_screen2639332143213"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span>
@ -54,13 +49,11 @@
<span class="n">gaussdb</span><span class="o">=&gt;</span><span class="w"> </span><span class="err">\</span><span class="o">!</span><span class="w"> </span><span class="k">type</span><span class="w"> </span><span class="n">D</span><span class="p">:</span><span class="err">\</span><span class="n">test</span><span class="p">.</span><span class="k">sql</span>
<span class="k">select</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">id</span><span class="p">;</span>
</pre></div></td></tr></table></div>
</div>
</li><li id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_li20981111325818">Windows gsql does not support the <strong id="EN-US_TOPIC_0000001707293765__b1779858191918">\parallel</strong> meta-command.<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_screen17639532113216"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">gaussdb</span><span class="o">=&gt;</span><span class="w"> </span><span class="err">\</span><span class="n">parallel</span>
<span class="n">ERROR</span><span class="p">:</span><span class="w"> </span><span class="ss">&quot;\parallel&quot;</span><span class="w"> </span><span class="k">is</span><span class="w"> </span><span class="k">not</span><span class="w"> </span><span class="n">supported</span><span class="w"> </span><span class="k">in</span><span class="w"> </span><span class="n">Windows</span><span class="p">.</span>
</pre></div></td></tr></table></div>
</div>
</li><li id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_li19981111375815">In Linux shell, single quotation marks ('') and double quotation marks ("") can be used to enclose strings. In Windows, only double quotation marks can be used.<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_screen2064083243219"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span>
@ -72,7 +65,6 @@
<span class="w"> </span><span class="mi">1</span>
<span class="p">(</span><span class="mi">1</span><span class="w"> </span><span class="k">row</span><span class="p">)</span>
</pre></div></td></tr></table></div>
</div>
<div class="p" id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_p44786471512">If single quotation marks are used, an error will be reported and the input will be ignored.<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_screen186401532173217"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span>
@ -86,27 +78,22 @@
<span class="n">ERROR</span><span class="p">:</span><span class="w"> </span><span class="n">unterminated</span><span class="w"> </span><span class="n">quoted</span><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="k">at</span><span class="w"> </span><span class="k">or</span><span class="w"> </span><span class="n">near</span><span class="w"> </span><span class="ss">&quot;'select&quot;</span>
<span class="n">LINE</span><span class="w"> </span><span class="mi">1</span><span class="p">:</span><span class="w"> </span><span class="err">'</span><span class="k">select</span>
</pre></div></td></tr></table></div>
</div>
</div>
</li><li id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_li1498161345812">If Windows gsql is idle for a long time after a connection is established, the connection session times out, and an SSL error is reported. In this case, you need to log in again. The following error is reported:<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_screen064012323322"><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="n">SSL</span><span class="w"> </span><span class="n">SYSCALL</span><span class="w"> </span><span class="n">error</span><span class="p">:</span><span class="w"> </span><span class="n">Software</span><span class="w"> </span><span class="n">caused</span><span class="w"> </span><span class="k">connection</span><span class="w"> </span><span class="k">abort</span><span class="w"> </span><span class="p">(</span><span class="mi">0</span><span class="n">x00002745</span><span class="o">/</span><span class="mi">10053</span><span class="p">),</span><span class="w"> </span><span class="n">remote</span><span class="w"> </span><span class="n">datanode</span><span class="w"> </span><span class="o">&lt;</span><span class="k">NULL</span><span class="o">&gt;</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="p">:</span><span class="w"> </span><span class="k">Result</span><span class="w"> </span><span class="n">too</span><span class="w"> </span><span class="k">large</span>
</pre></div></td></tr></table></div>
</div>
</li><li id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_li16982213135811">In Windows, press <strong id="EN-US_TOPIC_0000001707293765__b1659541711219">Ctrl</strong>+<strong id="EN-US_TOPIC_0000001707293765__b3155151902120">C</strong> to exit gsql. If <strong id="EN-US_TOPIC_0000001707293765__b21553369215">Ctrl</strong>+<strong id="EN-US_TOPIC_0000001707293765__b4646378216">C</strong> are pressed during input, the input will be ignored and you will be forced to exit gsql.<div class="p" id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_p19298721191017">Enter <strong id="EN-US_TOPIC_0000001707293765__b1786817170227">as</strong> and press <strong id="EN-US_TOPIC_0000001707293765__b2058892010222">Ctrl</strong>+<strong id="EN-US_TOPIC_0000001707293765__b19561921172218">C</strong>. After <strong id="EN-US_TOPIC_0000001707293765__b11638102412216">\q</strong> is displayed, exit gsql.<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_screen1664063214321"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">gaussdb</span><span class="o">=&gt;</span><span class="w"> </span><span class="k">select</span><span class="w"> </span><span class="mi">1</span>
<span class="n">gaussdb</span><span class="o">=&gt;</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="err">\</span><span class="n">q</span>
</pre></div></td></tr></table></div>
</div>
</div>
</li><li id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_li19821213205812">Windows gsql cannot connect to a database using the LATIN1 character encoding. The error information is as follows:<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_screen1364012325327"><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="n">gsql</span><span class="p">:</span><span class="w"> </span><span class="n">FATAL</span><span class="p">:</span><span class="w"> </span><span class="k">conversion</span><span class="w"> </span><span class="k">between</span><span class="w"> </span><span class="n">GBK</span><span class="w"> </span><span class="k">and</span><span class="w"> </span><span class="n">LATIN1</span><span class="w"> </span><span class="k">is</span><span class="w"> </span><span class="k">not</span><span class="w"> </span><span class="n">supported</span>
</pre></div></td></tr></table></div>
</div>
</li><li id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_li20325182501117">The location of the <strong id="EN-US_TOPIC_0000001707293765__b20894165492216">gsqlrc.conf</strong> file:<div class="p" id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_p143581726121113">The default <strong id="EN-US_TOPIC_0000001707293765__b20491155711235">gsqlrc</strong> path is <strong id="EN-US_TOPIC_0000001707293765__b299135018237">%APPDATA%/postgresql/gsqlrc.conf</strong>. You can also set the path using the <strong id="EN-US_TOPIC_0000001707293765__b7164145542312">PSQLRC</strong> variable.<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707293765__en-us_topic_0000001422799541_screen166409324327"><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">set</span><span class="w"> </span><span class="n">PSQLRC</span><span class="o">=</span><span class="k">C</span><span class="p">:</span><span class="err">\</span><span class="n">Users</span><span class="err">\</span><span class="n">xx</span><span class="err">\</span><span class="n">Desktop</span><span class="err">\</span><span class="n">dws_8</span><span class="p">.</span><span class="mi">1</span><span class="p">.</span><span class="n">x_gsql_for_windows</span><span class="err">\</span><span class="n">x64</span><span class="err">\</span><span class="n">gsqlrc</span><span class="p">.</span><span class="n">conf</span>
</pre></div></td></tr></table></div>
</div>
</div>
</li></ol>

View File

@ -105,7 +105,6 @@
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">conn</span><span class="p">;</span>
<span class="err">}</span>
</pre></div></td></tr></table></div>
</div>
</div>
</div>

View File

@ -48,7 +48,6 @@
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="k">connection</span><span class="p">;</span>
<span class="err">}</span>
</pre></div></td></tr></table></div>
</div>
</p></li></ol>
</div>
@ -95,7 +94,6 @@
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="k">connection</span><span class="p">;</span>
<span class="err">}</span>
</pre></div></td></tr></table></div>
</div>
</p></li></ol>
</div>

View File

@ -8,7 +8,6 @@
</li><li id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_li21675327154819">You have obtained the public network address, including the IP address and port number in the data warehouse cluster. For details, see <a href="dws_01_0033.html">Obtaining the Cluster Connection Address</a>.</li><li id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_li1063531922419">You have installed the third-party function library PyGreSQL.<p id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_p15638162832413"><a name="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_li1063531922419"></a><a name="en-us_topic_0000001372679778_li1063531922419"></a>Download address: <a href="http://www.pygresql.org/download/index.html" target="_blank" rel="noopener noreferrer">http://www.pygresql.org/download/index.html</a></p>
</li><li id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_li324310331382">For details about the installation and deployment operations, see <a href="http://www.pygresql.org/contents/install.html" target="_blank" rel="noopener noreferrer">http://www.pygresql.org/contents/install.html</a><div class="note" id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_note776310276369"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_ul1512511484239"><li id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_li912634815237">In CentOS and Red Hat OS, run the following <strong id="EN-US_TOPIC_0000001707254549__b1054421592216">yum</strong> command:<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_screen18567144015222"><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="n">yum</span><span class="w"> </span><span class="n">install</span><span class="w"> </span><span class="n">PyGreSQL</span>
</pre></div></td></tr></table></div>
</div>
</li><li id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_li161261148132311">PyGreSQL depends on the libpq dynamic library of PostgreSQL (32-bit or 64-bit version, whichever matches the PyGreSQL bit version). In Linux, you can run the <strong id="EN-US_TOPIC_0000001707254549__b6283192015229">yum</strong> command and do not need to install the library. Before using PyGreSQL in Windows, you need to install libpq in either of the following ways:<ul id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_ul196345832320"><li id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_li121251048182311">Install PostgreSQL and configure the libpq, ssl, and crypto dynamic libraries in the environment variable <strong id="EN-US_TOPIC_0000001707254549__b1080041211237">PATH</strong>.</li><li id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_li212634811234">Install <strong id="EN-US_TOPIC_0000001707254549__b37211424112212">psqlodbc</strong> and use the <strong id="EN-US_TOPIC_0000001707254549__b97262241222">libpq</strong>,<strong id="EN-US_TOPIC_0000001707254549__b572722411222"> ssl</strong>, and <strong id="EN-US_TOPIC_0000001707254549__b1272712242223">crypto </strong>dynamic libraries carried by the PostgreSQL ODBC driver.</li></ul>
</li></ul>
@ -903,7 +902,6 @@
</div>
<div class="section" id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_section1331571718565"><h4 class="sectiontitle">Using the Third-Party Function Library PyGreSQL to Connect to a Cluster (Linux)</h4><ol id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_ol84538175566"><li id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_li16453181785617"><span>Log in to the Linux environment as user <strong id="EN-US_TOPIC_0000001707254549__b1945319177562">root</strong>.</span></li><li id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_li134531517105615"><span>Run the following command to create the <strong id="EN-US_TOPIC_0000001707254549__b15161404551095">python_dws.py</strong> file:</span><p><div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_screen1453141714562"><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="n">vi</span><span class="w"> </span><span class="n">python_dws</span><span class="p">.</span><span class="n">py</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_p9453121735611">Copy and paste the following content to the <strong id="EN-US_TOPIC_0000001707254549__b20807506671095">python_dws.py</strong> file:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_screen945341711567"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span>
@ -1098,7 +1096,6 @@
<span class="w"> </span><span class="n">delete_data</span><span class="p">(</span><span class="n">conn</span><span class="p">)</span>
<span class="w"> </span><span class="n">conn</span><span class="p">.</span><span class="k">close</span><span class="p">()</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_p10455717195615">Alternatively, use the dbapi interface.</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_screen34551117185618"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span>
@ -1319,7 +1316,6 @@
<span class="w"> </span><span class="n">delete_data</span><span class="p">(</span><span class="n">conn</span><span class="p">)</span>
<span class="w"> </span><span class="n">conn</span><span class="p">.</span><span class="k">close</span><span class="p">()</span>
</pre></div></td></tr></table></div>
</div>
</p></li><li id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_li10457317175612"><span>Change the public network address, cluster port number, database name, database username, and database password in the <strong id="EN-US_TOPIC_0000001707254549__b17108331441095">python_dws.py</strong> file based on the actual cluster information.</span><p><div class="note" id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_note711295614298"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_p191121156142915">The PyGreSQL API does not provide the connection retry capability. You need to implement the retry processing in the service code.</p>
</div></div>
@ -1333,17 +1329,14 @@
<span class="w"> </span><span class="k">user</span><span class="o">=</span><span class="s1">'dbadmin'</span><span class="p">,</span>
<span class="w"> </span><span class="n">password</span><span class="o">=</span><span class="s1">'password'</span><span class="p">)</span><span class="w"> </span><span class="o">#</span><span class="w"> </span><span class="k">Database</span><span class="w"> </span><span class="k">user</span><span class="w"> </span><span class="n">password</span>
</pre></div></td></tr></table></div>
</div>
</p></li><li id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_li13457191711568"><span>Run the following command to connect to the cluster using the third-party function library PyGreSQL:</span><p><div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_screen0457111725614"><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="n">python</span><span class="w"> </span><span class="n">python_dws</span><span class="p">.</span><span class="n">py</span>
</pre></div></td></tr></table></div>
</div>
</p></li></ol>
</div>
<div class="section" id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_section17342517105618"><h4 class="sectiontitle">Using the Third-Party Function Library PyGreSQL to Connect to a Cluster (Windows)</h4><ol id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_ol7457161795611"><li id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_li1445761718565"><span>In the Windows operating system, click the <span class="uicontrol" id="EN-US_TOPIC_0000001707254549__uicontrol7126929441095"><b>Start</b></span> button, enter <strong id="EN-US_TOPIC_0000001707254549__b14126770151095">cmd</strong> in the search box, and click <strong id="EN-US_TOPIC_0000001707254549__b550145281095">cmd.exe</strong> in the result list to open the command-line interface (CLI).</span></li><li id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_li18457181745613"><span>In the CLI, run the following command to create the <strong id="EN-US_TOPIC_0000001707254549__b6958535811095">python_dws.py</strong> file:</span><p><div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_screen10457201705618"><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">type</span><span class="w"> </span><span class="n">nul</span><span class="o">&gt;</span><span class="w"> </span><span class="n">python_dws</span><span class="p">.</span><span class="n">py</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_p545771785617">Copy and paste the following content to the <strong id="EN-US_TOPIC_0000001707254549__b754496281095">python_dws.py</strong> file:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_screen1245721716561"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span>
@ -1538,7 +1531,6 @@
<span class="w"> </span><span class="n">delete_data</span><span class="p">(</span><span class="n">conn</span><span class="p">)</span>
<span class="w"> </span><span class="n">conn</span><span class="p">.</span><span class="k">close</span><span class="p">()</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_p846091745612">Alternatively, use the dbapi interface.</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_screen18460717155618"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span>
@ -1759,7 +1751,6 @@
<span class="w"> </span><span class="n">delete_data</span><span class="p">(</span><span class="n">conn</span><span class="p">)</span>
<span class="w"> </span><span class="n">conn</span><span class="p">.</span><span class="k">close</span><span class="p">()</span>
</pre></div></td></tr></table></div>
</div>
</p></li><li id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_li174622177566"><span>Change the public network address, cluster port number, database name, database username, and database password in the <strong id="EN-US_TOPIC_0000001707254549__b302894275">python_dws.py</strong> file based on the actual cluster information.</span><p><p id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_p1846210177564">The PyGreSQL API does not provide the connection retry capability. You need to implement the retry processing in the service code.</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_screen4462161713564"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
@ -1772,11 +1763,9 @@
<span class="w"> </span><span class="k">user</span><span class="o">=</span><span class="s1">'dbadmin'</span><span class="p">,</span>
<span class="w"> </span><span class="n">password</span><span class="o">=</span><span class="s1">'password'</span><span class="p">)</span><span class="w"> </span><span class="o">#</span><span class="w"> </span><span class="k">Database</span><span class="w"> </span><span class="k">user</span><span class="w"> </span><span class="n">password</span>
</pre></div></td></tr></table></div>
</div>
</p></li><li id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_li14462917175615"><span>Run the following command to connect to the cluster using the third-party function library PyGreSQL:</span><p><div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707254549__en-us_topic_0000001372679778_screen94623172567"><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="n">python</span><span class="w"> </span><span class="n">python_dws</span><span class="p">.</span><span class="n">py</span>
</pre></div></td></tr></table></div>
</div>
</p></li></ol>
</div>

View File

@ -9,12 +9,10 @@
</div>
<div class="section" id="EN-US_TOPIC_0000001707254701__en-us_topic_0000001422959325_en-us_topic_0000001405788485_en-us_topic_0000001233761719_s0aec83296dc54e8f92966415aaaa3a6f"><a name="EN-US_TOPIC_0000001707254701__en-us_topic_0000001422959325_en-us_topic_0000001405788485_en-us_topic_0000001233761719_s0aec83296dc54e8f92966415aaaa3a6f"></a><a name="en-us_topic_0000001422959325_en-us_topic_0000001405788485_en-us_topic_0000001233761719_s0aec83296dc54e8f92966415aaaa3a6f"></a><h4 class="sectiontitle">Using Functions to View Database Audit Logs</h4><ol id="EN-US_TOPIC_0000001707254701__en-us_topic_0000001422959325_en-us_topic_0000001405788485_en-us_topic_0000001233761719_o82d22dce978043d999c04461ae3f8728"><li id="EN-US_TOPIC_0000001707254701__en-us_topic_0000001422959325_en-us_topic_0000001405788485_en-us_topic_0000001233761719_li20571114104520"><span>Use the SQL client tool to connect to the database cluster. For details, see <a href="dws_01_0131.html">Cluster Connection</a>.</span></li><li id="EN-US_TOPIC_0000001707254701__en-us_topic_0000001422959325_en-us_topic_0000001405788485_en-us_topic_0000001233761719_l6adae163cc814200bfc18cc0dcd8fec4"><span>Use the <strong id="EN-US_TOPIC_0000001707254701__b10707545168">pg_query_audit</strong> function to query the audit logs of the current CN. The syntax is as follows:</span><p><div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707254701__en-us_topic_0000001422959325_en-us_topic_0000001405788485_en-us_topic_0000001233761719_sd1af1f6fd6774c95a7a711eaa1671bec"><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="n">pg_query_audit</span><span class="p">(</span><span class="n">timestamptz</span><span class="w"> </span><span class="n">startime</span><span class="p">,</span><span class="n">timestamptz</span><span class="w"> </span><span class="n">endtime</span><span class="p">,</span><span class="n">audit_log</span><span class="p">)</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001707254701__en-us_topic_0000001422959325_en-us_topic_0000001405788485_en-us_topic_0000001233761719_a8e6eccd82d654700879ad1db8ec167c4"><strong id="EN-US_TOPIC_0000001707254701__en-us_topic_0000001422959325_en-us_topic_0000001405788485_en-us_topic_0000001233761719_b84235270617645">startime</strong> and <strong id="EN-US_TOPIC_0000001707254701__en-us_topic_0000001422959325_en-us_topic_0000001405788485_en-us_topic_0000001233761719_b84235270617646">endtime</strong> indicate the start time and end time of the audit record, respectively. <strong id="EN-US_TOPIC_0000001707254701__en-us_topic_0000001422959325_en-us_topic_0000001405788485_en-us_topic_0000001233761719_b84235270617652">audit_log</strong> indicates the physical file path of the queried audit logs. If <strong id="EN-US_TOPIC_0000001707254701__en-us_topic_0000001422959325_en-us_topic_0000001405788485_en-us_topic_0000001233761719_b8566445751777">audit_log</strong> is not specified, the audit log information of the current instance is queried.</p>
<div class="p" id="EN-US_TOPIC_0000001707254701__en-us_topic_0000001422959325_en-us_topic_0000001405788485_p354313295118">For example, view the audit records of the current CN node in a specified period.<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707254701__en-us_topic_0000001422959325_en-us_topic_0000001405788485_en-us_topic_0000001233761719_scf68a9eb217a45038492330341759a41"><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">SELECT</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">pg_query_audit</span><span class="p">(</span><span class="s1">'2021-02-23 21:49:00'</span><span class="p">,</span><span class="s1">'2021-02-23 21:50:00'</span><span class="p">);</span>
</pre></div></td></tr></table></div>
</div>
</div>
<p id="EN-US_TOPIC_0000001707254701__en-us_topic_0000001422959325_en-us_topic_0000001405788485_en-us_topic_0000001233761719_aaa8116d1fbc547c5ba69a165219b77a0">The query result is as follows:</p>
@ -24,16 +22,13 @@
<span class="c1">---------------------------+---------------------------+----------------+------------+--------+------------+----------+-----------------+-------------+-----------------+------------------------------------------------------------------+-----------------+----------+--------------+------------------------------+------------+-------------</span>
<span class="w"> </span><span class="mi">2021</span><span class="o">-</span><span class="mi">02</span><span class="o">-</span><span class="mi">23</span><span class="w"> </span><span class="mi">21</span><span class="p">:</span><span class="mi">49</span><span class="p">:</span><span class="mi">57</span><span class="p">.</span><span class="mi">76</span><span class="o">+</span><span class="mi">08</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">2021</span><span class="o">-</span><span class="mi">02</span><span class="o">-</span><span class="mi">23</span><span class="w"> </span><span class="mi">21</span><span class="p">:</span><span class="mi">49</span><span class="p">:</span><span class="mi">57</span><span class="p">.</span><span class="mi">82</span><span class="o">+</span><span class="mi">08</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">login_logout</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">user_login</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">ok</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">dbadmin</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">gaussdb</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">gsql</span><span class="o">@</span><span class="p">[</span><span class="k">local</span><span class="p">]</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">gaussdb</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">login</span><span class="w"> </span><span class="n">db</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">login</span><span class="w"> </span><span class="n">db</span><span class="p">(</span><span class="n">gaussdb</span><span class="p">)</span><span class="w"> </span><span class="n">successfully</span><span class="p">,</span><span class="w"> </span><span class="n">the</span><span class="w"> </span><span class="k">current</span><span class="w"> </span><span class="k">user</span><span class="w"> </span><span class="k">is</span><span class="p">:</span><span class="w"> </span><span class="n">dbadmin</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">coordinator1</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">140324035360512</span><span class="p">.</span><span class="mi">667403397820909</span><span class="p">.</span><span class="n">coordinator1</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">27777</span><span class="w"> </span><span class="o">|</span><span class="w"> </span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001707254701__en-us_topic_0000001422959325_en-us_topic_0000001405788485_en-us_topic_0000001233761719_a232ef00f39734fe99288fcd95a05ae01">This record indicates that user <strong id="EN-US_TOPIC_0000001707254701__en-us_topic_0000001422959325_en-us_topic_0000001405788485_b4963343948">dbadmin</strong> logged in to the <strong id="EN-US_TOPIC_0000001707254701__en-us_topic_0000001422959325_en-us_topic_0000001405788485_b14363761517">gaussdb</strong> database at 2021-02-23 21:49:57.82 (GMT+08:00). After the host specified by <strong id="EN-US_TOPIC_0000001707254701__en-us_topic_0000001422959325_en-us_topic_0000001405788485_en-us_topic_0000001233761719_b19469184964610">log_hostname</strong> is started and a client is connected to its IP address, the host name found by reverse DNS resolution is displayed following the at sign (@) in the value of <strong id="EN-US_TOPIC_0000001707254701__en-us_topic_0000001422959325_en-us_topic_0000001405788485_en-us_topic_0000001233761719_b9470849124615">client_conninfo</strong>.</p>
</p></li><li id="EN-US_TOPIC_0000001707254701__en-us_topic_0000001422959325_en-us_topic_0000001405788485_en-us_topic_0000001233761719_li7414161812119"><span>Use the <strong id="EN-US_TOPIC_0000001707254701__b3406206181612">pgxc_query_audit</strong> function to query audit logs of all CNs. The syntax is as follows:</span><p><div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707254701__en-us_topic_0000001422959325_en-us_topic_0000001405788485_screen149032217586"><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="n">pgxc_query_audit</span><span class="p">(</span><span class="n">timestamptz</span><span class="w"> </span><span class="n">startime</span><span class="p">,</span><span class="n">timestamptz</span><span class="w"> </span><span class="n">endtime</span><span class="p">)</span>
</pre></div></td></tr></table></div>
</div>
<div class="p" id="EN-US_TOPIC_0000001707254701__en-us_topic_0000001422959325_en-us_topic_0000001405788485_p1296442015585">For example, view the audit records of all CN nodes in a specified period.<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707254701__en-us_topic_0000001422959325_en-us_topic_0000001405788485_en-us_topic_0000001233761719_screen4364147162217"><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">SELECT</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">pgxc_query_audit</span><span class="p">(</span><span class="s1">'2021-02-23 22:05:00'</span><span class="p">,</span><span class="s1">'2021-02-23 22:07:00'</span><span class="p">)</span><span class="w"> </span><span class="k">where</span><span class="w"> </span><span class="n">audit_type</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'user_login'</span><span class="w"> </span><span class="k">and</span><span class="w"> </span><span class="n">username</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'user1'</span><span class="p">;</span>
</pre></div></td></tr></table></div>
</div>
</div>
<p id="EN-US_TOPIC_0000001707254701__en-us_topic_0000001422959325_en-us_topic_0000001405788485_en-us_topic_0000001233761719_p1166434910266">The query result is as follows:</p>
@ -45,14 +40,12 @@
<span class="w"> </span><span class="mi">2021</span><span class="o">-</span><span class="mi">02</span><span class="o">-</span><span class="mi">23</span><span class="w"> </span><span class="mi">22</span><span class="p">:</span><span class="mi">06</span><span class="p">:</span><span class="mi">22</span><span class="p">.</span><span class="mi">219</span><span class="o">+</span><span class="mi">08</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">2021</span><span class="o">-</span><span class="mi">02</span><span class="o">-</span><span class="mi">23</span><span class="w"> </span><span class="mi">22</span><span class="p">:</span><span class="mi">06</span><span class="p">:</span><span class="mi">22</span><span class="p">.</span><span class="mi">271</span><span class="o">+</span><span class="mi">08</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">login_lgout</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">user_login</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">ok</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">user1</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">gaussdb</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">gsql</span><span class="o">@</span><span class="p">[</span><span class="k">local</span><span class="p">]</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">gaussdb</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">login</span><span class="w"> </span><span class="n">db</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">login</span><span class="w"> </span><span class="n">db</span><span class="p">(</span><span class="n">gaussdb</span><span class="p">)</span><span class="w"> </span><span class="n">successfully</span><span class="p">,</span><span class="w"> </span><span class="n">the</span><span class="w"> </span><span class="k">current</span><span class="w"> </span><span class="k">user</span><span class="w"> </span><span class="k">is</span><span class="p">:</span><span class="w"> </span><span class="n">user1</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">coordinator2</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">140689577342720</span><span class="p">.</span><span class="mi">667404382271356</span><span class="p">.</span><span class="n">coordinator</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">27782</span><span class="w"> </span><span class="o">|</span><span class="w"> </span>
<span class="w"> </span><span class="mi">2021</span><span class="o">-</span><span class="mi">02</span><span class="o">-</span><span class="mi">23</span><span class="w"> </span><span class="mi">22</span><span class="p">:</span><span class="mi">05</span><span class="p">:</span><span class="mi">51</span><span class="p">.</span><span class="mi">697</span><span class="o">+</span><span class="mi">08</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">2021</span><span class="o">-</span><span class="mi">02</span><span class="o">-</span><span class="mi">23</span><span class="w"> </span><span class="mi">22</span><span class="p">:</span><span class="mi">05</span><span class="p">:</span><span class="mi">51</span><span class="p">.</span><span class="mi">749</span><span class="o">+</span><span class="mi">08</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">login_lgout</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">user_login</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">ok</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">user1</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">gaussdb</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">gsql</span><span class="o">@</span><span class="p">[</span><span class="k">local</span><span class="p">]</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">gaussdb</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">login</span><span class="w"> </span><span class="n">db</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">login</span><span class="w"> </span><span class="n">db</span><span class="p">(</span><span class="n">gaussdb</span><span class="p">)</span><span class="w"> </span><span class="n">successfully</span><span class="p">,</span><span class="w"> </span><span class="n">the</span><span class="w"> </span><span class="k">current</span><span class="w"> </span><span class="k">user</span><span class="w"> </span><span class="k">is</span><span class="p">:</span><span class="w"> </span><span class="n">user1</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">coordinator1</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">140525048424192</span><span class="p">.</span><span class="mi">667404351749143</span><span class="p">.</span><span class="n">coordinator1</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">27777</span><span class="w"> </span><span class="o">|</span><span class="w"> </span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001707254701__en-us_topic_0000001422959325_en-us_topic_0000001405788485_en-us_topic_0000001233761719_p473845517294">The query result shows the successful login records of <strong id="EN-US_TOPIC_0000001707254701__en-us_topic_0000001422959325_en-us_topic_0000001405788485_en-us_topic_0000001233761719_b10117183012223">user1</strong> in to CN1 and CN2.</p>
</p></li><li id="EN-US_TOPIC_0000001707254701__en-us_topic_0000001422959325_li1392388431"><span>Query the audit records of multiple objects.</span><p><div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707254701__en-us_topic_0000001422959325_screen10474171118469"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">SET</span><span class="w"> </span><span class="n">audit_object_name_format</span><span class="w"> </span><span class="k">TO</span><span class="w"> </span><span class="s1">'all'</span><span class="p">;</span>
<span class="k">SELECT</span><span class="w"> </span><span class="n">object_name</span><span class="p">,</span><span class="k">result</span><span class="p">,</span><span class="n">operation_type</span><span class="p">,</span><span class="n">command_text</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">pgxc_query_audit</span><span class="p">(</span><span class="s1">'2022-08-26 8:00:00'</span><span class="p">,</span><span class="s1">'2022-08-26 22:55:00'</span><span class="p">)</span><span class="w"> </span><span class="k">where</span><span class="w"> </span><span class="n">command_text</span><span class="w"> </span><span class="k">like</span><span class="w"> </span><span class="s1">'%student%'</span><span class="p">;</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001707254701__en-us_topic_0000001422959325_p12417686434">The query result is as follows:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707254701__en-us_topic_0000001422959325_screen1241811819435"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
@ -71,7 +64,6 @@
<span class="w"> </span><span class="p">[</span><span class="ss">&quot;public.student_view01&quot;</span><span class="p">,</span><span class="ss">&quot;public.studentscore&quot;</span><span class="p">,</span><span class="ss">&quot;public.student&quot;</span><span class="p">]</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">ok</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">ddl</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="k">CREATE</span><span class="w"> </span><span class="k">OR</span><span class="w"> </span><span class="k">REPLACE</span><span class="w"> </span><span class="k">VIEW</span><span class="w"> </span><span class="n">student_view01</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="k">SELECT</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">student</span><span class="w"> </span><span class="n">t1</span><span class="w"> </span><span class="k">where</span><span class="w"> </span><span class="n">t1</span><span class="p">.</span><span class="n">stuNo</span><span class="w"> </span><span class="k">in</span><span class="w"> </span><span class="p">(</span><span class="k">select</span><span class="w"> </span><span class="n">stuNo</span><span class="w"> </span><span class="k">from</span><span class="w"> </span><span class="n">studentscore</span><span class="w"> </span><span class="n">t2</span><span class="w"> </span><span class="k">where</span><span class="w"> </span><span class="n">t1</span><span class="p">.</span><span class="n">stuNo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">t2</span><span class="p">.</span><span class="n">stuNo</span><span class="p">);</span>
<span class="w"> </span><span class="p">[</span><span class="ss">&quot;public.student_view01&quot;</span><span class="p">,</span><span class="ss">&quot;public.student&quot;</span><span class="p">,</span><span class="ss">&quot;public.studentscore&quot;</span><span class="p">]</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">ok</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">dml</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="k">SELECT</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">student_view01</span><span class="p">;</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001707254701__en-us_topic_0000001422959325_p641810824310">In the <strong id="EN-US_TOPIC_0000001707254701__b11383861620">object_name</strong> column, the table, view, and base table associated with the view are displayed.</p>
</p></li></ol>

View File

@ -137,7 +137,7 @@
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.7.2.1.1.1.2.5.1.2 "><p id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_p1458131142619">Time that has been spent in executing the job, in seconds.</p>
<p id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_p1761116313473">For example, if <strong id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_b165712920410639">Time required for execution</strong> is set to 100s, a job executed by a user in the resource pool will be terminated after being executed for more than 100 seconds.</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.7.2.1.1.1.2.5.1.3 "><p id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_p391183319384">An integer in the range 1 to 2,147,483,647. The value <strong id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_b1150303303">0</strong> indicates no limit.</p>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.7.2.1.1.1.2.5.1.3 "><p id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_p391183319384">An integer in the range 1 to 2,147,483,647. The value <strong id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_b1653027164">0</strong> indicates no limit.</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.7.2.1.1.1.2.5.1.4 "><p id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_p346112222205"><strong id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_b11461620105219">Terminated</strong>, <strong id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_b446172014523">Downgraded</strong>, or <strong id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_b346320155215">Not limited</strong></p>
</td>
@ -146,7 +146,7 @@
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.7.2.1.1.1.2.5.1.2 "><p id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_p19611143119478">Total CPU time spent in executing a job on all DNs, in seconds.</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.7.2.1.1.1.2.5.1.3 "><p id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_p1440253133915">An integer in the range 1 to 2,147,483,647. The value <strong id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_b400215551">0</strong> indicates no limit.</p>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.7.2.1.1.1.2.5.1.3 "><p id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_p1440253133915">An integer in the range 1 to 2,147,483,647. The value <strong id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_b2058038659">0</strong> indicates no limit.</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.7.2.1.1.1.2.5.1.4 "><p id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_p10618132442017"><strong id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_b126181522155213">Terminated</strong>, <strong id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_b136193225526">Downgraded</strong>, or <strong id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_b1619172275217">Not limited</strong></p>
</td>
@ -155,7 +155,7 @@
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.7.2.1.1.1.2.5.1.2 "><p id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_p156112315474">Interval for checking the CPU skew, in seconds. This parameter must be set together with <strong id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_b25202847010639">Total CPU Time on All DNs</strong>.</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.7.2.1.1.1.2.5.1.3 "><p id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_p1092815814711">An integer in the range 1 to 2,147,483,647. The value <strong id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_b2108416110">0</strong> indicates no limit.</p>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.7.2.1.1.1.2.5.1.3 "><p id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_p1092815814711">An integer in the range 1 to 2,147,483,647. The value <strong id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_b1105556660">0</strong> indicates no limit.</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.7.2.1.1.1.2.5.1.4 "><p id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_p17192849102014"><strong id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_b25741424165218">Terminated</strong>, <strong id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_b557442412524">Downgraded</strong>, or <strong id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_b195741224135213">Not limited</strong></p>
</td>
@ -175,7 +175,7 @@
<div class="note" id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_note1661461965019"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_p1161415192504">This rule is supported only by clusters of version 8.2.0 or later.</p>
</div></div>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.7.2.1.1.1.2.5.1.3 "><p id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_p82816819456">An integer in the range 1 to 2,147,483,647. The value <strong id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_b2081529433">0</strong> indicates no limit.</p>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.7.2.1.1.1.2.5.1.3 "><p id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_p82816819456">An integer in the range 1 to 2,147,483,647. The value <strong id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_b1555714474">0</strong> indicates no limit.</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.7.2.1.1.1.2.5.1.4 "><p id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_p1828117884512"><strong id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_b174817282526">Terminated</strong>, <strong id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_b9484282526">Downgraded</strong>, or <strong id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_b7483284529">Not limited</strong></p>
</td>
@ -197,7 +197,7 @@
<div class="note" id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_note63366112716"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_p143314682717">This rule is supported only by clusters of version 8.2.1 or later.</p>
</div></div>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.7.2.1.1.1.2.5.1.3 "><p id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_p144899293280">An integer in the range 1 to 2,147,483,647. The value <strong id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_b102618216">0</strong> indicates no limit.</p>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.7.2.1.1.1.2.5.1.3 "><p id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_p144899293280">An integer in the range 1 to 2,147,483,647. The value <strong id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_b313128799">0</strong> indicates no limit.</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.7.2.1.1.1.2.5.1.4 "><p id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_p067124044616"><strong id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_b134151548125220">Terminated</strong>, <strong id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_b441512483525">Downgraded</strong>, or <strong id="EN-US_TOPIC_0000001659054662__en-us_topic_0000001372679822_b1541634816522">Not limited</strong></p>
</td>

View File

@ -2,12 +2,11 @@
<h1 class="topictitle1">Scaling In a Cluster</h1>
<div id="body8662426"><p id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_p8290718113316">You can scale in your clusters on the console to release unnecessary computing and storage resources provided by GaussDB(DWS).</p>
<div class="section" id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_section13554122617360"><h4 class="sectiontitle">Impact on the System</h4><ul id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_ul2259114513617"><li id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_li1178249327">Before the scale-in, exit the client connections that have created temporary tables, because temporary tables created before or during the scale-in will become invalid and operations performed on these temporary tables will fail. Temporary tables created after the scale-in will not be affected.</li><li id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_li34569524214">If you start a scale-in, an automatic snapshot will be created for the cluster before scale-in. If you do not need the snapshot, you can disable the automated backup function on the scale-in page.</li><li id="EN-US_TOPIC_0000001707293857__li1477733613566">Before scale-in, ensure that the skew rate does not exceed 10%. There is no general requirement for the dirty page rate. However, for a large table whose size is greater than 50 GB, ensure that the dirty page rate does not exceed 20% to 30%.</li><li id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_li1675651513517">In a cluster that is being scaled in, the following functions are disabled: cluster restart, cluster scale-out, snapshot creation, node management, intelligent O&amp;M, resource management, parameter modification, security configurations, log service, database administrator password resetting, and cluster deletion.</li><li id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_li12497635141010">During offline scale-in, stop all services or run only a few query statements. During table redistribution, a shared lock is added to tables. All insert, update, and delete operations as well as DDL operations on the tables are blocked for a long time, which may cause a lock wait timeout. After a table is redistributed, you can access the table. During redistribution, avoid querying data for more than 20 minutes. The default time for applying a write lock during redistribution is 20 minutes. Exceeding this duration may lead to redistribution failure due to lock waiting timeout.</li><li id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_li181411635132515">During online scale-in, you can perform insert, update, and delete operations on tables, but data updates may still be blocked for a short period of time. Redistribution consumes lots of CPU and I/O resources, which will greatly impact job performance. Therefore, perform redistribution when services are stopped or during periods of light load.</li><li id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_li326352583017">During offline scale-in, if a node is deleted while DDL statements are executed (to create a schema or function), these statements may report errors, because the DN cannot be found. In this case, you simply need to retry the statements.</li><li id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_li0260104513362">If a cluster scale-in fails, the database does not automatically roll back the scale-in operation, and no O&amp;M operations can be performed. In this case, you need to click the <strong id="EN-US_TOPIC_0000001707293857__b2090972995812">Scale In</strong> on the console to try again.</li></ul>
<div class="section" id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_section13554122617360"><h4 class="sectiontitle">Impact on the System</h4><ul id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_ul2259114513617"><li id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_li1178249327">Before the scale-in, exit the client connections that have created temporary tables, because temporary tables created before or during the scale-in will become invalid and operations performed on these temporary tables will fail. Temporary tables created after the scale-in will not be affected.</li><li id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_li34569524214">If you start a scale-in, an automatic snapshot will be created for the cluster before scale-in. If you do not need the snapshot, you can disable the automated backup function on the scale-in page.</li><li id="EN-US_TOPIC_0000001707293857__li1477733613566">Before scale-in, ensure that the skew rate does not exceed 10%. There is no general requirement for the dirty page rate. However, for a large table whose size is greater than 50 GB, ensure that the dirty page rate does not exceed 20% to 30%.</li><li id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_li1675651513517">In a cluster that is being scaled in, the following functions are disabled: cluster restart, cluster scale-out, snapshot creation, node management, intelligent O&amp;M, resource management, parameter modification, security configurations, log service, database administrator password resetting, and cluster deletion.</li><li id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_li12497635141010">During offline scale-in, stop all services or run only a few query statements. During table redistribution, a shared lock is added to tables. All insert, update, and delete operations as well as DDL operations on the tables are blocked for a long time, which may cause a lock wait timeout. After a table is redistributed, you can access the table. During redistribution, avoid querying data for more than 20 minutes. The default time for applying a write lock during redistribution is 20 minutes. Exceeding this duration may lead to redistribution failure due to lock waiting timeout.</li><li id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_li181411635132515">During online scale-in, you can perform insert, update, and delete operations on tables, but data updates may still be blocked for a short period of time. Redistribution consumes lots of CPU and I/O resources, which will greatly impact job performance. Therefore, perform redistribution when services are stopped or during periods of light load.</li><li id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_li326352583017">During online scale-in, if a node is deleted while DDL statements are executed (to create a schema or function), these statements may report errors, because the DN cannot be found. In this case, you simply need to retry the statements.</li><li id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_li0260104513362">If a cluster scale-in fails, the database does not automatically roll back the scale-in operation, and no O&amp;M operations can be performed. In this case, you need to click the <strong id="EN-US_TOPIC_0000001707293857__b2090972995812">Scale In</strong> on the console to try again.</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_section2621350104513"><h4 class="sectiontitle">Prerequisites</h4><ul id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_ul1561515357474"><li id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_li116153352476">The cluster is in <strong id="EN-US_TOPIC_0000001707293857__b6617455239159">Available</strong> state, is not read-only, and there is no data being redistributed in the cluster.</li><li id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_li146161635204718">A cluster configuration file has been generated, and configuration information is consistent with the current cluster configuration.</li><li id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_li7616133512479">Before the scale-in operation starts, the value of <strong id="EN-US_TOPIC_0000001707293857__b372853939159">default_storage_nodegroup</strong> is <strong id="EN-US_TOPIC_0000001707293857__b7693823079159">installation</strong>.</li><li id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_li561623594713">The cluster is configured in the ring mode. A ring is the smallest unit for scale-in. Four or five hosts form a ring. The primary, standby, and secondary DNs are deployed in this ring. </li><li id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_li361616354471">The scale-in host does not contain the GTM, ETCD, or CM Server component.</li><li id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_li561623510473">There are no CNs on the nodes to be scaled in.</li><li id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_li5616173524714">Scale-in does not support rollback but supports retry. A data redistribution failure after a scale-in does not affect services. You can complete scale-in at other appropriate time. Otherwise, unbalanced data distribution will persist for a long time.</li><li id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_li161723584718">Before redistribution, ensure that the <strong id="EN-US_TOPIC_0000001707293857__b8642813159159">data_redis</strong> schema in the corresponding database is reserved for redistribution and that no user operation on it or its tables is allowed. During redistribution, <strong id="EN-US_TOPIC_0000001707293857__b1770761482718">data_redis</strong> is used. After the operation is complete, the schema will be deleted. User tables (if any) in the schema will also be deleted.</li><li id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_li176172353478"><strong id="EN-US_TOPIC_0000001707293857__b5981681089159">gs_cgroup</strong> cannot be used during scale-in.</li><li id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_li1861743511471">Before the scale-in, check the remaining capacity of the cluster. The nodes remaining in a scale-in must have sufficient space to store the data of the entire cluster. Otherwise, the scale-in cannot be properly performed.<ul id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_ul537415376614"><li id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_li183748371963">The used physical disk space on each node is less than 80%.</li><li id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_li63741537765">All the users and roles use less than 80% of resource quota in total.</li><li id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_li9374113718615">The estimated space usage after scale-in must be less than 80%.</li><li id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_li27508231757">The available space is 1.5 times larger than the maximum size of a single table.<div class="note" id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_note774013231350"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_p174421961967">To check the maximum size of a single table, use the following inspection tool:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707293857__en-us_topic_0000001372679742_screen643554615517"><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="n">gs_check</span><span class="w"> </span><span class="o">-</span><span class="n">i</span><span class="w"> </span><span class="n">CheckBiggestTable</span><span class="w"> </span><span class="o">-</span><span class="n">L</span>
</pre></div></td></tr></table></div>
</div>
</div></div>
</li></ul>

View File

@ -1,7 +1,7 @@
<a name="EN-US_TOPIC_0000001707293881"></a><a name="EN-US_TOPIC_0000001707293881"></a>
<h1 class="topictitle1">Constraints on Restoring a Snapshot</h1>
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000001707293881__en-us_topic_0000001582882052_en-us_topic_0000001632371505_section1611643121018"><h4 class="sectiontitle">Cluster-Level Snapshot Restoration</h4><div class="p" id="EN-US_TOPIC_0000001707293881__en-us_topic_0000001582882052_en-us_topic_0000001632371505_p3609441496">Cluster-level restoration consists of two steps:<ol id="EN-US_TOPIC_0000001707293881__en-us_topic_0000001582882052_en-us_topic_0000001632371505_ol2913144312111"><li id="EN-US_TOPIC_0000001707293881__en-us_topic_0000001582882052_en-us_topic_0000001632371505_li19913204331114">Data restoration: Restores data in the backup set to the data directory of each primary DN/CN instance in parallel.</li><li id="EN-US_TOPIC_0000001707293881__en-us_topic_0000001582882052_en-us_topic_0000001632371505_li4913194311113">Rebuilding the standby DN: After the primary DN is restored, standby DNs are rebuilt with full data in parallel.</li></ol>
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000001707293881__en-us_topic_0000001582882052_en-us_topic_0000001632371505_section1611643121018"><h4 class="sectiontitle">Cluster-Level Snapshot Restoration</h4><div class="p" id="EN-US_TOPIC_0000001707293881__en-us_topic_0000001582882052_en-us_topic_0000001632371505_p3609441496">Cluster-level restoration consists of two steps:<ol id="EN-US_TOPIC_0000001707293881__en-us_topic_0000001582882052_en-us_topic_0000001632371505_ol2913144312111"><li id="EN-US_TOPIC_0000001707293881__en-us_topic_0000001582882052_en-us_topic_0000001632371505_li19913204331114">Data restoration: The backup tool simultaneously restores data from the backup set to the data directory of each instance, including the primary CN and primary DN.</li><li id="EN-US_TOPIC_0000001707293881__en-us_topic_0000001582882052_en-us_topic_0000001632371505_li4913194311113">Rebuilding the standby DN: After the primary DN is restored, standby DNs are rebuilt with full data in parallel.</li></ol>
<div class="note" id="EN-US_TOPIC_0000001707293881__en-us_topic_0000001582882052_en-us_topic_0000001632371505_note6393243122"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="EN-US_TOPIC_0000001707293881__en-us_topic_0000001582882052_en-us_topic_0000001632371505_ul16286219962"><li id="EN-US_TOPIC_0000001707293881__en-us_topic_0000001582882052_en-us_topic_0000001632371505_li1287719267">The restoration process takes 1.5 to 2 times longer than the backup process.</li><li id="EN-US_TOPIC_0000001707293881__en-us_topic_0000001582882052_en-us_topic_0000001632371505_li15287121920618">The parameters after cluster-level restoration are the same as those before backup. When restoring data to a new cluster, ensure that the flavor of the new cluster is the same as that of the original cluster. If the flavor of the new cluster is smaller, the restoration may fail.</li></ul>
</div></div>
</div>

View File

@ -6,7 +6,7 @@
</div></div>
</p></li></ol>
</div>
<div class="section" id="EN-US_TOPIC_0000001707293897__en-us_topic_0000001372679814_section12256103112263"><a name="EN-US_TOPIC_0000001707293897__en-us_topic_0000001372679814_section12256103112263"></a><a name="en-us_topic_0000001372679814_section12256103112263"></a><h4 class="sectiontitle">Adding an O&amp;M Plan</h4><ol id="EN-US_TOPIC_0000001707293897__en-us_topic_0000001372679814_ol19166103823513"><li id="EN-US_TOPIC_0000001707293897__en-us_topic_0000001372679814_li1587805215516"><span>Log in to the GaussDB(DWS) management console.</span></li><li id="EN-US_TOPIC_0000001707293897__en-us_topic_0000001372679814_li1844917585512"><span>Click the name of the target cluster.</span></li><li id="EN-US_TOPIC_0000001707293897__en-us_topic_0000001372679814_li7966142755913"><span>In the navigation pane, choose <strong id="EN-US_TOPIC_0000001707293897__b615224466">Intelligent O&amp;M</strong>.</span></li><li id="EN-US_TOPIC_0000001707293897__en-us_topic_0000001372679814_li997612463355"><span>Click the <strong id="EN-US_TOPIC_0000001707293897__b33491886451048">O&amp;M Plan</strong> tab. Click <strong id="EN-US_TOPIC_0000001707293897__b166767616551048">Add O&amp;M Task</strong>.</span><p><p id="EN-US_TOPIC_0000001707293897__en-us_topic_0000001372679814_p0606232174419"><span><img id="EN-US_TOPIC_0000001707293897__en-us_topic_0000001372679814_image1170384894211" src="figure/en-us_image_0000001711599432.png" title="Click to enlarge" class="imgResize"></span></p>
<div class="section" id="EN-US_TOPIC_0000001707293897__en-us_topic_0000001372679814_section12256103112263"><a name="EN-US_TOPIC_0000001707293897__en-us_topic_0000001372679814_section12256103112263"></a><a name="en-us_topic_0000001372679814_section12256103112263"></a><h4 class="sectiontitle">Adding an O&amp;M Plan</h4><ol id="EN-US_TOPIC_0000001707293897__en-us_topic_0000001372679814_ol19166103823513"><li id="EN-US_TOPIC_0000001707293897__en-us_topic_0000001372679814_li1587805215516"><span>Log in to the GaussDB(DWS) management console.</span></li><li id="EN-US_TOPIC_0000001707293897__en-us_topic_0000001372679814_li1844917585512"><span>Click the name of the target cluster.</span></li><li id="EN-US_TOPIC_0000001707293897__en-us_topic_0000001372679814_li7966142755913"><span>In the navigation pane, choose <strong id="EN-US_TOPIC_0000001707293897__b87619841">Intelligent O&amp;M</strong>.</span></li><li id="EN-US_TOPIC_0000001707293897__en-us_topic_0000001372679814_li997612463355"><span>Click the <strong id="EN-US_TOPIC_0000001707293897__b33491886451048">O&amp;M Plan</strong> tab. Click <strong id="EN-US_TOPIC_0000001707293897__b166767616551048">Add O&amp;M Task</strong>.</span><p><p id="EN-US_TOPIC_0000001707293897__en-us_topic_0000001372679814_p0606232174419"><span><img id="EN-US_TOPIC_0000001707293897__en-us_topic_0000001372679814_image1170384894211" src="figure/en-us_image_0000001711599432.png" title="Click to enlarge" class="imgResize"></span></p>
</p></li><li id="EN-US_TOPIC_0000001707293897__li1781112185341"><span>In the displayed <strong id="EN-US_TOPIC_0000001707293897__b137367775875812">Add O&amp;M Task</strong> dialog box, configure basic information about the O&amp;M task.</span><p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001707293897__table9698153719578" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Basic configuration items of an O&amp;M task</caption><thead align="left"><tr id="EN-US_TOPIC_0000001707293897__row10699173710573"><th align="left" class="cellrowborder" valign="top" width="16.951695169516952%" id="mcps1.3.2.2.5.2.1.2.4.1.1"><p id="EN-US_TOPIC_0000001707293897__p8699103745719">Configuration Item</p>
</th>
@ -69,7 +69,7 @@
<tr id="EN-US_TOPIC_0000001707293897__row528061416298"><td class="cellrowborder" valign="top" width="16.951695169516952%" headers="mcps1.3.2.2.5.2.1.2.4.1.1 "><p id="EN-US_TOPIC_0000001707293897__p16607752318">Advanced Settings</p>
</td>
<td class="cellrowborder" valign="top" width="49.66496649664967%" headers="mcps1.3.2.2.5.2.1.2.4.1.2 "><p id="EN-US_TOPIC_0000001707293897__p12601973236">Automatic Vacuum is triggered based on either the default or customized conditions. These conditions include the bloat rate and the reclaimable space of the target table. When either of these conditions is met, the Automatic Vacuum process is initiated.</p>
<ul id="EN-US_TOPIC_0000001707293897__ul443192112518"><li id="EN-US_TOPIC_0000001707293897__li943214292514"><strong id="EN-US_TOPIC_0000001707293897__b124284654010">Default</strong>: The default bloat rate that triggers Vacuum is 80%, and the default reclaimable space of is 100 GB.</li><li id="EN-US_TOPIC_0000001707293897__li628917715322"><strong id="EN-US_TOPIC_0000001707293897__b2260191424016">Custom</strong>: You can set the conditions for triggering automatic Vacuum based on the site requirements.<div class="note" id="EN-US_TOPIC_0000001707293897__note9551141043116"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="EN-US_TOPIC_0000001707293897__p33688711275">VACUUM bloat rate: After frequent UPDATE and DELETE operations are performed in a database, the deleted or updated rows are logically deleted from the database, but actually still exist in tables. Before VACUUM is complete, such data is still stored in disks, causing table bloat. If the bloat rate reaches the percentage threshold set in an O&amp;M task, VACUUM will be automatically triggered.</p>
<ul id="EN-US_TOPIC_0000001707293897__ul443192112518"><li id="EN-US_TOPIC_0000001707293897__li943214292514"><strong id="EN-US_TOPIC_0000001707293897__b124284654010">Default</strong>: The default bloat rate that triggers Vacuum is 80%, and the default reclaimable space of the target table is 100 GB.</li><li id="EN-US_TOPIC_0000001707293897__li628917715322"><strong id="EN-US_TOPIC_0000001707293897__b2260191424016">Custom</strong>: You can set the conditions for triggering automatic Vacuum based on the site requirements.<div class="note" id="EN-US_TOPIC_0000001707293897__note9551141043116"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="EN-US_TOPIC_0000001707293897__p33688711275">VACUUM bloat rate: After frequent UPDATE and DELETE operations are performed in a database, the deleted or updated rows are logically deleted from the database, but actually still exist in tables. Before VACUUM is complete, such data is still stored in disks, causing table bloat. If the bloat rate reaches the percentage threshold set in an O&amp;M task, VACUUM will be automatically triggered.</p>
</div></div>
</li></ul>
</td>

View File

@ -11,7 +11,7 @@
<div class="section" id="EN-US_TOPIC_0000001707293917__en-us_topic_0000001423119293_en-us_topic_0000001083058054_section941730165216"><a name="EN-US_TOPIC_0000001707293917__en-us_topic_0000001423119293_en-us_topic_0000001083058054_section941730165216"></a><a name="en-us_topic_0000001423119293_en-us_topic_0000001083058054_section941730165216"></a><h4 class="sectiontitle">Adding CNs</h4><ol id="EN-US_TOPIC_0000001707293917__en-us_topic_0000001423119293_en-us_topic_0000001083058054_o4d27c72c9c5b483283c532fd703af879"><li id="EN-US_TOPIC_0000001707293917__en-us_topic_0000001423119293_en-us_topic_0000001083058054_l3bf4b8bc45d343b6aec0b48be7dfc1aa"><span>Log in to the GaussDB(DWS) management console.</span></li><li id="EN-US_TOPIC_0000001707293917__en-us_topic_0000001423119293_en-us_topic_0000001083058054_li11952509114244"><span>On the <strong id="EN-US_TOPIC_0000001707293917__b177095537421">Clusters</strong> &gt; <strong id="EN-US_TOPIC_0000001707293917__b27091553124214">Dedicated Clusters</strong> page, locate the cluster to which you want to add CNs.</span></li><li id="EN-US_TOPIC_0000001707293917__en-us_topic_0000001423119293_en-us_topic_0000001083058054_li111926412577"><span>In the <strong id="EN-US_TOPIC_0000001707293917__en-us_topic_0000001083058054_b63551737155618">Operation </strong>column of the specified cluster, choose <strong id="EN-US_TOPIC_0000001707293917__en-us_topic_0000001083058054_b107741026155612">More</strong> &gt; <strong id="EN-US_TOPIC_0000001707293917__en-us_topic_0000001083058054_b106386293560">Manage CN</strong> &gt; <strong id="EN-US_TOPIC_0000001707293917__en-us_topic_0000001083058054_b17620153135610">Add CN Node</strong>.</span><p><p id="EN-US_TOPIC_0000001707293917__en-us_topic_0000001423119293_en-us_topic_0000001083058054_p1465262712571"><span><img id="EN-US_TOPIC_0000001707293917__en-us_topic_0000001423119293_en-us_topic_0000001083058054_image06514274571" src="figure/en-us_image_0000001711599848.png" title="Click to enlarge" class="imgResize"></span></p>
</p></li><li id="EN-US_TOPIC_0000001707293917__en-us_topic_0000001423119293_en-us_topic_0000001083058054_li197211073417"><span>In the displayed dialog box, determine whether to add CNs to a specified node. If you select <strong id="EN-US_TOPIC_0000001707293917__b1665282415315">No</strong>, set the number of CNs after adjustment and click <strong id="EN-US_TOPIC_0000001707293917__b7460173615538">OK</strong>. If you select <strong id="EN-US_TOPIC_0000001707293917__b12668144275314">Yes</strong>, select a node and click <strong id="EN-US_TOPIC_0000001707293917__b962212532535">OK</strong>.</span><p><p id="EN-US_TOPIC_0000001707293917__en-us_topic_0000001423119293_p15750131817102"><span><img id="EN-US_TOPIC_0000001707293917__en-us_topic_0000001423119293_image1070715435301" src="figure/en-us_image_0000001759519269.png" title="Click to enlarge" class="imgResize"></span></p>
<p id="EN-US_TOPIC_0000001707293917__en-us_topic_0000001423119293_en-us_topic_0000001083058054_p1313130207"><span><img id="EN-US_TOPIC_0000001707293917__en-us_topic_0000001423119293_image161591824133111" src="figure/en-us_image_0000001759359401.png" title="Click to enlarge" class="imgResize"></span></p>
<div class="notice" id="EN-US_TOPIC_0000001707293917__en-us_topic_0000001423119293_en-us_topic_0000001083058054_note1566711158019"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><ul id="EN-US_TOPIC_0000001707293917__en-us_topic_0000001423119293_en-us_topic_0000001083058054_ul1914809151015"><li id="EN-US_TOPIC_0000001707293917__en-us_topic_0000001423119293_en-us_topic_0000001083058054_li15148390108">Before adding a CN, ensure that the cluster is in the <strong id="EN-US_TOPIC_0000001707293917__en-us_topic_0000001083058054_b2778259113614">Available</strong> or <strong id="EN-US_TOPIC_0000001707293917__en-us_topic_0000001083058054_b889561193716">Unbalanced</strong> state.</li><li id="EN-US_TOPIC_0000001707293917__en-us_topic_0000001423119293_en-us_topic_0000001083058054_li3148297103">The number of CNs after adjustment cannot exceed the number of deployed CNs. It must be less than or equal to the number of nodes, and less than or equal to 20.</li></ul>
<div class="notice" id="EN-US_TOPIC_0000001707293917__en-us_topic_0000001423119293_en-us_topic_0000001083058054_note1566711158019"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><ul id="EN-US_TOPIC_0000001707293917__en-us_topic_0000001423119293_en-us_topic_0000001083058054_ul1914809151015"><li id="EN-US_TOPIC_0000001707293917__en-us_topic_0000001423119293_en-us_topic_0000001083058054_li15148390108">Before adding a CN, ensure that the cluster is in the <strong id="EN-US_TOPIC_0000001707293917__en-us_topic_0000001083058054_b2778259113614">Available</strong> or <strong id="EN-US_TOPIC_0000001707293917__en-us_topic_0000001083058054_b889561193716">Unbalanced</strong> state.</li><li id="EN-US_TOPIC_0000001707293917__en-us_topic_0000001083058054_li3148297103">The number of CNs cannot exceed the total number of nodes after adjustment.</li><li id="EN-US_TOPIC_0000001707293917__li1940114214820">You cannot add more CNs than the number of CNs that have already been deployed.</li></ul>
</div></div>
</p></li></ol>
</div>

View File

@ -12,7 +12,6 @@
<span class="normal">2</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">CREATE</span><span class="w"> </span><span class="k">TABLE</span><span class="w"> </span><span class="n">t1</span><span class="w"> </span><span class="p">(</span><span class="n">id</span><span class="w"> </span><span class="nb">int</span><span class="p">,</span><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="nb">varchar</span><span class="p">(</span><span class="mi">20</span><span class="p">));</span>
<span class="k">INSERT</span><span class="w"> </span><span class="k">INTO</span><span class="w"> </span><span class="n">t1</span><span class="w"> </span><span class="k">VALUES</span><span class="w"> </span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="s1">'joy'</span><span class="p">),(</span><span class="mi">2</span><span class="p">,</span><span class="s1">'lily'</span><span class="p">);</span>
</pre></div></td></tr></table></div>
</div>
</p></li></ol>
</div>
@ -39,7 +38,6 @@
<div class="section" id="EN-US_TOPIC_0000001707293985__en-us_topic_0000001566787932_section1539819470216"><h4 class="sectiontitle">Creating Logical Clusters, Associating Them with Users, and Querying Data Across Logical Clusters</h4><ol id="EN-US_TOPIC_0000001707293985__en-us_topic_0000001566787932_ol13114157638"><li id="EN-US_TOPIC_0000001707293985__en-us_topic_0000001566787932_li81141771638"><span>Connect to the database as the system administrator and run the following SQL statement to query the original service table <strong id="EN-US_TOPIC_0000001707293985__en-us_topic_0000001566787932_b1996910297354">t1</strong>:</span><p><p id="EN-US_TOPIC_0000001707293985__en-us_topic_0000001566787932_p8791154173517">Verify that service data can be queried after the conversion.</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707293985__en-us_topic_0000001566787932_screen9948725143614"><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">SELECT</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">t1</span><span class="p">;</span>
</pre></div></td></tr></table></div>
</div>
</p></li><li id="EN-US_TOPIC_0000001707293985__en-us_topic_0000001566787932_li16495642181016"><span>Run the following statements to associate <strong id="EN-US_TOPIC_0000001707293985__en-us_topic_0000001566787932_b553818205192">u1</strong> with logical cluster <strong id="EN-US_TOPIC_0000001707293985__en-us_topic_0000001566787932_b792616222193">lc1</strong> and <strong id="EN-US_TOPIC_0000001707293985__en-us_topic_0000001566787932_b18400202461913">u2</strong> with logical cluster <strong id="EN-US_TOPIC_0000001707293985__en-us_topic_0000001566787932_b9775142561917">lc2</strong>, and grant all permissions of the original service table <strong id="EN-US_TOPIC_0000001707293985__en-us_topic_0000001566787932_b798916284199">t1</strong> to user <strong id="EN-US_TOPIC_0000001707293985__en-us_topic_0000001566787932_b18901329111916">u1</strong>:</span><p><div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707293985__en-us_topic_0000001566787932_screen3815411133714"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span>
@ -47,26 +45,22 @@
<span class="k">CREATE</span><span class="w"> </span><span class="k">USER</span><span class="w"> </span><span class="n">u2</span><span class="w"> </span><span class="n">NODE</span><span class="w"> </span><span class="k">GROUP</span><span class="w"> </span><span class="s1">'lc2'</span><span class="w"> </span><span class="n">password</span><span class="w"> </span><span class="s1">'{password}'</span><span class="p">;</span>
<span class="k">GRANT</span><span class="w"> </span><span class="k">ALL</span><span class="w"> </span><span class="k">ON</span><span class="w"> </span><span class="k">TABLE</span><span class="w"> </span><span class="n">t1</span><span class="w"> </span><span class="k">TO</span><span class="w"> </span><span class="n">u1</span><span class="p">;</span>
</pre></div></td></tr></table></div>
</div>
</p></li><li id="EN-US_TOPIC_0000001707293985__en-us_topic_0000001566787932_li62801152373"><span>Switch to user <strong id="EN-US_TOPIC_0000001707293985__en-us_topic_0000001566787932_b814913359193">u2</strong> and query data in the original service table <strong id="EN-US_TOPIC_0000001707293985__en-us_topic_0000001566787932_b16484104717193">t1</strong>. A message is displayed, indicating that you do not have the permission to access logical cluster <strong id="EN-US_TOPIC_0000001707293985__en-us_topic_0000001566787932_b189285591199">lc1</strong>. This indicates data is isolated between logical clusters.</span><p><div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707293985__en-us_topic_0000001566787932_screen1059618122270"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">SET</span><span class="w"> </span><span class="k">ROLE</span><span class="w"> </span><span class="n">u2</span><span class="w"> </span><span class="n">PASSWORD</span><span class="w"> </span><span class="s1">'{password}'</span><span class="p">;</span>
<span class="k">SELECT</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">t1</span><span class="p">;</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001707293985__en-us_topic_0000001566787932_p1431216124298"><span><img id="EN-US_TOPIC_0000001707293985__en-us_topic_0000001566787932_image4986630202710" src="figure/en-us_image_0000001711661656.png" title="Click to enlarge" class="imgResize"></span></p>
</p></li><li id="EN-US_TOPIC_0000001707293985__en-us_topic_0000001566787932_li154880399266"><span>Switch back to system administrator <strong id="EN-US_TOPIC_0000001707293985__en-us_topic_0000001566787932_b358014259207">dbadmin</strong> and grant the access permission of logical cluster <strong id="EN-US_TOPIC_0000001707293985__en-us_topic_0000001566787932_b1136523162016">lc1</strong> to user <strong id="EN-US_TOPIC_0000001707293985__en-us_topic_0000001566787932_b6133113082018">u2</strong>.</span><p><div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707293985__en-us_topic_0000001566787932_screen195241817123010"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">SET</span><span class="w"> </span><span class="k">ROLE</span><span class="w"> </span><span class="n">dbadmin</span><span class="w"> </span><span class="n">PASSWORD</span><span class="w"> </span><span class="s1">'{password}'</span><span class="p">;</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="n">NODE</span><span class="w"> </span><span class="k">GROUP</span><span class="w"> </span><span class="n">lc1</span><span class="w"> </span><span class="k">TO</span><span class="w"> </span><span class="n">u2</span><span class="p">;</span>
</pre></div></td></tr></table></div>
</div>
</p></li><li id="EN-US_TOPIC_0000001707293985__en-us_topic_0000001566787932_li14452050142920"><span>Switch to user <strong id="EN-US_TOPIC_0000001707293985__en-us_topic_0000001566787932_b014843617202">u2</strong> and query the <strong id="EN-US_TOPIC_0000001707293985__en-us_topic_0000001566787932_b19983123712202">t1</strong> table. This proves that the user bound to logical cluster <strong id="EN-US_TOPIC_0000001707293985__en-us_topic_0000001566787932_b1133417612213">lc2</strong> can query the original service table <strong id="EN-US_TOPIC_0000001707293985__en-us_topic_0000001566787932_b99821989213">t1</strong> across logical clusters. In this way, data is shared between logical clusters.</span><p><div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001707293985__en-us_topic_0000001566787932_screen164691833193211"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">SET</span><span class="w"> </span><span class="k">ROLE</span><span class="w"> </span><span class="n">u2</span><span class="w"> </span><span class="n">PASSWORD</span><span class="w"> </span><span class="s1">'{password}'</span><span class="p">;</span>
<span class="k">SELECT</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">t1</span><span class="p">;</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001707293985__en-us_topic_0000001566787932_p9361926183215"><span><img id="EN-US_TOPIC_0000001707293985__en-us_topic_0000001566787932_image14582827163212" src="figure/en-us_image_0000001759580593.png" title="Click to enlarge" class="imgResize"></span></p>
</p></li></ol>

View File

@ -10,14 +10,12 @@
</div>
<div class="section" id="EN-US_TOPIC_0000001659054686__en-us_topic_0000001568736674_section1895712445373"><h4 class="sectiontitle">Creating Logical Clusters, Associating Them with Users, and Querying Data Across Logical Clusters</h4><ol id="EN-US_TOPIC_0000001659054686__en-us_topic_0000001568736674_ol420665903719"><li id="EN-US_TOPIC_0000001659054686__en-us_topic_0000001568736674_li81141771638"><span>Connect to the database as system administrator <strong id="EN-US_TOPIC_0000001659054686__en-us_topic_0000001568736674_b9281135017320">dbadmin</strong> and run the following SQL statement to check whether the logical cluster is created:</span><p><div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001659054686__en-us_topic_0000001568736674_screen620812454320"><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">SELECT</span><span class="w"> </span><span class="n">group_name</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">PGXC_GROUP</span><span class="p">;</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001659054686__en-us_topic_0000001568736674_p14731825124314"><span><img id="EN-US_TOPIC_0000001659054686__en-us_topic_0000001568736674_image473025164318" src="figure/en-us_image_0000001711821160.png"></span></p>
</p></li><li id="EN-US_TOPIC_0000001659054686__en-us_topic_0000001568736674_li4280728174313"><span>Create users <strong id="EN-US_TOPIC_0000001659054686__en-us_topic_0000001568736674_b1716112053310">u1</strong> and <strong id="EN-US_TOPIC_0000001659054686__en-us_topic_0000001568736674_b823711203316">u2</strong> and associate them with logical clusters <strong id="EN-US_TOPIC_0000001659054686__en-us_topic_0000001568736674_b1772112278339">lc1</strong> and <strong id="EN-US_TOPIC_0000001659054686__en-us_topic_0000001568736674_b182574264337">lc2</strong>, respectively.</span><p><div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001659054686__en-us_topic_0000001568736674_screen14338102119448"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">CREATE</span><span class="w"> </span><span class="k">USER</span><span class="w"> </span><span class="n">u1</span><span class="w"> </span><span class="n">NODE</span><span class="w"> </span><span class="k">GROUP</span><span class="w"> </span><span class="ss">&quot;lc1&quot;</span><span class="w"> </span><span class="n">password</span><span class="w"> </span><span class="s1">'{password}'</span><span class="p">;</span>
<span class="k">CREATE</span><span class="w"> </span><span class="k">USER</span><span class="w"> </span><span class="n">u2</span><span class="w"> </span><span class="n">NODE</span><span class="w"> </span><span class="k">GROUP</span><span class="w"> </span><span class="ss">&quot;lc2&quot;</span><span class="w"> </span><span class="n">password</span><span class="w"> </span><span class="s1">'{password}'</span><span class="p">;</span>
</pre></div></td></tr></table></div>
</div>
</p></li><li id="EN-US_TOPIC_0000001659054686__en-us_topic_0000001568736674_li172587184414"><span>Switch to user <strong id="EN-US_TOPIC_0000001659054686__en-us_topic_0000001568736674_b490113114337">u1</strong>, create table <strong id="EN-US_TOPIC_0000001659054686__en-us_topic_0000001568736674_b17911933193314">t1</strong>, and insert data into the table.</span><p><div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001659054686__en-us_topic_0000001568736674_screen19740107164516"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span>
@ -25,7 +23,6 @@
<span class="k">CREATE</span><span class="w"> </span><span class="k">TABLE</span><span class="w"> </span><span class="n">u1</span><span class="p">.</span><span class="n">t1</span><span class="w"> </span><span class="p">(</span><span class="n">id</span><span class="w"> </span><span class="nb">int</span><span class="p">);</span>
<span class="k">INSERT</span><span class="w"> </span><span class="k">INTO</span><span class="w"> </span><span class="n">u1</span><span class="p">.</span><span class="n">t1</span><span class="w"> </span><span class="k">VALUES</span><span class="w"> </span><span class="p">(</span><span class="mi">1</span><span class="p">),(</span><span class="mi">2</span><span class="p">);</span>
</pre></div></td></tr></table></div>
</div>
</p></li><li id="EN-US_TOPIC_0000001659054686__en-us_topic_0000001568736674_li1168315575440"><span>Switch to user <strong id="EN-US_TOPIC_0000001659054686__en-us_topic_0000001568736674_b549043714333">u2</strong>, create table <strong id="EN-US_TOPIC_0000001659054686__en-us_topic_0000001568736674_b127054388337">t2</strong>, and insert data into the table.</span><p><div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001659054686__en-us_topic_0000001568736674_screen1252820206512"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span>
@ -33,11 +30,9 @@
<span class="k">CREATE</span><span class="w"> </span><span class="k">TABLE</span><span class="w"> </span><span class="n">u2</span><span class="p">.</span><span class="n">t2</span><span class="w"> </span><span class="p">(</span><span class="n">id</span><span class="w"> </span><span class="nb">int</span><span class="p">);</span>
<span class="k">INSERT</span><span class="w"> </span><span class="k">INTO</span><span class="w"> </span><span class="n">u2</span><span class="p">.</span><span class="n">t2</span><span class="w"> </span><span class="k">VALUES</span><span class="w"> </span><span class="p">(</span><span class="mi">1</span><span class="p">),(</span><span class="mi">2</span><span class="p">);</span>
</pre></div></td></tr></table></div>
</div>
</p></li><li id="EN-US_TOPIC_0000001659054686__en-us_topic_0000001568736674_li11264113881"><span>Query the <strong id="EN-US_TOPIC_0000001659054686__en-us_topic_0000001568736674_b1458110143420">u1.t1</strong> table as user <strong id="EN-US_TOPIC_0000001659054686__en-us_topic_0000001568736674_b1986125711337">u2</strong>. The command output indicates that the user does not have the permission.</span><p><div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001659054686__en-us_topic_0000001568736674_screen204771116191118"><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">SELECT</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">u1</span><span class="p">.</span><span class="n">t1</span><span class="p">;</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001659054686__en-us_topic_0000001568736674_p136095512114"><span><img id="EN-US_TOPIC_0000001659054686__en-us_topic_0000001568736674_image1960145531116" src="figure/en-us_image_0000001759420745.png" title="Click to enlarge" class="imgResize"></span></p>
<p id="EN-US_TOPIC_0000001659054686__en-us_topic_0000001568736674_p166012556114"></p>
@ -47,7 +42,6 @@
<span class="k">SELECT</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">oid</span><span class="p">,</span><span class="n">relname</span><span class="p">,</span><span class="n">pgroup</span><span class="p">,</span><span class="n">nodeoids</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">pg_class</span><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="k">LEFT</span><span class="w"> </span><span class="k">JOIN</span><span class="w"> </span><span class="n">pgxc_class</span><span class="w"> </span><span class="n">pg</span><span class="w"> </span><span class="k">ON</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">oid</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">pg</span><span class="p">.</span><span class="n">pcrelid</span><span class="w"> </span><span class="k">WHERE</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">relname</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'t1'</span><span class="p">;</span>
<span class="k">SELECT</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">oid</span><span class="p">,</span><span class="n">relname</span><span class="p">,</span><span class="n">pgroup</span><span class="p">,</span><span class="n">nodeoids</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">pg_class</span><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="k">LEFT</span><span class="w"> </span><span class="k">JOIN</span><span class="w"> </span><span class="n">pgxc_class</span><span class="w"> </span><span class="n">pg</span><span class="w"> </span><span class="k">ON</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">oid</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">pg</span><span class="p">.</span><span class="n">pcrelid</span><span class="w"> </span><span class="k">WHERE</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">relname</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'t2'</span><span class="p">;</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001659054686__en-us_topic_0000001568736674_p91298522718"><span><img id="EN-US_TOPIC_0000001659054686__en-us_topic_0000001568736674_image9129952571" src="figure/en-us_image_0000001759580597.png" title="Click to enlarge" class="imgResize"></span></p>
<p id="EN-US_TOPIC_0000001659054686__en-us_topic_0000001568736674_p21295521271"><span><img id="EN-US_TOPIC_0000001659054686__en-us_topic_0000001568736674_image512914523720" src="figure/en-us_image_0000001711821172.png" title="Click to enlarge" class="imgResize"></span></p>
@ -57,7 +51,6 @@
<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">SCHEMA</span><span class="w"> </span><span class="n">u1</span><span class="w"> </span><span class="k">TO</span><span class="w"> </span><span class="n">u2</span><span class="p">;</span>
<span class="k">GRANT</span><span class="w"> </span><span class="k">select</span><span class="w"> </span><span class="k">ON</span><span class="w"> </span><span class="k">TABLE</span><span class="w"> </span><span class="n">u1</span><span class="p">.</span><span class="n">t1</span><span class="w"> </span><span class="k">TO</span><span class="w"> </span><span class="n">u2</span><span class="p">;</span>
</pre></div></td></tr></table></div>
</div>
<div class="note" id="EN-US_TOPIC_0000001659054686__en-us_topic_0000001568736674_note0818181844513"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001659054686__en-us_topic_0000001568736674_p4818111874511">Logical clusters implement permission isolation (by node groups) based on physical clusters. To let a user access data across logical clusters, you need to grant the logical cluster (node-group layer) permissions, schema permissions, and table permissions to the user in sequence. If no logical cluster permissions are granted, the error message "permission denied for node group xx" will be displayed.</p>
</div></div>
@ -65,7 +58,6 @@
<span class="normal">2</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">SET</span><span class="w"> </span><span class="k">ROLE</span><span class="w"> </span><span class="n">u2</span><span class="w"> </span><span class="n">PASSWORD</span><span class="w"> </span><span class="s1">'{password}'</span><span class="p">;</span>
<span class="k">SELECT</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">u1</span><span class="p">.</span><span class="n">t1</span><span class="p">;</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001659054686__en-us_topic_0000001568736674_p13676125382"><span><img id="EN-US_TOPIC_0000001659054686__en-us_topic_0000001568736674_image186681219385" src="figure/en-us_image_0000001759420753.png"></span></p>
</p></li></ol>

View File

@ -50,7 +50,6 @@
<span class="w"> </span><span class="mi">7521</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">WARD</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">SALESMAN</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">7698</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">1981</span><span class="o">-</span><span class="mi">02</span><span class="o">-</span><span class="mi">22</span><span class="w"> </span><span class="mi">00</span><span class="p">:</span><span class="mi">00</span><span class="p">:</span><span class="mi">00</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">1250</span><span class="p">.</span><span class="mi">00</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">500</span><span class="p">.</span><span class="mi">00</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">30</span>
<span class="p">(</span><span class="mi">4</span><span class="w"> </span><span class="k">rows</span><span class="p">)</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001652434770__p1682095010234">Create the <strong id="EN-US_TOPIC_0000001652434770__b13865120316">emp_comp</strong> function to accept two numbers as input and return the calculated value.</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001652434770__screen117321848192718"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
@ -71,7 +70,6 @@
<span class="k">END</span><span class="p">;</span>
<span class="o">/</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001652434770__p1989744112712">Run the <strong id="EN-US_TOPIC_0000001652434770__b363494163210">SELECT</strong> command to invoke the function:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001652434770__screen19848615193617"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
@ -90,7 +88,6 @@
<span class="w"> </span><span class="n">WARD</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">1250</span><span class="p">.</span><span class="mi">00</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">500</span><span class="p">.</span><span class="mi">00</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">42000</span><span class="p">.</span><span class="mi">00</span>
<span class="p">(</span><span class="mi">4</span><span class="w"> </span><span class="k">rows</span><span class="p">)</span>
</pre></div></td></tr></table></div>
</div>
</li><li id="EN-US_TOPIC_0000001652434770__li275125415162"><strong id="EN-US_TOPIC_0000001652434770__b9504129171314">Creating and Invoking a Stored Procedure</strong><p id="EN-US_TOPIC_0000001652434770__p86031059172">Create the <strong id="EN-US_TOPIC_0000001652434770__b558918120329">MATCHES</strong> table and insert data into the table. The table data is as follows:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001652434770__screen646571117238"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
@ -111,7 +108,6 @@
<span class="w"> </span><span class="mi">11</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">2</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">112</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">2</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">3</span>
<span class="p">(</span><span class="mi">5</span><span class="w"> </span><span class="k">rows</span><span class="p">)</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001652434770__p10250114117223">Create the stored procedure <strong id="EN-US_TOPIC_0000001652434770__b362210243321">delete_matches</strong> to delete all matches that a specified player participates in.</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001652434770__screen782315546235"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
@ -126,12 +122,10 @@
<span class="k">END</span><span class="p">;</span>
<span class="o">/</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001652434770__p146601011142411">Invoke the stored procedure <strong id="EN-US_TOPIC_0000001652434770__b68214133312">delete_matches</strong>.</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001652434770__screen19120946112420"><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">CALL</span><span class="w"> </span><span class="n">delete_matches</span><span class="p">(</span><span class="mi">57</span><span class="p">);</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001652434770__p1920120142510">Query the <strong id="EN-US_TOPIC_0000001652434770__b13274206173319">MATCHES</strong> table again. The returned result indicates that the data of the player whose <strong id="EN-US_TOPIC_0000001652434770__b155611322103310">playerno</strong> is <strong id="EN-US_TOPIC_0000001652434770__b122605275334">57</strong> has been deleted.</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001652434770__screen18364746192519"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
@ -150,7 +144,6 @@
<span class="w"> </span><span class="mi">9</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">2</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">27</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">3</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">2</span>
<span class="p">(</span><span class="mi">4</span><span class="w"> </span><span class="k">rows</span><span class="p">)</span>
</pre></div></td></tr></table></div>
</div>
</li></ul>
</div>

View File

@ -1,37 +1,37 @@
<a name="EN-US_TOPIC_0000001381728549"></a><a name="EN-US_TOPIC_0000001381728549"></a>
<h1 class="topictitle1">Should I Choose Public Cloud GaussDB(DWS) or RDS?</h1>
<div id="body0000001381728549"><p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p371183032613">Both allow you to run conventional relational databases on the cloud and transfer database management loads. RDS databases are useful for OLTP, reporting, and analysis, but are less capable of handling read operations of a large amount of data (complex read-only queries). GaussDB(DWS) is useful for OLAP by reducing analysis and report workloads of large data sets by an order of magnitude, thanks to its multi-node scale and resources and optimized algorithms (<strong id="EN-US_TOPIC_0000001381728549__b14169131112333">column storage, vectorized executors, and distributed frameworks</strong>).</p>
<div id="body0000001381728549"><p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p371183032613">Both allow you to run conventional relational databases on the cloud and transfer database management loads. RDS databases are useful for OLTP, reporting, and analysis, but are less capable of handling read operations of a large amount of data (complex read-only queries). GaussDB(DWS) is useful for OLAP by reducing analysis and report workloads of large data sets by an order of magnitude, thanks to its multi-node scale and resources and optimized algorithms (<strong id="EN-US_TOPIC_0000001381728549__b209543480135327">column storage, vectorized executors, and distributed frameworks</strong>).</p>
<p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p18912269115625">You can scale out a GaussDB(DWS) cluster to address complex data and queries, or to handle overwhelming analysis and report workloads that affect OLTP performance.</p>
<p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p65615256553">The following table shows the comparison between OLTP and OLAP.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_table1612418683415" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Feature comparison between OLTP and OLAP </caption><thead align="left"><tr id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_row212513623416"><th align="left" class="cellrowborder" valign="top" width="16%" id="mcps1.3.4.2.4.1.1"><p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p012515673411"><strong id="EN-US_TOPIC_0000001381728549__b842352706112930">Feature</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_table1612418683415" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Comparison between OLTP and OLAP</caption><thead align="left"><tr id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_row212513623416"><th align="left" class="cellrowborder" valign="top" width="16%" id="mcps1.3.4.2.4.1.1"><p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p012515673411">Feature</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="43%" id="mcps1.3.4.2.4.1.2"><p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p212514633410">RDS for OLTP</p>
<th align="left" class="cellrowborder" valign="top" width="43%" id="mcps1.3.4.2.4.1.2"><p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p212514633410">OLTP</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="41%" id="mcps1.3.4.2.4.1.3"><p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p1312596203415">GaussDB(DWS) for OLAP</p>
<th align="left" class="cellrowborder" valign="top" width="41%" id="mcps1.3.4.2.4.1.3"><p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p1312596203415">OLAP</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_row91251861341"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.2.4.1.1 "><p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p1912516183420">User</p>
<tbody><tr id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_row91251861341"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.2.4.1.1 "><p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p1912516183420">Users</p>
</td>
<td class="cellrowborder" valign="top" width="43%" headers="mcps1.3.4.2.4.1.2 "><p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p912596113418">Operations and low-level management</p>
<td class="cellrowborder" valign="top" width="43%" headers="mcps1.3.4.2.4.1.2 "><p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p912596113418">Operation personnel and junior managers</p>
</td>
<td class="cellrowborder" valign="top" width="41%" headers="mcps1.3.4.2.4.1.3 "><p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p912519613341">Decision-makers and senior management</p>
<td class="cellrowborder" valign="top" width="41%" headers="mcps1.3.4.2.4.1.3 "><p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p912519613341">Decision-making personnel and senior managers</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_row3126206143416"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.2.4.1.1 "><p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p81269633415">Function</p>
<tr id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_row3126206143416"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.2.4.1.1 "><p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p81269633415">Functionality</p>
</td>
<td class="cellrowborder" valign="top" width="43%" headers="mcps1.3.4.2.4.1.2 "><p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p8126468341">Daily operation processing</p>
<td class="cellrowborder" valign="top" width="43%" headers="mcps1.3.4.2.4.1.2 "><p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p8126468341">Daily operations</p>
</td>
<td class="cellrowborder" valign="top" width="41%" headers="mcps1.3.4.2.4.1.3 "><p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p4126166163414">Analysis and decision-making</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_row21262062341"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.2.4.1.1 "><p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p19126569346">Design</p>
</td>
<td class="cellrowborder" valign="top" width="43%" headers="mcps1.3.4.2.4.1.2 "><p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p131262673414">By application</p>
<td class="cellrowborder" valign="top" width="43%" headers="mcps1.3.4.2.4.1.2 "><p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p131262673414">Application-oriented</p>
</td>
<td class="cellrowborder" valign="top" width="41%" headers="mcps1.3.4.2.4.1.3 "><p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p121269611343">By theme</p>
<td class="cellrowborder" valign="top" width="41%" headers="mcps1.3.4.2.4.1.3 "><p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p121269611343">Subject-oriented</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_row1912696143411"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.2.4.1.1 "><p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p191265612341">Data</p>
@ -43,12 +43,12 @@
</tr>
<tr id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_row104371119354"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.2.4.1.1 "><p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p84381512359">Access</p>
</td>
<td class="cellrowborder" valign="top" width="43%" headers="mcps1.3.4.2.4.1.2 "><p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p1143910173511">Dozens of read and write records </p>
<td class="cellrowborder" valign="top" width="43%" headers="mcps1.3.4.2.4.1.2 "><p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p1143910173511">Reads/Writes dozens of records.</p>
</td>
<td class="cellrowborder" valign="top" width="41%" headers="mcps1.3.4.2.4.1.3 "><p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p64391143512">Millions of read records</p>
<td class="cellrowborder" valign="top" width="41%" headers="mcps1.3.4.2.4.1.3 "><p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p64391143512">Reads millions of records.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_row321416303511"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.2.4.1.1 "><p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p52144315356">Coverage</p>
<tr id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_row321416303511"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.2.4.1.1 "><p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p52144315356">Scope of Work</p>
</td>
<td class="cellrowborder" valign="top" width="43%" headers="mcps1.3.4.2.4.1.2 "><p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p7214334354">Simple read/write operations</p>
</td>
@ -59,7 +59,7 @@
</td>
<td class="cellrowborder" valign="top" width="43%" headers="mcps1.3.4.2.4.1.2 "><p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p117235211353">Hundreds of GB</p>
</td>
<td class="cellrowborder" valign="top" width="41%" headers="mcps1.3.4.2.4.1.3 "><p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p1872312114354">TB or PB</p>
<td class="cellrowborder" valign="top" width="41%" headers="mcps1.3.4.2.4.1.3 "><p id="EN-US_TOPIC_0000001381728549__en-us_topic_0000001145816541_p1872312114354">TB to PB</p>
</td>
</tr>
</tbody>

View File

@ -1,9 +1,9 @@
<a name="EN-US_TOPIC_0000001330488820"></a><a name="EN-US_TOPIC_0000001330488820"></a>
<h1 class="topictitle1">What Do I Do If Creating a GaussDB(DWS) Cluster Failed?</h1>
<div id="body0000001330488820"><div class="section" id="EN-US_TOPIC_0000001330488820__en-us_topic_0000001099136690_section5638830514201"><h4 class="sectiontitle">Troubleshooting</h4><p id="EN-US_TOPIC_0000001330488820__en-us_topic_0000001099136690_p8060118">Check that you have enough quota for creating the cluster.</p>
<div id="body0000001330488820"><div class="section" id="EN-US_TOPIC_0000001330488820__en-us_topic_0000001099136690_section5638830514201"><h4 class="sectiontitle">Possible Causes</h4><p id="EN-US_TOPIC_0000001330488820__en-us_topic_0000001099136690_p8060118">Check that you have enough quota for creating the cluster.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001330488820__en-us_topic_0000001099136690_section22805450142011"><h4 class="sectiontitle">Technical Support</h4><p id="EN-US_TOPIC_0000001330488820__en-us_topic_0000001099136690_aaa65144ca5ef40cb96248ac1453eae4b">Call the Customer Hotline for support.</p>
<div class="section" id="EN-US_TOPIC_0000001330488820__en-us_topic_0000001099136690_section22805450142011"><h4 class="sectiontitle">Contacting Customer Service</h4><p id="EN-US_TOPIC_0000001330488820__en-us_topic_0000001099136690_aaa65144ca5ef40cb96248ac1453eae4b">Call the Customer Hotline for support.</p>
<p id="EN-US_TOPIC_0000001330488820__en-us_topic_0000001099136690_abd18273f8cbd45fbb80c4fcfe34e340e">Telephone:</p>
<p id="EN-US_TOPIC_0000001330488820__en-us_topic_0000001099136690_a77bc6b9b240541c3a326953007450300">Germany: 0800 330 44 44</p>
<p id="EN-US_TOPIC_0000001330488820__en-us_topic_0000001099136690_a248bf41f35014e2faa8cadf824612712">International: +800 44556600</p>

View File

@ -2,7 +2,7 @@
<h1 class="topictitle1">Does GaussDB(DWS) Support Third-Party Clients and JDBC and ODBC Drivers?</h1>
<div id="body0000001381609389"><p id="EN-US_TOPIC_0000001381609389__en-us_topic_0000001145896607_p40530217151241">Yes, but GaussDB(DWS) clients and drivers are recommended. Unlike open-source PostgreSQL clients and drivers, GaussDB(DWS) clients and drivers have two key advantages:</p>
<ul id="EN-US_TOPIC_0000001381609389__en-us_topic_0000001145896607_ul3479925151347"><li id="EN-US_TOPIC_0000001381609389__en-us_topic_0000001145896607_li38226700151347"><strong id="EN-US_TOPIC_0000001381609389__b81442617264851">Security hardening</strong>: PostgreSQL drivers only support MD5 authentication, but GaussDB(DWS) drivers support SHA256 and MD5.</li><li id="EN-US_TOPIC_0000001381609389__en-us_topic_0000001145896607_li50874004151353"><strong id="EN-US_TOPIC_0000001381609389__b191505611064851">Data type enhancement</strong>: GaussDB(DWS) drivers support new data types smalldatetime and tinyint.</li></ul>
<ul id="EN-US_TOPIC_0000001381609389__en-us_topic_0000001145896607_ul3479925151347"><li id="EN-US_TOPIC_0000001381609389__en-us_topic_0000001145896607_li38226700151347"><strong id="EN-US_TOPIC_0000001381609389__b81442617264851">Security hardening</strong>: PostgreSQL drivers only support MD5 authentication, but GaussDB(DWS) drivers support SHA256 and MD5.</li><li id="EN-US_TOPIC_0000001381609389__en-us_topic_0000001145896607_li50874004151353"><strong id="EN-US_TOPIC_0000001381609389__b1492592620243">Data type enhancement</strong>: GaussDB(DWS) drivers support new data types smalldatetime and tinyint.</li></ul>
<p id="EN-US_TOPIC_0000001381609389__en-us_topic_0000001145896607_p18628341151241">GaussDB(DWS) supports open-source PostgreSQL clients and JDBC and ODBC drivers.</p>
<p id="EN-US_TOPIC_0000001381609389__en-us_topic_0000001145896607_p33437349151241">The compatible client and driver versions are:</p>
<ul id="EN-US_TOPIC_0000001381609389__en-us_topic_0000001145896607_ul25122506151512"><li id="EN-US_TOPIC_0000001381609389__en-us_topic_0000001145896607_li28867016151512">PostgreSQL psql 9.2.4 or later</li><li id="EN-US_TOPIC_0000001381609389__en-us_topic_0000001145896607_li15281266151512">PostgreSQL JDBC Driver 9.3-1103 or later</li><li id="EN-US_TOPIC_0000001381609389__en-us_topic_0000001145896607_li64819967151512">PSQL ODBC 09.01.0200 or later</li></ul>

View File

@ -1,17 +1,16 @@
<a name="EN-US_TOPIC_0000001381889069"></a><a name="EN-US_TOPIC_0000001381889069"></a>
<h1 class="topictitle1">Why Was I Not Notified of Failure Unbinding the EIP When GaussDB(DWS) Is Connected Over the Internet?</h1>
<div id="body0000001381889069"><p id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_p1737160410248">After the EIP is unbound, the network may be disconnected. However, the TCP layer does not detect a faulty physical connection in time due to keepalive settings. As a result, the gsql, ODBC, and JDBC clients also cannot identify the network fault in time.</p>
<p id="EN-US_TOPIC_0000001381889069__p136656134">The duration when the database sends the disconnection message to the client depends on the keepalive settings. The specific algorithm for calculating the duration is:</p>
<p id="EN-US_TOPIC_0000001381889069__p1795214451541"><strong id="EN-US_TOPIC_0000001381889069__b84235270617054">keepalive_time</strong> + <strong id="EN-US_TOPIC_0000001381889069__b84235270617057">keepalive_probes</strong> x <strong id="EN-US_TOPIC_0000001381889069__b8423527061713">keepalive_intvl</strong></p>
<div id="body0000001381889069"><p id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_p1737160410248">The network is disconnected when the EIP is unbound. However, the TCP layer does not detect a faulty physical connection in time due to keepalive settings. As a result, the gsql, ODBC, and JDBC clients also cannot identify the network fault in time.</p>
<p id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_p25441896102029">The time for the client to wait for the database to return is related to the setting of the <strong id="EN-US_TOPIC_0000001381889069__b855042022610">keepalive</strong> parameter, and may be specifically expressed as: <strong id="EN-US_TOPIC_0000001381889069__b1431884617264">keepalive_time</strong> + <strong id="EN-US_TOPIC_0000001381889069__b10508115016262">keepalive_probes</strong>*<strong id="EN-US_TOPIC_0000001381889069__b185971153152619">keepalive_intvl</strong>.</p>
<p id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_p25096336102029">Keepalive values affect network communication stability. Adjust them to service pressure and network conditions.</p>
<p id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_p24540436102029">On Linux, run the <strong id="EN-US_TOPIC_0000001381889069__b84235270617310">sysctl</strong> command to modify the following parameters:</p>
<p id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_p24540436102029">On Linux, run the <strong id="EN-US_TOPIC_0000001381889069__b157690372142458">sysctl</strong> command to modify the following parameters:</p>
<ul id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_ul2598334111540"><li id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_li6369214011540">net.ipv4.tcp_keepalive_time</li><li id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_li6434749111540">net.ipv4.tcp_keeaplive_probes</li><li id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_li1828163911540">net.ipv4.tcp_keepalive_intvl</li></ul>
<p id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_p25999200164024">For example, if you want to change the value of <strong id="EN-US_TOPIC_0000001381889069__b84235270617128">net.ipv4.tcp_keepalive_time</strong>, run the following command to change it to <strong id="EN-US_TOPIC_0000001381889069__b842352706171241">120</strong>.</p>
<p id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_p25999200164024">For example, if you want to change the value of <strong id="EN-US_TOPIC_0000001381889069__b56627307242458">net.ipv4.tcp_keepalive_time</strong>, run the following command to change it to <strong id="EN-US_TOPIC_0000001381889069__b38666841642458">120</strong>.</p>
<p id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_p27802129162337"><i><b><span class="cmdname" style="font-family:Arial" id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_cmdname40920459164051">sysctl net.ipv4.tcp_keepalive_time=120</span></b></i></p>
<p id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_p15640178102029">On Windows, modify the following configuration information in registry <span class="filepath" id="EN-US_TOPIC_0000001381889069__filepath1612355534171251"><b>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters</b></span>:</p>
<ul id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_ul3846821711544"><li id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_li2372125711544">KeepAliveTime</li><li id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_li971649411544">KeepAliveInterval</li><li id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_li3560920011544">TcpMaxDataRetransmissions (equivalent to <strong id="EN-US_TOPIC_0000001381889069__b84235270617412">tcp_keepalive_probes</strong>)</li></ul>
<div class="note" id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_note8795213143929"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_p12048055143929">If you cannot find the preceding parameters in registry <span class="filepath" id="EN-US_TOPIC_0000001381889069__filepath1650537997164711"><b>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters</b></span>, add these parameters. Open<strong id="EN-US_TOPIC_0000001381889069__b842352706174526"> Registry Editor</strong>, right-click the blank area on the right, and choose <span class="menucascade" id="EN-US_TOPIC_0000001381889069__menucascade901868770174628"><b><span class="uicontrol" id="EN-US_TOPIC_0000001381889069__uicontrol1975363649174628">Create</span></b> &gt; <b><span class="uicontrol" id="EN-US_TOPIC_0000001381889069__uicontrol211807385174628">DWORD (32-bit) Value</span></b></span> to add these parameters.</p>
<p id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_p15640178102029">On Windows, modify the following configuration information in registry <span class="filepath" id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_filepath2972886816326"><b>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters</b></span>:</p>
<ul id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_ul3846821711544"><li id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_li2372125711544">KeepAliveTime</li><li id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_li971649411544">KeepAliveInterval</li><li id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_li3560920011544">TcpMaxDataRetransmissions (equivalent to <strong id="EN-US_TOPIC_0000001381889069__b18829721142717">tcp_keepalive_probes</strong>)</li></ul>
<div class="note" id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_note8795213143929"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001381889069__en-us_topic_0000001098976678_p12048055143929">If you cannot find the preceding parameters in registry <span class="filepath" id="EN-US_TOPIC_0000001381889069__filepath30854763842458"><b>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters</b></span>, add these parameters. Open <strong id="EN-US_TOPIC_0000001381889069__b180811323342458">Registry Editor</strong>, right-click the blank area on the right, and choose <span class="menucascade" id="EN-US_TOPIC_0000001381889069__menucascade2703866742458"><b><span class="uicontrol" id="EN-US_TOPIC_0000001381889069__uicontrol123640136742458">Create</span></b> &gt; <b><span class="uicontrol" id="EN-US_TOPIC_0000001381889069__uicontrol207871602342458">DWORD (32-bit) Value</span></b></span> to add these parameters.</p>
</div></div>
</div>
<div>

View File

@ -10,7 +10,6 @@
<p id="EN-US_TOPIC_0000001381889061__en-us_topic_0000001099136646_p1035985124819">The following information is displayed once the space is cleared:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001381889061__en-us_topic_0000001099136646_screen735920515480"><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">VACUUM</span>
</pre></div></td></tr></table></div>
</div>
<div class="note" id="EN-US_TOPIC_0000001381889061__en-us_topic_0000001099136646_note153592554814"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="EN-US_TOPIC_0000001381889061__ul1852217814375"><li id="EN-US_TOPIC_0000001381889061__li7419151083716"><strong id="EN-US_TOPIC_0000001381889061__b2216048894132">VACUUM FULL</strong> reclaims all expired row space, however it requires an exclusive lock on each table being processed, and might take a long time to complete on large, distributed database tables. You are advised to do <strong id="EN-US_TOPIC_0000001381889061__b74199116794132">VACUUM FULL</strong> to specified tables. If you want to do <strong id="EN-US_TOPIC_0000001381889061__b141599405994132">VACUUM FULL</strong> to the entire database, you are advised to do it during database maintenance.</li><li id="EN-US_TOPIC_0000001381889061__li852214823720">The statistical information will be lost if you use the <strong id="EN-US_TOPIC_0000001381889061__b121522423594132">FULL</strong> parameter. To collect the statistics, add keyword <strong id="EN-US_TOPIC_0000001381889061__b10789732494132">ANALYZE</strong>, for example, <b><span class="cmdname" id="EN-US_TOPIC_0000001381889061__en-us_topic_0000001099136646_cmdname0689424135118">VACUUM FULL ANALYZE;</span></b>. For more information about <strong id="EN-US_TOPIC_0000001381889061__b81478155694132">VACUUM</strong>, see "SQL Reference &gt; SQL Syntax &gt; VACUUM" in the <i><cite id="EN-US_TOPIC_0000001381889061__cite39023222594132">Data Warehouse Service (DWS) Developer Guide</cite></i>.</li></ul>
</div></div>

View File

@ -1,7 +1,7 @@
<a name="EN-US_TOPIC_0000001330488828"></a><a name="EN-US_TOPIC_0000001330488828"></a>
<h1 class="topictitle1">Can I Connect to GaussDB(DWS) Cluster Nodes Using SSH?</h1>
<div id="body0000001330488828"><p id="EN-US_TOPIC_0000001330488828__en-us_topic_0000001145496683_p143561129360">No, direct access is not supported. VMs at the bottom layer of GaussDB(DWS) serve as the compute nodes for data analysis. Access cluster databases using the private or public network access address instead.</p>
<div id="body0000001330488828"><p id="EN-US_TOPIC_0000001330488828__en-us_topic_0000001145496683_p143561129360">No, you can't, VMs at the bottom layer of GaussDB(DWS) serve as the compute nodes for data analysis. However, the GaussDB(DWS) compute nodes cannot be accessed directly. You can only access cluster databases using the private or public network access address.</p>
</div>
<div>
<div class="familylinks">

View File

@ -1,10 +1,9 @@
<a name="EN-US_TOPIC_0000001330808740"></a><a name="EN-US_TOPIC_0000001330808740"></a>
<h1 class="topictitle1">Can I Modify the Security Group of a GaussDB(DWS) Cluster?</h1>
<div id="body0000001330808740"><p id="EN-US_TOPIC_0000001330808740__en-us_topic_0000001145496741_af713d69ac926407aba50f1b20419e527"></p>
<p id="EN-US_TOPIC_0000001330808740__af713d69ac926407aba50f1b20419e527">After a GaussDB(DWS) cluster is created, you can add, delete, or modify security group rules in the current security group.</p>
<ul id="EN-US_TOPIC_0000001330808740__ul4336657194415"><li id="EN-US_TOPIC_0000001330808740__li123361557164414">Modifying an existing security group rule:<ol id="EN-US_TOPIC_0000001330808740__ol1464103605714"><li id="EN-US_TOPIC_0000001330808740__li18464183605718">Log in to the GaussDB(DWS) management console.</li><li id="EN-US_TOPIC_0000001330808740__li4464183605715">In the navigation tree on the left, choose <strong id="EN-US_TOPIC_0000001330808740__b19848111604819">Clusters</strong> &gt; <strong id="EN-US_TOPIC_0000001330808740__b19849171684811">Dedicated Clusters</strong>.</li><li id="EN-US_TOPIC_0000001330808740__li13464436165718">In the cluster list, find the target cluster and click the cluster name. The <span class="wintitle" id="EN-US_TOPIC_0000001330808740__wintitle1445626815113336"><b>Basic Information</b></span> page is displayed.</li><li id="EN-US_TOPIC_0000001330808740__li04641436105714">Locate the <strong id="EN-US_TOPIC_0000001330808740__b6544930145434">Security Group</strong> parameter and click the security group name to switch to the <strong id="EN-US_TOPIC_0000001330808740__b16841240885434">Security Groups</strong> page on the VPC console, on which you can set the security group.</li></ol>
</li></ul>
<div id="body0000001330808740"><p id="EN-US_TOPIC_0000001330808740__af713d69ac926407aba50f1b20419e527">After a GaussDB(DWS) cluster is created, you can add, delete, or modify security group rules in the current security group.</p>
<div class="p" id="EN-US_TOPIC_0000001330808740__p6705230162413"><strong id="EN-US_TOPIC_0000001330808740__b0529182491718">Modify an existing security group rule:</strong><ol id="EN-US_TOPIC_0000001330808740__ol1464103605714"><li id="EN-US_TOPIC_0000001330808740__li18464183605718">Log in to the GaussDB(DWS) management console.</li><li id="EN-US_TOPIC_0000001330808740__li4464183605715">In the navigation tree on the left, choose <strong id="EN-US_TOPIC_0000001330808740__b19848111604819">Clusters</strong> &gt; <strong id="EN-US_TOPIC_0000001330808740__b19849171684811">Dedicated Clusters</strong>.</li><li id="EN-US_TOPIC_0000001330808740__li13464436165718">In the cluster list, find the target cluster and click the cluster name. The <span class="wintitle" id="EN-US_TOPIC_0000001330808740__wintitle1445626815113336"><b>Basic Information</b></span> page is displayed.</li><li id="EN-US_TOPIC_0000001330808740__li04641436105714">Locate the <strong id="EN-US_TOPIC_0000001330808740__b6544930145434">Security Group</strong> parameter and click the security group name to switch to the <strong id="EN-US_TOPIC_0000001330808740__b16841240885434">Security Groups</strong> page on the VPC console, on which you can set the security group.</li></ol>
</div>
</div>
<div>
<div class="familylinks">

View File

@ -1,11 +1,11 @@
<a name="EN-US_TOPIC_0000001330808744"></a><a name="EN-US_TOPIC_0000001330808744"></a>
<h1 class="topictitle1">Why Did the Used Storage Shrink After Scale-out?</h1>
<div id="body0000001330808744"><div class="section" id="EN-US_TOPIC_0000001330808744__en-us_topic_0000001098656854_s5e776f9251324cecaf3800c3f63965c5"><h4 class="sectiontitle">Possible Causes</h4><p id="EN-US_TOPIC_0000001330808744__en-us_topic_0000001098656854_en-us_topic_0213143534_p128284610174">If you do not run <strong id="EN-US_TOPIC_0000001330808744__b179815225332">VACUUM</strong> to clear and reclaim the storage space before the scale-out, the data deleted from GaussDB(DWS) may not free up the occupied disk space.</p>
<p id="EN-US_TOPIC_0000001330808744__en-us_topic_0000001098656854_a589f30fa7f16423a9920d732405577a8">During the scale-out, the system redistributes the data because the service data volume on the original nodes is significantly larger than that on the newly added nodes. When the redistribution starts, the system automatically performs <strong id="EN-US_TOPIC_0000001330808744__b144521757183319">VACUUM</strong> to free up the storage space. This causes a big drop in capacity.</p>
<div id="body0000001330808744"><div class="section" id="EN-US_TOPIC_0000001330808744__en-us_topic_0000001098656854_s5e776f9251324cecaf3800c3f63965c5"><h4 class="sectiontitle">Cause Analysis</h4><p id="EN-US_TOPIC_0000001330808744__en-us_topic_0000001098656854_en-us_topic_0213143534_p128284610174">If you do not run <strong id="EN-US_TOPIC_0000001330808744__b17666482642030">VACUUM</strong> to clear and reclaim the storage space before the scale-out, the data deleted from GaussDB(DWS) may not free up the occupied disk space.</p>
<p id="EN-US_TOPIC_0000001330808744__en-us_topic_0000001098656854_a589f30fa7f16423a9920d732405577a8">During the scale-out, the system redistributes the data because the service data volume on the original nodes is significantly larger than that on the newly added nodes. When the redistribution starts, the system automatically performs <strong id="EN-US_TOPIC_0000001330808744__b29120138442030">VACUUM</strong> to free up the storage space. In this way, the used storage is reduced.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001330808744__en-us_topic_0000001098656854_sb7e1dde536ba49b28f6885699a767a7f"><h4 class="sectiontitle">Handling Procedure</h4><p id="EN-US_TOPIC_0000001330808744__en-us_topic_0000001098656854_a80942a246d0f40faa74cd165a7b2124f">You are advised to periodically clear and reclaim the storage space by running <strong id="EN-US_TOPIC_0000001330808744__b1793411225118">VACUUM FULL</strong> to prevent data expansion.</p>
<p id="EN-US_TOPIC_0000001330808744__en-us_topic_0000001098656854_a1eaa4d1da01e4f38a57995561e1bc5a7">If the used storage space is still large after you run <strong id="EN-US_TOPIC_0000001330808744__b15671918123416">VACUUM FULL</strong>, analyze whether the existing cluster flavor meets service requirements. If no, scale out the cluster.</p>
<div class="section" id="EN-US_TOPIC_0000001330808744__en-us_topic_0000001098656854_sb7e1dde536ba49b28f6885699a767a7f"><h4 class="sectiontitle">Handling Procedure</h4><p id="EN-US_TOPIC_0000001330808744__en-us_topic_0000001098656854_a80942a246d0f40faa74cd165a7b2124f">You are advised to periodically clear and reclaim the storage space by running <strong id="EN-US_TOPIC_0000001330808744__b140464794142030">VACUUM FULL</strong> to prevent data expansion.</p>
<p id="EN-US_TOPIC_0000001330808744__en-us_topic_0000001098656854_a1eaa4d1da01e4f38a57995561e1bc5a7">If the used storage space is still large after you run <strong id="EN-US_TOPIC_0000001330808744__b159340563042030">VACUUM FULL</strong>, analyze whether the existing cluster flavor meets service requirements. If no, scale out the cluster.</p>
</div>
</div>
<div>

View File

@ -7,7 +7,6 @@
<p id="EN-US_TOPIC_0000001330488816__p1231612471363">Create user <strong id="EN-US_TOPIC_0000001330488816__b65615283354327">jerry</strong> and set its validity start time to its current creation time.</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001330488816__screen1876505113363"><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">CREATE</span><span class="w"> </span><span class="k">USER</span><span class="w"> </span><span class="n">jerry</span><span class="w"> </span><span class="n">PASSWORD</span><span class="w"> </span><span class="s1">'password'</span><span class="w"> </span><span class="k">VALID</span><span class="w"> </span><span class="k">BEGIN</span><span class="w"> </span><span class="s1">'2022-05-19 10:31:56'</span><span class="p">;</span>
</pre></div></td></tr></table></div>
</div>
<div class="p" id="EN-US_TOPIC_0000001330488816__p6753850152611">View users in the <strong id="EN-US_TOPIC_0000001330488816__b199352007454327">PG_USER</strong> view. The <strong id="EN-US_TOPIC_0000001330488816__b14590858354327">valbegin</strong> column indicates the time when <strong id="EN-US_TOPIC_0000001330488816__b121708267954327">jerry</strong> took effect, that is, the time when jerry was created.<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001330488816__screen14753145072611"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span>
<span class="normal"> 2</span>
@ -39,14 +38,12 @@
<span class="w"> </span><span class="n">jerry</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">457386</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">f</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">f</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">f</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">f</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="o">********</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">2022</span><span class="o">-</span><span class="mi">05</span><span class="o">-</span><span class="mi">19</span><span class="w"> </span><span class="mi">10</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">56</span><span class="o">+</span><span class="mi">08</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">default_pool</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="o">|</span>
<span class="p">(</span><span class="mi">5</span><span class="w"> </span><span class="k">rows</span><span class="p">)</span>
</pre></div></td></tr></table></div>
</div>
</div>
<p id="EN-US_TOPIC_0000001330488816__p717694785314"><strong id="EN-US_TOPIC_0000001330488816__b34675507054327">Method 2:</strong></p>
<p id="EN-US_TOPIC_0000001330488816__p16477115125313">Check the <strong id="EN-US_TOPIC_0000001330488816__b191088079854327">passwordtime</strong> column in the <strong id="EN-US_TOPIC_0000001330488816__b7776943636">PG_AUTH_HISTORY</strong> system catalog. This column indicates the time when the user's initial password was created. Only users with system administrator permissions can access the catalog.</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001330488816__screen1733232194519"><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">SELECT</span><span class="w"> </span><span class="n">roloid</span><span class="p">,</span><span class="w"> </span><span class="k">min</span><span class="p">(</span><span class="n">passwordtime</span><span class="p">)</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">create_time</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">pg_auth_history</span><span class="w"> </span><span class="k">group</span><span class="w"> </span><span class="k">by</span><span class="w"> </span><span class="n">roloid</span><span class="w"> </span><span class="k">order</span><span class="w"> </span><span class="k">by</span><span class="w"> </span><span class="n">roloid</span><span class="p">;</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001330488816__p129615871811">The following is an example:</p>
<p id="EN-US_TOPIC_0000001330488816__p124811514103917">Query the <strong id="EN-US_TOPIC_0000001330488816__b26063109054327">PG_USER</strong> view to obtain the OID of user <strong id="EN-US_TOPIC_0000001330488816__b201096321554327">jerry</strong>, which is <strong id="EN-US_TOPIC_0000001330488816__b108365985854327">457386</strong>. Query the <strong id="EN-US_TOPIC_0000001330488816__b90970311854327">passwordtime</strong> column to obtain the creation time of user <strong id="EN-US_TOPIC_0000001330488816__b212502585754327">jerry</strong>, which is <strong id="EN-US_TOPIC_0000001330488816__b186310969454327">2022-05-19 10:31:56</strong>.</p>
@ -68,7 +65,6 @@
<span class="w"> </span><span class="mi">457386</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="mi">2022</span><span class="o">-</span><span class="mi">05</span><span class="o">-</span><span class="mi">19</span><span class="w"> </span><span class="mi">10</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">56</span><span class="p">.</span><span class="mi">037706</span><span class="o">+</span><span class="mi">08</span>
<span class="p">(</span><span class="mi">5</span><span class="w"> </span><span class="k">rows</span><span class="p">)</span>
</pre></div></td></tr></table></div>
</div>
</div>
<div>

View File

@ -3,7 +3,7 @@
<h1 class="topictitle1">Why Is SQL Execution Slow After Long GaussDB(DWS) Usage?</h1>
<div id="body0000001330329176"><p id="EN-US_TOPIC_0000001330329176__en-us_topic_0000001145816583_p45396318595">After a database is used for a period of time, the table data increases as services grow, or the table data is frequently added, deleted, or modified. As a result, bloating tables and inaccurate statistics are incurred, deteriorating database performance.</p>
<p id="EN-US_TOPIC_0000001330329176__en-us_topic_0000001145816583_p8060118">You are advised to periodically run <strong id="EN-US_TOPIC_0000001330329176__b94348218993213">VACUUM FULL</strong> and <strong id="EN-US_TOPIC_0000001330329176__b13780791893213">ANALYZE</strong> on tables that are frequently added, deleted, or modified. Perform the following operations:</p>
<ol id="EN-US_TOPIC_0000001330329176__en-us_topic_0000001145816583_ol349260184"><li id="EN-US_TOPIC_0000001330329176__en-us_topic_0000001145816583_li154916111817"><span>By default, 100 out of 30,000 records of statistics are collected. When a large amount of data is involved, the SQL execution is unstable, which may be caused by a changed execution plan. In this case, the sampling rate needs to be adjusted for statistics. You can run <strong id="EN-US_TOPIC_0000001330329176__b44705822493213">set default_statistics_target</strong> to increase the sampling rate, which helps the optimizer generate the optimal plan.</span><p><p id="EN-US_TOPIC_0000001330329176__en-us_topic_0000001145816583_p817743916198"><span><img id="EN-US_TOPIC_0000001330329176__en-us_topic_0000001145816583_image11771439181918" src="figure/en-us_image_0000001381728713.png"></span></p>
<ol id="EN-US_TOPIC_0000001330329176__en-us_topic_0000001145816583_ol349260184"><li id="EN-US_TOPIC_0000001330329176__en-us_topic_0000001145816583_li154916111817"><span>By default, 100 out of 30,000 records of statistics are collected. When a large amount of data is involved, the SQL execution is unstable, which may be caused by a changed execution plan. In this case, the sampling rate needs to be adjusted for statistics. You can run <strong id="EN-US_TOPIC_0000001330329176__b577124319469">set default_statistics_target</strong> to increase the sampling rate, which helps the optimizer generate the optimal plan.</span><p><p id="EN-US_TOPIC_0000001330329176__en-us_topic_0000001145816583_p817743916198"><span><img id="EN-US_TOPIC_0000001330329176__en-us_topic_0000001145816583_image11771439181918" src="figure/en-us_image_0000001381728713.png"></span></p>
</p></li><li id="EN-US_TOPIC_0000001330329176__en-us_topic_0000001145816583_li17492061187"><span>Run <strong id="EN-US_TOPIC_0000001330329176__b15295135992012">ANALYZE</strong> again. For details, see "ANALYZE | ANALYSE" in the <em id="EN-US_TOPIC_0000001330329176__i117040684893213">Developer Guide</em>.</span><p><p id="EN-US_TOPIC_0000001330329176__en-us_topic_0000001145816583_p7111105992314"><span><img id="EN-US_TOPIC_0000001330329176__en-us_topic_0000001145816583_image111135942313" src="figure/en-us_image_0000001381889321.png"></span></p>
</p></li></ol>
<div class="note" id="EN-US_TOPIC_0000001330329176__en-us_topic_0000001145816583_note5791915164318"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001330329176__en-us_topic_0000001145816583_p202661848124413">To test whether disk fragments affect database performance, use the following function:</p>

View File

@ -1,7 +1,7 @@
<a name="EN-US_TOPIC_0000001381808753"></a><a name="EN-US_TOPIC_0000001381808753"></a>
<h1 class="topictitle1">How Do I Use \Copy to Import and Export Data?</h1>
<div id="body0000001381808753"><p id="EN-US_TOPIC_0000001381808753__en-us_topic_0000001099136620_p8693312111414">GaussDB(DWS) is a fully managed service on the cloud. Users cannot log in to the background to import or export data by using <strong id="EN-US_TOPIC_0000001381808753__b1739155863814">COPY</strong>, so the <strong id="EN-US_TOPIC_0000001381808753__b1473916583383">COPY</strong> syntax is disabled. You are advised to store data files on OBS and use OBS foreign tables to import data. If you want to use <strong id="EN-US_TOPIC_0000001381808753__b116061156153814">COPY</strong> to import and export data, perform the following operations:</p>
<div id="body0000001381808753"><p id="EN-US_TOPIC_0000001381808753__en-us_topic_0000001099136620_p8693312111414">GaussDB(DWS) is a fully managed service on the cloud. Users cannot log in to the background to import or export data by using <strong id="EN-US_TOPIC_0000001381808753__b0717102222814">COPY</strong>, so the <strong id="EN-US_TOPIC_0000001381808753__b1571811221287">COPY</strong> syntax is disabled. You are advised to store data files on OBS and use OBS foreign tables to import data. If you want to use <strong id="EN-US_TOPIC_0000001381808753__b116061156153814">COPY</strong> to import and export data, perform the following operations:</p>
<ol id="EN-US_TOPIC_0000001381808753__en-us_topic_0000001099136620_ol16207174791517"><li id="EN-US_TOPIC_0000001381808753__en-us_topic_0000001099136620_li192071547111510">Place the data file on the client.</li><li id="EN-US_TOPIC_0000001381808753__en-us_topic_0000001099136620_li0208047171518">Use gsql to connect to the target cluster.</li><li id="EN-US_TOPIC_0000001381808753__en-us_topic_0000001099136620_li142088479158">Run the following command to import data. Enter the directory name and file name of the data file on the client and specify the import option in <strong id="EN-US_TOPIC_0000001381808753__b146761412391">with</strong>. The command is almost the same as the common <strong id="EN-US_TOPIC_0000001381808753__b16825410392">COPY</strong> command. You only need to add a backslash (\) before the command. When the data is successfully imported, no notification will be displayed.<pre class="screen" id="EN-US_TOPIC_0000001381808753__en-us_topic_0000001099136620_screen16315251121617">\copy tb_name from '/directory_name/file_name' with(...);</pre>
</li><li id="EN-US_TOPIC_0000001381808753__li1122954181013">Run the following command to export data to a local file. Retain the default settings of parameters.<pre class="screen" id="EN-US_TOPIC_0000001381808753__screen1755661631916">\copy table_name to '/directory_name/file_name';</pre>
</li><li id="EN-US_TOPIC_0000001381808753__li145885397199">Specify the <strong id="EN-US_TOPIC_0000001381808753__b8541141143912">copy_option</strong> parameter to export data to a CSV file.<pre class="screen" id="EN-US_TOPIC_0000001381808753__screen46282255205">\copy table_name to '/directory_name/file_name' CSV;</pre>

View File

@ -1,7 +1,7 @@
<a name="EN-US_TOPIC_0000001330648780"></a><a name="EN-US_TOPIC_0000001330648780"></a>
<h1 class="topictitle1">How Do I Import GaussDB(DWS)/Oracle/MySQL/SQL Server Data to GaussDB(DWS) (Whole Database Migration)?</h1>
<div id="body0000001330648780"><p id="EN-US_TOPIC_0000001330648780__en-us_topic_0000001145496655_p8060118">Heterogeneous data can be imported to GaussDB(DWS) using CDM. You can migrate an entire Oracle, MySQL, SQL Server, or GaussDB(DWS) database to a GaussDB(DWS) databse. For details, see section "Creating an Entire Database Migration Job" in the <em id="EN-US_TOPIC_0000001330648780__i14571726203220">Cloud Data Migration User Guide</em>.</p>
<div id="body0000001330648780"><p id="EN-US_TOPIC_0000001330648780__en-us_topic_0000001145496655_p8060118">Heterogeneous data can be imported to GaussDB(DWS) using CDM. You can migrate an entire Oracle, MySQL, SQL Server, or GaussDB(DWS) database to a GaussDB(DWS) database. For details, see section "DataArts Migration" in the <em id="EN-US_TOPIC_0000001330648780__i14571726203220">DataArts Studio User Guide</em>.</p>
<p id="EN-US_TOPIC_0000001330648780__en-us_topic_0000001145496655_p14283311440">You can also store data to OBS and then dump the data to GaussDB(DWS). For details, see section "About Parallel Data Import from OBS" in the <em id="EN-US_TOPIC_0000001330648780__i3395154213371">Data Warehouse Service (DWS) Developer Guide</em>.</p>
</div>
<div>

View File

@ -7,7 +7,6 @@
<span class="normal">2</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">postgres</span><span class="o">=&gt;</span><span class="w"> </span><span class="k">CREATE</span><span class="w"> </span><span class="k">DATABASE</span><span class="w"> </span><span class="n">A</span><span class="w"> </span><span class="k">ENCODING</span><span class="w"> </span><span class="s1">'UTF8'</span><span class="w"> </span><span class="k">template</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">template0</span><span class="p">;</span>
<span class="n">postgres</span><span class="o">=&gt;</span><span class="w"> </span><span class="k">CREATE</span><span class="w"> </span><span class="k">DATABASE</span><span class="w"> </span><span class="n">B</span><span class="w"> </span><span class="k">ENCODING</span><span class="w"> </span><span class="s1">'GBK'</span><span class="w"> </span><span class="k">template</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">template0</span><span class="p">;</span>
</pre></div></td></tr></table></div>
</div>
</p></li><li id="EN-US_TOPIC_0000001587507168__li1780012818458"><span>View the database list. You can view the created databases A and B.</span><p><div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001587507168__screen20136125420587"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span>
<span class="normal"> 2</span>
@ -37,7 +36,6 @@
<span class="w"> </span><span class="n">xiaodi</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">dbadmin</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">UTF8</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="k">C</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="k">C</span><span class="w"> </span><span class="o">|</span>
<span class="p">(</span><span class="mi">7</span><span class="w"> </span><span class="k">rows</span><span class="p">)</span>
</pre></div></td></tr></table></div>
</div>
</p></li><li id="EN-US_TOPIC_0000001587507168__li144051715134219"><span>Switch to database A and enter the user password. Create a table named <strong id="EN-US_TOPIC_0000001587507168__b156951417121516">test01</strong> and insert data into the table.</span><p><div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001587507168__screen153566567118"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span>
<span class="normal"> 2</span>
@ -77,11 +75,9 @@
<span class="n">a</span><span class="o">=&gt;</span><span class="w"> </span><span class="k">INSERT</span><span class="w"> </span><span class="k">INTO</span><span class="w"> </span><span class="n">test01</span><span class="w"> </span><span class="k">VALUES</span><span class="w"> </span><span class="p">(</span><span class="mi">456</span><span class="p">,</span><span class="w"> </span><span class="s1">'good'</span><span class="p">);</span>
<span class="k">INSERT</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="mi">1</span>
</pre></div></td></tr></table></div>
</div>
</p></li><li id="EN-US_TOPIC_0000001587507168__li156031819487"><span>Run the <strong id="EN-US_TOPIC_0000001587507168__b137012418155">\COPY</strong> command to export data from the UTF8 library in Unicode format to the <strong id="EN-US_TOPIC_0000001587507168__b1481710171613">test01.dat</strong> file.</span><p><div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001587507168__screen14919185561019"><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="err">\</span><span class="k">copy</span><span class="w"> </span><span class="n">test01</span><span class="w"> </span><span class="k">to</span><span class="w"> </span><span class="s1">'/opt/test01.dat'</span><span class="w"> </span><span class="k">with</span><span class="w"> </span><span class="p">(</span><span class="k">ENCODING</span><span class="w"> </span><span class="s1">'Unicode'</span><span class="p">);</span>
</pre></div></td></tr></table></div>
</div>
</p></li><li id="EN-US_TOPIC_0000001587507168__li189224428473"><span>Switch to database B and create a table with the same name <strong id="EN-US_TOPIC_0000001587507168__b761113941610">test01</strong>.</span><p><div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001587507168__screen243222819576"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span>
<span class="normal"> 2</span>
@ -111,13 +107,11 @@
<span class="w"> </span><span class="k">with</span><span class="w"> </span><span class="p">(</span><span class="n">orientation</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">column</span><span class="p">,</span><span class="n">compression</span><span class="o">=</span><span class="n">middle</span><span class="p">)</span>
<span class="w"> </span><span class="n">distribute</span><span class="w"> </span><span class="k">by</span><span class="w"> </span><span class="n">hash</span><span class="w"> </span><span class="p">(</span><span class="n">c_last_name</span><span class="p">);</span>
</pre></div></td></tr></table></div>
</div>
</p></li><li id="EN-US_TOPIC_0000001587507168__li1462365991"><span>Run the <strong id="EN-US_TOPIC_0000001587507168__b8698719141610">\COPY</strong> command to import the <strong id="EN-US_TOPIC_0000001587507168__b1312342310165">test01.dat</strong> file to database B.</span><p><div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001587507168__screen1059253316165"><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="err">\</span><span class="k">copy</span><span class="w"> </span><span class="n">test01</span><span class="w"> </span><span class="k">from</span><span class="w"> </span><span class="s1">'/opt/test01.dat'</span><span class="w"> </span><span class="k">with</span><span class="w"> </span><span class="p">(</span><span class="k">ENCODING</span><span class="w"> </span><span class="s1">'Unicode'</span><span class="w"> </span><span class="p">,</span><span class="n">COMPATIBLE_ILLEGAL_CHARS</span><span class="w"> </span><span class="s1">'true'</span><span class="p">);</span>
</pre></div></td></tr></table></div>
</div>
<div class="note" id="EN-US_TOPIC_0000001587507168__note1978762612178"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="EN-US_TOPIC_0000001587507168__ul315283421920"><li id="EN-US_TOPIC_0000001587507168__li14153334171911">The error tolerance parameter <strong id="EN-US_TOPIC_0000001587507168__b19208103912164">COMPATIBLE_ILLEGAL_CHARS</strong> specifies that invalid characters are tolerated during data import. Invalid characters are converted and then imported to the database. No error message is displayed. The import is not interrupted.</li><li id="EN-US_TOPIC_0000001587507168__li15153143451916">The BINARY format is not supported. When data of such format is imported, error "cannot specify bulkload compatibility options in BINARY mode" will occur.</li><li id="EN-US_TOPIC_0000001587507168__li415353471918">The parameter is valid only for data importing using the <strong id="EN-US_TOPIC_0000001587507168__b175737073433332">COPY FROM</strong> option.</li></ul>
<div class="note" id="EN-US_TOPIC_0000001587507168__note1978762612178"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="EN-US_TOPIC_0000001587507168__ul315283421920"><li id="EN-US_TOPIC_0000001587507168__li14153334171911">The error tolerance parameter <strong id="EN-US_TOPIC_0000001587507168__b146618188461">COMPATIBLE_ILLEGAL_CHARS</strong> specifies that invalid characters are tolerated during data import. Invalid characters are converted and then imported to the database. No error message is displayed. The import is not interrupted.</li><li id="EN-US_TOPIC_0000001587507168__li15153143451916">The BINARY format is not supported. When data of such format is imported, error "cannot specify bulkload compatibility options in BINARY mode" will occur.</li><li id="EN-US_TOPIC_0000001587507168__li415353471918">The parameter is valid only for data importing using the <strong id="EN-US_TOPIC_0000001587507168__b175737073433332">COPY FROM</strong> option.</li></ul>
</div></div>
</p></li><li id="EN-US_TOPIC_0000001587507168__li1850128194916"><span>View data in the <strong id="EN-US_TOPIC_0000001587507168__b380110451820">test01</strong> table in database B.</span><p><div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001587507168__screen954813169553"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span>
@ -131,7 +125,6 @@
<span class="w"> </span><span class="mi">456</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">good</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="o">|</span>
<span class="p">(</span><span class="mi">2</span><span class="w"> </span><span class="k">rows</span><span class="p">)</span>
</pre></div></td></tr></table></div>
</div>
</p></li><li id="EN-US_TOPIC_0000001587507168__li444681515147"><span>After the preceding operations are performed, data is imported from database A (UTF8) to database B (GBK).</span></li></ol>
</div>

View File

@ -12,7 +12,6 @@
<span class="w"> </span><span class="n">UTF8</span>
<span class="p">(</span><span class="mi">1</span><span class="w"> </span><span class="k">row</span><span class="p">)</span>
</pre></div></td></tr></table></div>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000001330648788__section19744558153214"><h4 class="sectiontitle">Setting the Database Character Encoding</h4><div class="note" id="EN-US_TOPIC_0000001330648788__note4463609433"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001330648788__p5501119194317">GaussDB(DWS) does not support the modification of the character encoding format of a created database.</p>
@ -35,7 +34,6 @@
<span class="w"> </span><span class="p">[</span><span class="w"> </span><span class="n">DBCOMPATIBILITY</span><span class="w"> </span><span class="p">[</span><span class="o">=</span><span class="p">]</span><span class="w"> </span><span class="n">compatibility_type</span><span class="w"> </span><span class="p">]</span><span class="w"> </span><span class="o">|</span>
<span class="w"> </span><span class="p">[</span><span class="w"> </span><span class="k">CONNECTION</span><span class="w"> </span><span class="k">LIMIT</span><span class="w"> </span><span class="p">[</span><span class="o">=</span><span class="p">]</span><span class="w"> </span><span class="n">connlimit</span><span class="w"> </span><span class="p">]</span><span class="err">}</span><span class="p">[...]</span><span class="w"> </span><span class="p">];</span>
</pre></div></td></tr></table></div>
</div>
</div>
<ul id="EN-US_TOPIC_0000001330648788__en-us_topic_0000001145696599_ul58571536134310"><li id="EN-US_TOPIC_0000001330648788__en-us_topic_0000001145696599_lb2c788c82bd34ab7839d3d54705057ba"><strong id="EN-US_TOPIC_0000001330648788__en-us_topic_0000001145696599_a3b85024a395b4b9399bddda7a86b4805">TEMPLATE [ = ] template</strong><p id="EN-US_TOPIC_0000001330648788__en-us_topic_0000001145696599_ab8f8638183ec445eae1009bcb5f46697">Indicates the template name, that is, the name of the template to be used to create the database. GaussDB(DWS) creates a database by copying a database template. GaussDB(DWS) has two initial template databases <strong id="EN-US_TOPIC_0000001330648788__b107776746194125">template0</strong> and <strong id="EN-US_TOPIC_0000001330648788__b111655962294125">template1</strong> and a default user database <strong id="EN-US_TOPIC_0000001330648788__b88187811194125"><span id="EN-US_TOPIC_0000001330648788__en-us_topic_0000001145696599_text16946141520539">postgres</span></strong>.</p>
@ -51,7 +49,6 @@
<div class="section" id="EN-US_TOPIC_0000001330648788__en-us_topic_0000001145696599_section5721112004420"><h4 class="sectiontitle">Examples</h4><p id="EN-US_TOPIC_0000001330648788__en-us_topic_0000001145696599_p13794175964018">Create database <strong id="EN-US_TOPIC_0000001330648788__b166189273294125">music</strong> using UTF8 (the local encoding type is also UTF8).</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001330648788__en-us_topic_0000001145696599_screen10691333124413"><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">CREATE</span><span class="w"> </span><span class="k">DATABASE</span><span class="w"> </span><span class="n">music</span><span class="w"> </span><span class="k">ENCODING</span><span class="w"> </span><span class="s1">'UTF8'</span><span class="w"> </span><span class="k">template</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">template0</span><span class="p">;</span>
</pre></div></td></tr></table></div>
</div>
</div>
</div>

View File

@ -11,17 +11,14 @@
</div>
<div class="section" id="EN-US_TOPIC_0000001381609405__en-us_topic_0000001145896685_section18367856124816"><h4 class="sectiontitle">Examples</h4><ul id="EN-US_TOPIC_0000001381609405__ul205026173326"><li id="EN-US_TOPIC_0000001381609405__li550271719329">Create a table.<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001381609405__screen3228415133620"><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">CREATE</span><span class="w"> </span><span class="k">TABLE</span><span class="w"> </span><span class="n">tpcds</span><span class="p">.</span><span class="n">reason_t1</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="k">TABLE</span><span class="w"> </span><span class="n">tpcds</span><span class="p">.</span><span class="n">reason</span><span class="p">;</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001381609405__p19899173120313">Truncate the table.</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001381609405__screen353224918385"><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">TRUNCATE</span><span class="w"> </span><span class="k">TABLE</span><span class="w"> </span><span class="n">tpcds</span><span class="p">.</span><span class="n">reason_t1</span><span class="p">;</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001381609405__p15899173114319">Delete the table.</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001381609405__screen5911145333820"><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">DROP</span><span class="w"> </span><span class="k">TABLE</span><span class="w"> </span><span class="n">tpcds</span><span class="p">.</span><span class="n">reason_t1</span><span class="p">;</span>
</pre></div></td></tr></table></div>
</div>
</li></ul>
<ul id="EN-US_TOPIC_0000001381609405__ul17718835133217"><li id="EN-US_TOPIC_0000001381609405__li17187357326">Create a partitioned table.<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001381609405__screen554617395"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span>
@ -50,32 +47,26 @@
<span class="w"> </span><span class="n">partition</span><span class="w"> </span><span class="n">p_45_after</span><span class="w"> </span><span class="k">values</span><span class="w"> </span><span class="k">less</span><span class="w"> </span><span class="k">than</span><span class="w"> </span><span class="p">(</span><span class="k">MAXVALUE</span><span class="p">)</span>
<span class="p">);</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001381609405__p08691349113111">Insert data.</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001381609405__screen1235451017396"><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">INSERT</span><span class="w"> </span><span class="k">INTO</span><span class="w"> </span><span class="n">tpcds</span><span class="p">.</span><span class="n">reason_p</span><span class="w"> </span><span class="k">SELECT</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">tpcds</span><span class="p">.</span><span class="n">reason</span><span class="p">;</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001381609405__p14869549193114">Truncate the <strong id="EN-US_TOPIC_0000001381609405__b76097389565040">p_05_before</strong> partition.</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001381609405__screen19200131403919"><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">ALTER</span><span class="w"> </span><span class="k">TABLE</span><span class="w"> </span><span class="n">tpcds</span><span class="p">.</span><span class="n">reason_p</span><span class="w"> </span><span class="k">TRUNCATE</span><span class="w"> </span><span class="n">PARTITION</span><span class="w"> </span><span class="n">p_05_before</span><span class="p">;</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001381609405__p1786919498311">Truncate the partition <strong id="EN-US_TOPIC_0000001381609405__b752707011">p_15</strong> where 13 is located.</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001381609405__screen18945017153919"><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">ALTER</span><span class="w"> </span><span class="k">TABLE</span><span class="w"> </span><span class="n">tpcds</span><span class="p">.</span><span class="n">reason_p</span><span class="w"> </span><span class="k">TRUNCATE</span><span class="w"> </span><span class="n">PARTITION</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="mi">13</span><span class="p">);</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001381609405__p18868184983111">Truncate the partitioned table.</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001381609405__screen18698921183919"><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">TRUNCATE</span><span class="w"> </span><span class="k">TABLE</span><span class="w"> </span><span class="n">tpcds</span><span class="p">.</span><span class="n">reason_p</span><span class="p">;</span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001381609405__p17868154943112">Delete the table.</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001381609405__screen7246826183910"><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">DROP</span><span class="w"> </span><span class="k">TABLE</span><span class="w"> </span><span class="n">tpcds</span><span class="p">.</span><span class="n">reason_p</span><span class="p">;</span>
</pre></div></td></tr></table></div>
</div>
</li></ul>
</div>

View File

@ -13,7 +13,7 @@
<p id="EN-US_TOPIC_0000001330488844__p79046102575">Perform <strong id="EN-US_TOPIC_0000001330488844__b15673193584614">VACUUM FULL</strong> on a table.</p>
<pre class="screen" id="EN-US_TOPIC_0000001330488844__screen1750125618556">VACUUM FULL <em id="EN-US_TOPIC_0000001330488844__i726144945717">table_name</em>;</pre>
<p id="EN-US_TOPIC_0000001330488844__en-us_topic_0000001145816511_p98619201484">For details, see sections "VACUUM" and "ANALYZE | ANALYSE" in the <em id="EN-US_TOPIC_0000001330488844__i61294906394111">Developer Guide</em>.</p>
<div class="note" id="EN-US_TOPIC_0000001330488844__en-us_topic_0000001145816511_note548518259111"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="EN-US_TOPIC_0000001330488844__ul8406258114710"><li id="EN-US_TOPIC_0000001330488844__li1340614581472">If the physical space usage does not decrease after you run the <strong id="EN-US_TOPIC_0000001330488844__b44032246994111">VACUUM FULL</strong> command, check whether there were other active transactions (started before you delete data transactions and not ended before you run <strong id="EN-US_TOPIC_0000001330488844__b147560510494111">VACUUM FULL</strong>). If yes, run this command again when the transactions have finished.</li><li id="EN-US_TOPIC_0000001330488844__li154061958124716">In version 8.1.3 or later, <strong id="EN-US_TOPIC_0000001330488844__b134751747142213">VACUUM</strong>/<strong id="EN-US_TOPIC_0000001330488844__b144345016220">VACUUM FULL</strong> can be invoked on the management plane. For details, see "Intelligent O&amp;M" in the <em id="EN-US_TOPIC_0000001330488844__i17191104814290">Data Warehouse Service (DWS) User Guide</em>.</li></ul>
<div class="note" id="EN-US_TOPIC_0000001330488844__en-us_topic_0000001145816511_note548518259111"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="EN-US_TOPIC_0000001330488844__ul8406258114710"><li id="EN-US_TOPIC_0000001330488844__li1340614581472">If the physical space usage does not decrease after you run the <strong id="EN-US_TOPIC_0000001330488844__b189066314191">VACUUM FULL</strong> command, check whether there were other active transactions (started before you delete data transactions and not ended before you run <strong id="EN-US_TOPIC_0000001330488844__b14907163114194">VACUUM FULL</strong>). If yes, run this command again when the transactions have finished.</li><li id="EN-US_TOPIC_0000001330488844__li154061958124716">In version 8.1.3 or later, <strong id="EN-US_TOPIC_0000001330488844__b134751747142213">VACUUM</strong>/<strong id="EN-US_TOPIC_0000001330488844__b144345016220">VACUUM FULL</strong> can be invoked on the management plane. For details, see "Intelligent O&amp;M" in the <em id="EN-US_TOPIC_0000001330488844__i17191104814290">Data Warehouse Service (DWS) User Guide</em>.</li></ul>
</div></div>
</div>
<div class="section" id="EN-US_TOPIC_0000001330488844__section6930204215810"><a name="EN-US_TOPIC_0000001330488844__section6930204215810"></a><a name="section6930204215810"></a><h4 class="sectiontitle">VACUUM and VACUUM FULL</h4><p id="EN-US_TOPIC_0000001330488844__p1531563518183">In GaussDB(DWS), the <strong id="EN-US_TOPIC_0000001330488844__b9736183304810">VACUUM</strong> operation is like a vacuum cleaner used to absorb dust. Here, "dust" means old data. If the data is not cleared in a timely manner, more database space will be used to store such data, causing performance downgrade or even a system breakdown.</p>

Some files were not shown because too many files have changed in this diff Show More