<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:10:38 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[SERVER-6057] can&apos;t remove ill formed database</title>
                <link>https://jira.mongodb.org/browse/SERVER-6057</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;if you create ill-named database (such as &quot;admin sha&quot; or &quot;*&quot;) you can&apos;t rmeove them.&lt;/p&gt;

&lt;p&gt;How to do it : &lt;br/&gt;
use admin sha&lt;br/&gt;
db.dropDatabase()&lt;/p&gt;

&lt;p&gt;you get : &lt;br/&gt;
&quot;errmsg&quot; : &quot;&lt;/p&gt;
{ assertion: \&quot;invalid db name: admin sha\&quot;, assertionCode: 13280, errmsg: \&quot;db assertion failure\&quot;, ok: 0.0 }
&lt;p&gt;&quot;&lt;/p&gt;

&lt;p&gt;if you try to remove it with a command : &lt;br/&gt;
db.runCommand(&lt;/p&gt;
{dropDatabase : &quot;admin sha&quot;}
&lt;p&gt;)&lt;/p&gt;
{ &quot;ok&quot; : 0, &quot;errmsg&quot; : &quot;invalid params&quot; }

&lt;p&gt;Creating such ill-named database should be forbidden (spaces in the name) but it should be possible to remove them.&lt;/p&gt;</description>
                <environment></environment>
        <key id="40940">SERVER-6057</key>
            <summary>can&apos;t remove ill formed database</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="4">Incomplete</resolution>
                                        <assignee username="matt.dannenberg">Matt Dannenberg</assignee>
                                    <reporter username="kamaradclimber">Gr&#233;goire Seux</reporter>
                        <labels>
                    </labels>
                <created>Mon, 11 Jun 2012 09:19:16 +0000</created>
                <updated>Wed, 15 Aug 2012 14:24:15 +0000</updated>
                            <resolved>Mon, 18 Jun 2012 20:50:25 +0000</resolved>
                                    <version>2.0.4</version>
                                                    <component>Admin</component>
                    <component>Shell</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="133825" author="kamaradclimber" created="Mon, 18 Jun 2012 07:29:45 +0000"  >&lt;p&gt;ok, thanks&lt;br/&gt;
of course, since this is a production environment, this is not easy to shutdown a whole shard at a time &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="133346" author="mattd@10gen.com" created="Fri, 15 Jun 2012 16:09:48 +0000"  >&lt;p&gt;Yes I took the following steps and it should work for you as well. &lt;/p&gt;

&lt;p&gt;I shut down the shards one at a time, removed the files from the data directory, and started the shards back up. Once I had done this to each shard, I connected to mongos and removed the entry for this database from the config.collections collection. &lt;/p&gt;</comment>
                            <comment id="133270" author="kamaradclimber" created="Fri, 15 Jun 2012 13:43:53 +0000"  >&lt;p&gt;Ok thanks.&lt;br/&gt;
This is difficult to do this in a replicated and shardedenvironment, but I guess I can shutdown, remove files and restart servers one at a time.&lt;br/&gt;
The only thing then is to remove the entry from the config db (which lies on 3 instances), can I make it from the mongoS ?&lt;/p&gt;</comment>
                            <comment id="131752" author="mattd@10gen.com" created="Wed, 13 Jun 2012 14:04:14 +0000"  >&lt;p&gt;The workaround for dropping such a database would be to delete the db files and ns file (while the server is shutdown of course).&lt;/p&gt;</comment>
                            <comment id="131528" author="kamaradclimber" created="Wed, 13 Jun 2012 06:45:51 +0000"  >&lt;p&gt;first I typed : &lt;br/&gt;
use admin test&lt;/p&gt;

&lt;p&gt;then I typed : &lt;br/&gt;
db.printShardingStatus()&lt;br/&gt;
and I have seen the database called &apos;admin test&apos; appear&lt;/p&gt;</comment>
                            <comment id="131356" author="mattd@10gen.com" created="Tue, 12 Jun 2012 22:40:08 +0000"  >&lt;p&gt;I am not sure if I followed what you posted earlier. Can you please post the exact commands that you used to create an ill formed db?&lt;/p&gt;</comment>
                            <comment id="130813" author="kamaradclimber" created="Tue, 12 Jun 2012 06:48:11 +0000"  >&lt;p&gt;quite easily : &lt;br/&gt;
use admin test&lt;/p&gt;

&lt;p&gt;then type : &lt;br/&gt;
db.printShardingStatus() and you will see it appear.&lt;br/&gt;
However show dbs does not reveal it.&lt;/p&gt;</comment>
                            <comment id="130528" author="dan@10gen.com" created="Mon, 11 Jun 2012 20:24:30 +0000"  >&lt;p&gt;How did you create the &apos;admin sha&apos; db?  I tried a few tricks in the shell and via python, but couldn&apos;t easily make it happen in order to repro.&lt;/p&gt;</comment>
                            <comment id="130313" author="kamaradclimber" created="Mon, 11 Jun 2012 14:48:31 +0000"  >&lt;p&gt;It works for * but not for spaces : &lt;/p&gt;

&lt;p&gt;db.getSiblingDB(&quot;admin sha&quot;).dropDatabase()&lt;br/&gt;
{&lt;br/&gt;
        &quot;ok&quot; : 0,&lt;br/&gt;
        &quot;errmsg&quot; : &quot;&lt;/p&gt;
{ assertion: \&quot;invalid db name: admin sha\&quot;, assertionCode: 13280, errmsg: \&quot;db assertion failure\&quot;, ok: 0.0 }
&lt;p&gt;&quot;&lt;br/&gt;
}&lt;/p&gt;</comment>
                            <comment id="130307" author="ian@10gen.com" created="Mon, 11 Jun 2012 14:40:42 +0000"  >&lt;p&gt;Fix to check for spaces and illegal characters (/\. &quot;*&amp;lt;&amp;gt;:|?) made in v2.1.0&lt;/p&gt;

&lt;p&gt;In order to drop a database you can run:&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;db.getSiblingDB(&quot;*&quot;).dropDatabase()&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="27436">SERVER-4584</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>10.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 11 Jun 2012 14:40:42 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        11 years, 35 weeks, 2 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>ian@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            11 years, 35 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>dan@mongodb.com</customfieldvalue>
            <customfieldvalue>kamaradclimber</customfieldvalue>
            <customfieldvalue>ian@mongodb.com</customfieldvalue>
            <customfieldvalue>matt.dannenberg</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hro0fj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrir73:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>23059</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|ht08bb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>