Created
September 15, 2021 23:24
-
-
Save mhelmstetter/6283b2a9e8a8f87401138183df7f8fea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.adminCommand( { listDatabases: 1 } ).databases.forEach(function (dbObj) { | |
var stats = db.getSiblingDB(dbObj["name"]).stats(); | |
if (stats.objects == 0) { | |
print(dbObj["name"]); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment