Docs Menu


On this page

  • Syntax
  • Parameters
  • Output
  • Example
  • Troubleshoot Errors

The dropStore command removes a data store from the Atlas Data Lake storage configuration. If existing collections reference the data store you want to remove, the command fails and returns a list of the dependent collections.

db.runCommand({ dropStore: "<store-name>" })
Name of the data store to remove from the Atlas Data Lake storage configuration.

The command prints the following output if it succeeds. If the command fails, see Troubleshoot Errors for recommended solutions.

{ "ok" : 1 }

The following example uses the dropStore command to remove the data store myStore from the Atlas Data Lake storage configuration.

use sample
db.runCommand({ dropStore: "myStore" })

The previous command prints the following output:

{ "ok" : 1 }

If the command fails, it returns one of the following errors.

Reason: The specified data store has dependent collections and can't be removed.

"ok" : 0,
"errmsg" : "store has dependent collections: <database.collection>,<database.collection>,<...>",
"code" : 2,
"codeName" : "BadValue"

Solution: First drop the dependent collections, then re-run the dropStore command.

←  dropDatabaselistStores →
Give Feedback
© 2022 MongoDB, Inc.


  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2022 MongoDB, Inc.