<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="drop-resource-group">
      </a>
      15.7.2.3 DROP RESOURCE GROUP Statement
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045172765920">
  </a>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa49152348"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">DROP</span> <span class="token keyword">RESOURCE</span> <span class="token keyword">GROUP</span> <em class="replaceable">group_name</em> <span class="token punctuation">[</span><span class="token keyword">FORCE</span><span class="token punctuation">]</span></code></pre>
  </div>
  <p>
   <a class="link" href="drop-resource-group.html" title="15.7.2.3 DROP RESOURCE GROUP Statement">
    <code class="literal">
     DROP RESOURCE GROUP
    </code>
   </a>
   is used for
        resource group management (see
   <a class="xref" href="resource-groups.html" title="7.1.16 Resource Groups">
    Section 7.1.16, “Resource Groups”
   </a>
   ). This statement drops a
        resource group. It requires the
   <a class="link" href="privileges-provided.html#priv_resource-group-admin">
    <code class="literal">
     RESOURCE_GROUP_ADMIN
    </code>
   </a>
   privilege.
  </p>
  <p>
   <em class="replaceable">
    <code>
     group_name
    </code>
   </em>
   identifies which resource
        group to drop. If the group does not exist, an error occurs.
  </p>
  <p>
   The
   <code class="literal">
    FORCE
   </code>
   modifier determines statement
        behavior if the resource group has any threads assigned to it:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      If
      <code class="literal">
       FORCE
      </code>
      is not given and any threads are
            assigned to the group, an error occurs.
     </p>
    </li>
    <li class="listitem">
     <p>
      If
      <code class="literal">
       FORCE
      </code>
      is given, existing threads in
            the group are moved to their respective default group
            (system threads to
      <code class="literal">
       SYS_default
      </code>
      , user
            threads to
      <code class="literal">
       USR_default
      </code>
      ).
     </p>
    </li>
   </ul>
  </div>
  <p>
   Examples:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      Drop a group, failing if the group contains any threads:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa16796535"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">DROP</span> <span class="token keyword">RESOURCE</span> <span class="token keyword">GROUP</span> rg1<span class="token punctuation">;</span></code></pre>
     </div>
    </li>
    <li class="listitem">
     <p>
      Drop a group and move existing threads to the default
            groups:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa8926896"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">DROP</span> <span class="token keyword">RESOURCE</span> <span class="token keyword">GROUP</span> rg2 <span class="token keyword">FORCE</span><span class="token punctuation">;</span></code></pre>
     </div>
    </li>
   </ul>
  </div>
  <p>
   Resource group management is local to the server on which it
        occurs.
   <a class="link" href="drop-resource-group.html" title="15.7.2.3 DROP RESOURCE GROUP Statement">
    <code class="literal">
     DROP RESOURCE GROUP
    </code>
   </a>
   statements are not written to the binary log and are not
        replicated.
  </p>
 </div>
 <br/>
</div>
