doc-exports/docs/dws/dev/dws_04_0055.html
Lu, Huayi a24ca60074 DWS DEVELOPER 811 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Lu, Huayi <luhuayi@huawei.com>
Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
2023-01-19 13:37:49 +00:00

24 lines
2.9 KiB
HTML

<a name="EN-US_TOPIC_0000001098814672"></a><a name="EN-US_TOPIC_0000001098814672"></a>
<h1 class="topictitle1">System Administrator</h1>
<div id="body8662426"><p id="EN-US_TOPIC_0000001098814672__ad3bd501facb54ec7b5b5e235ef6a398e">A system administrator is an account with the <strong id="EN-US_TOPIC_0000001098814672__b1722631173520">SYSADMIN</strong> permission. After a cluster is installed, a system administrator has the permissions of all object owners by default.</p>
<p id="EN-US_TOPIC_0000001098814672__a8d3593bc99c94fa0a26216922d49b221">The user <strong id="EN-US_TOPIC_0000001098814672__b132202910109">dbadmin</strong> created upon <span id="EN-US_TOPIC_0000001098814672__text262436061">GaussDB(DWS)</span> startup is a system administrator.</p>
<p id="EN-US_TOPIC_0000001098814672__a4910b68a0fc641e580c5934575c0dcc7">To create a database administrator, connect to the database as an administrator and run the <strong id="EN-US_TOPIC_0000001098814672__b11170121161">CREATE USER</strong> or <strong id="EN-US_TOPIC_0000001098814672__b195017611612">ALTER</strong> statement with <strong id="EN-US_TOPIC_0000001098814672__b7373144774718">SYSADMIN</strong> specified.</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001098814672__s675f356958a54cd7b8454ffd3f38fbcd"><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">sysadmin</span><span class="w"> </span><span class="k">WITH</span><span class="w"> </span><span class="n">SYSADMIN</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="w"></span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001098814672__en-us_topic_0155088780_p163516014463">Alternatively, you can run the following statement:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001098814672__s0ee463ee27f54d56abed1ee963c62a63"><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">USER</span><span class="w"> </span><span class="n">joe</span><span class="w"> </span><span class="n">SYSADMIN</span><span class="p">;</span><span class="w"></span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001098814672__en-us_topic_0155088780_p135187482336">To run the <strong id="EN-US_TOPIC_0000001098814672__b186389213493">ALTER USER</strong> statement, the user must exist.</p>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_04_0053.html">Managing Users and Their Permissions</a></div>
</div>
</div>