Docs Menu
Docs Home
/ /

Sharded Node Direct Commands

Starting in MongoDB 8.0, these are the only commands you can run directly on a node in a sharded cluster. You can also run a shell helper directly on a node if it calls one of the supported commands. For certain collections on the admin database, the local database, or the config database, you can run read and aggregation operations directly on a node. To learn more, see Single-Shard Collection Reads.

Note

The list might not be exhaustive [1].

Command
Available Helper Methods

dbHash (Added in 8.0.5)

[1] Specific command documentation can include compatibility info.

You can run read and aggregation operations directly on a node for databases and collections that always reside entirely on one shard. These include collections in the admin database, local, and config databases.

The following collections are exceptions. You cannot read these collections directly on a node. You must connect to mongos instead:

Important

The contents and schema of the collections in the admin, local, and config databases are internal to MongoDB and can change at any time. If your application depends on the data in these collections, it can stop working after an upgrade.

To learn more about the collections in the config database, see Config Database.

Back

Troubleshoot Sharded Clusters

On this page