Mongo DB Rename Database [5.1+] for sharded clusters

epicsteve shared this question 4 months ago
Answered

Now that rename database GUI button is a way to rename the mongo database, will it work on sharded cluster or only standalone DB instances

Comments (3)

photo
1

Not compatible with sharded collections.


The "Rename database" operation depends on MongoDB's renameCollection command. renameCollection is not compatible with sharded collections.

More about renameCollection, https://docs.mongodb.com/manual/reference/command/renameCollection/index.html

photo
1

Thank you for quick response. I think users might find it useful if we can document the limitations of this option (rename).

photo
2

In the next release, we will add documentation information for this limitation