<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Not able to drop database in hive in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Not-able-to-drop-database-in-hive/m-p/156607#M119024</link>
    <description>&lt;P&gt;I can see two functions are present in database but when I am trying to drop them, those are not getting delete. &lt;/P&gt;&lt;P&gt;hive&amp;gt; drop function prashant_db.getevent;&lt;/P&gt;&lt;P&gt;OK&lt;/P&gt;&lt;P&gt;Time taken: 0.009 seconds&lt;/P&gt;&lt;P&gt;hive&amp;gt; show functions&lt;/P&gt;&lt;P&gt;    &amp;gt; ;&lt;/P&gt;&lt;P&gt;OK&lt;/P&gt;&lt;P&gt;!&lt;/P&gt;&lt;P&gt;!=&lt;/P&gt;&lt;P&gt;%&lt;/P&gt;&lt;P&gt;&amp;amp;&lt;/P&gt;&lt;P&gt;prashant_db.getevent&lt;/P&gt;&lt;P&gt;prashant_db.gettheevent&lt;/P&gt;&lt;P&gt;printf&lt;/P&gt;</description>
    <pubDate>Tue, 05 Apr 2016 13:54:29 GMT</pubDate>
    <dc:creator>SK1</dc:creator>
    <dc:date>2016-04-05T13:54:29Z</dc:date>
    <item>
      <title>Not able to drop database in hive</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Not-able-to-drop-database-in-hive/m-p/156606#M119023</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;I am not able to drop database though we do not have any table in that database ?&lt;/P&gt;&lt;P&gt;hive&amp;gt; use prashant_db;&lt;/P&gt;&lt;P&gt;OK&lt;/P&gt;&lt;P&gt;Time taken: 0.221 seconds&lt;/P&gt;&lt;P&gt;hive&amp;gt; drop database prashant_db;&lt;/P&gt;&lt;P&gt;FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. InvalidOperationException(message:Database prashant_db is not empty. One or more functions exist.)&lt;/P&gt;&lt;P&gt;hive&amp;gt; show tables;&lt;/P&gt;&lt;P&gt;OK&lt;/P&gt;&lt;P&gt;Time taken: 0.226 seconds&lt;/P&gt;&lt;P&gt;hive&amp;gt; &lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 10:12:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Not-able-to-drop-database-in-hive/m-p/156606#M119023</guid>
      <dc:creator>SK1</dc:creator>
      <dc:date>2022-09-16T10:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to drop database in hive</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Not-able-to-drop-database-in-hive/m-p/156607#M119024</link>
      <description>&lt;P&gt;I can see two functions are present in database but when I am trying to drop them, those are not getting delete. &lt;/P&gt;&lt;P&gt;hive&amp;gt; drop function prashant_db.getevent;&lt;/P&gt;&lt;P&gt;OK&lt;/P&gt;&lt;P&gt;Time taken: 0.009 seconds&lt;/P&gt;&lt;P&gt;hive&amp;gt; show functions&lt;/P&gt;&lt;P&gt;    &amp;gt; ;&lt;/P&gt;&lt;P&gt;OK&lt;/P&gt;&lt;P&gt;!&lt;/P&gt;&lt;P&gt;!=&lt;/P&gt;&lt;P&gt;%&lt;/P&gt;&lt;P&gt;&amp;amp;&lt;/P&gt;&lt;P&gt;prashant_db.getevent&lt;/P&gt;&lt;P&gt;prashant_db.gettheevent&lt;/P&gt;&lt;P&gt;printf&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2016 13:54:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Not-able-to-drop-database-in-hive/m-p/156607#M119024</guid>
      <dc:creator>SK1</dc:creator>
      <dc:date>2016-04-05T13:54:29Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to drop database in hive</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Not-able-to-drop-database-in-hive/m-p/156608#M119025</link>
      <description>&lt;P&gt;What does he say when you try to drop these functions? Just silent? Anything in the logs? You can also try to use the drop ... cascade command.&lt;/P&gt;&lt;PRE&gt;DROP DATABASE IF EXISTS userdb CASCADE;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Apr 2016 14:36:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Not-able-to-drop-database-in-hive/m-p/156608#M119025</guid>
      <dc:creator>bleonhardi</dc:creator>
      <dc:date>2016-04-05T14:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to drop database in hive</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Not-able-to-drop-database-in-hive/m-p/156609#M119026</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/168/bleonhardi.html" nodeid="168"&gt;@Benjamin Leonhardi&lt;/A&gt;: Thanks a lot for your help. It worked and delete database without any error.&lt;/P&gt;&lt;P&gt;But can you please help me to understand why it was not deleting functions and worked with forced option(cascade) ?&lt;/P&gt;&lt;P&gt;hive&amp;gt; DROP DATABASE IF EXISTS prashant_db CASCADE;&lt;/P&gt;&lt;P&gt;OK&lt;/P&gt;&lt;P&gt;Time taken: 0.345 seconds&lt;/P&gt;&lt;P&gt;hive&amp;gt; show databases;&lt;/P&gt;&lt;P&gt;OK&lt;/P&gt;&lt;P&gt;adotest&lt;/P&gt;&lt;P&gt;afrankli&lt;/P&gt;&lt;P&gt;archive_db&lt;/P&gt;&lt;P&gt;baseline_db&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2016 16:45:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Not-able-to-drop-database-in-hive/m-p/156609#M119026</guid>
      <dc:creator>SK1</dc:creator>
      <dc:date>2016-04-05T16:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to drop database in hive</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Not-able-to-drop-database-in-hive/m-p/156610#M119027</link>
      <description>&lt;P&gt;So Cascade works because he forces the delete of all objects belonging to that object ( similar to delete ... cascade for row deletes ) &lt;/P&gt;&lt;P&gt;Now the question is why your drop function did not work. And I don't know we might have to look into logs to figure that out. But I have seen flakiness with functions in hive before on an older version of hive. So it might be just a bug or a restart required or something. But again without logs hard to say.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2016 17:18:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Not-able-to-drop-database-in-hive/m-p/156610#M119027</guid>
      <dc:creator>bleonhardi</dc:creator>
      <dc:date>2016-04-05T17:18:40Z</dc:date>
    </item>
  </channel>
</rss>

