Answers for "drop multiple database mongo"

C#
0

drop multiple database mongo

// if you have a list of Databases to delete then you may run the following command?


['db1', 'db2', 'db3', 'db4'].forEach(function(i){db.getSiblingDB(i).dropDatabase()})
Posted by: Guest on November-02-2020
0

mongo remove all dbs

mongo --quiet --eval 'db.getMongo().getDBNames().forEach(function(i){db.getSiblingDB(i).dropDatabase()})'
Posted by: Guest on September-14-2020

C# Answers by Framework

Browse Popular Code Answers by Language