blob: d6455aeeaf3b5c40b76a7d91f15b7743f2465c02 [file]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="copyright" content="(C) Copyright 2025" />
<meta name="DC.rights.owner" content="(C) Copyright 2025" />
<meta name="DC.Type" content="concept" />
<meta name="DC.Title" content="ALTER DATABASE Statement" />
<meta name="DC.Relation" scheme="URI" content="../topics/impala_langref_sql.html" />
<meta name="prodname" content="Impala" />
<meta name="version" content="Impala 3.4.x" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="alter_database" />
<link rel="stylesheet" type="text/css" href="../commonltr.css" />
<title>ALTER DATABASE Statement</title>
</head>
<body id="alter_database">
<h1 class="title topictitle1" id="ariaid-title1">ALTER DATABASE Statement</h1>
<div class="body conbody">
<p class="p">
The <code class="ph codeph">ALTER DATABASE</code> statement changes the characteristics of a database.
</p>
<p class="p">
Use the <code class="ph codeph">SET OWNER</code> clause to transfer the ownership of the database from
the current owner to another user or a role.
</p>
<p class="p">
The database owner is originally set to the user who creates the database. The term
<code class="ph codeph">OWNER</code> is used to differentiate between the <code class="ph codeph">ALL</code>
privilege that is explicitly granted via the <code class="ph codeph">GRANT</code> statement
and a privilege that is implicitly granted by the <code class="ph codeph">CREATE DATABASE</code>
statement.
</p>
<p class="p">
<strong class="ph b">Syntax:</strong>
</p>
<pre class="pre codeblock"><code>
ALTER DATABASE <var class="keyword varname">database_name</var> SET OWNER USER user_name;
</code></pre>
<p class="p">
<strong class="ph b">Statement type:</strong> DDL
</p>
<p class="p">
<strong class="ph b">Cancellation:</strong> Cannot be cancelled.
</p>
<p class="p">
<strong class="ph b">Added in:</strong> <span class="keyword">Impala 3.1</span>
</p>
</div>
<div class="related-links">
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a class="link" href="../topics/impala_langref_sql.html">Impala SQL Statements</a></div>
</div>
</div></body>
</html>