Search code examples
databaseravendbenvironmentproduction

Delete a single ravendb database while ravendb is running hosting other databases


Is there any way I can remove all data in a single database while RavenDB is still running, hosting other databases?

In a production environment with RavenDB hosting multiple databases for different customers, it is not acceptable to stop RavenDB in order to delete the data from a single database. Would it be necessary to custom develop a tool, at delete documents individually to achieve this?


Solution

  • If you delete the document that describes the database then you have prevented access to it. RavenDB doesn't provide a way to actually delete the database, but the database would be shut down if you delete the document describing it. You can then delete the database directory, or back it up, according to your needs.