0

I was getting all collection names by function db.getCollectionNames().

But as soon as I started sharding, function db.getCollectionNames() is Not working.

How to get all collection names in database when sharding is active?

Somnath Muluk
  • 55,015
  • 38
  • 216
  • 226

1 Answers1

1

Make sure you have selected a database: use <database>.

If it still does not work, try show collections.

mjuopperi
  • 773
  • 7
  • 25