# renameCollection does not work in Document Layer

**URL:** <https://forums.foundationdb.org/t/renamecollection-does-not-work-in-document-layer/1179>\
**Category:** Document Layer\
**Created:** [February 23, 2019, 12:10am UTC](https://forums.foundationdb.org/t/renamecollection-does-not-work-in-document-layer/1179 "2019-02-23T00:10:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vaggarwal](https://avatars.discourse-cdn.com/v4/letter/v/b3f665/32.png) [@vaggarwal](https://forums.foundationdb.org/u/vaggarwal)\
**Post date:** [February 23, 2019, 12:10am UTC](https://forums.foundationdb.org/t/renamecollection-does-not-work-in-document-layer/1179/1 "2019-02-23T00:10:51Z")

</div>

Document layer document says renameCollection should work , I tried but does not seems to work Is there is way to do this in document layer

\> db.adminCommand( { renameCollection: "vishaltest.stores", to : "vishaltest.stores123"})

{

"errmsg" : "no such cmd: renamecollection",

"bad cmd" : "{ renameCollection: &quot;vishaltest.stores&quot;, to: &quot;vishaltest.stores123&quot; }",

"ok" : 0

}

\> use vishaltest

switched to db vishaltest

\> db.stores.renameCollection("stores1234")

{

"errmsg" : "no such cmd: renamecollection",

"bad cmd" : "{ renameCollection: &quot;vishaltest.stores&quot;, to: &quot;vishaltest.stores1234&quot;, dropTarget: false }",

"ok" : 0

}

\>

---

<div class="post-metadata">

**Author:** ![mbhaskar](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/mbhaskar/32/277_2.png) [@mbhaskar](https://forums.foundationdb.org/u/mbhaskar)\
**Post date:** [February 23, 2019, 1:12am UTC](https://forums.foundationdb.org/t/renamecollection-does-not-work-in-document-layer/1179/2 "2019-02-23T01:12:32Z")

</div>

Thanks for reporting the issue. I have created an issue for this.

> <https://github.com/FoundationDB/fdb-document-layer/issues/94>

---

<div class="post-metadata">

**Author:** ![vaggarwal](https://avatars.discourse-cdn.com/v4/letter/v/b3f665/32.png) [@vaggarwal](https://forums.foundationdb.org/u/vaggarwal)\
**Post date:** [February 25, 2019, 7:08pm UTC](https://forums.foundationdb.org/t/renamecollection-does-not-work-in-document-layer/1179/3 "2019-02-25T19:08:17Z")

</div>

Thanks Bhaskar,

Any idea when DB auth will be enable in document layer ? This is the most crucial thing before we proceed with any implementation.
