Docs Menu

Docs HomeMongoDB Atlas

Unsupported Commands in Atlas

On this page

  • Unsupported Commands in M0/M2/M5 Clusters
  • Limited Commands
  • Unsupported Commands
  • Unsupported Command Line Options
  • Unsupported Commands in M10+ Clusters
  • Limited Commands
  • Unsupported Commands
  • Unsupported Command Line Options
  • MongoDB 4.2+ Incompatibility
  • Contact Support
  • Unsupported Commands in Serverless Instances
  • Unsupported Command Line Options

Atlas M0 free clusters and M2/M5 shared clusters don't support all functionality available to other clusters.

Important

M0 free clusters and M2/M5 shared clusters don't support read or write operations on the admin database.

To learn more about M0/M2/M5 limitations, see Atlas M0 (Free Cluster), M2, and M5 Limitations.

Note

If you use an unsupported command or invalid syntax, Atlas returns the following error message:

<$command> is not allowed or the syntax is incorrect,
see the Atlas documentation for more information.

To learn more about valid syntax, see Database Commands

You can run the following commands with limitations in M0 free clusters and M2/M5 shared clusters:

Command
Limitation
aggregate
  • Limits the maxTimeMs parameter to 300 seconds (300000).

  • Ignores the allowDiskUsage parameter.

  • Doesn't support $accumulator and $function operators.

  • Doesn't support the $where operator.

  • Limits the count operation on the local database to the system.replset and oplog.rs collections.

M0 free clusters and M2/M5 shared clusters don't allow the dbStats command on the local and config databases.

To learn more, see Operational Limitations.

Doesn't support $where operator.
  • Doesn't support the $where operator.

  • Limits the find operation on the local database to the oplog.rs collection.

  • Limits the find operation to using an equality condition when querying the ns field in the oplog.rs collection on the local database.

    { "ns" : "test.foo" }

Limits execution to these two documents:

  • { "getParameter": 1, "authSchemaVersion": 1 }

  • { "getParameter": 1, "authenticationMechanisms": 1 }

Limits the db.killOp() method to to the MongoDB user who ran the operation.

Limits response to the following fields:

  • $clusterTime.clusterTime

  • $clusterTime.operationTime

  • $clusterTime.signature.hash

  • $clusterTime.signature.keyId

  • $clusterTime.signature

  • asserts.msg

  • asserts.regular

  • asserts.rollovers

  • asserts.user

  • asserts.warning

  • atlasVersion.gitVersion

  • atlasVersion.version

  • connections.available

  • connections.current

  • connections.totalCreated

  • extra_info.note

  • extra_info.page_faults

  • host

  • localTime

  • mem.bits

  • mem.mapped

  • mem.mappedWithJournal

  • mem.resident

  • mem.supported

  • mem.virtual

  • metrics.atlas.bytesInWrites

  • metrics.atlas.connectionPool.totalCreated

  • network.bytesIn

  • network.bytesOut

  • network.numRequests

  • ok

  • opcounters.command

  • opcounters.delete

  • opcounters.getmore

  • opcounters.insert

  • opcounters.query

  • opcounters.update

  • opcountersRepl.command

  • opcountersRepl.delete

  • opcountersRepl.getmore

  • opcountersRepl.insert

  • opcountersRepl.query

  • opcountersRepl.update

  • pid

  • process

  • repl.electionId

  • repl.hosts[]

  • repl.ismaster

  • repl.lastWrite.lastWriteDate

  • repl.lastWrite.majorityOpTime.t

  • repl.lastWrite.majorityOpTime.ts

  • repl.lastWrite.majorityWriteDate

  • repl.lastWrite.opTime.t

  • repl.lastWrite.opTime.ts

  • repl.me

  • repl.primary

  • repl.rbid

  • repl.secondary

  • repl.setName

  • repl.setVersion

  • repl.tags.nodeType

  • repl.tags.provider

  • repl.tags.region

  • repl.tags

  • storageEngine.backupCursorOpen

  • storageEngine.dropPendingIdents

  • storageEngine.name

  • storageEngine.oldestRequiredTimestampForCrashRecovery

  • storageEngine.persistent

  • storageEngine.readOnly

  • storageEngine.supportsCommittedReads

  • storageEngine.supportsPendingDrops

  • storageEngine.supportsSnapshotReadConcern

  • uptime

  • uptimeEstimate

  • uptimeMillis

  • version

Limits to the following document:

{ "user": "<MYUSER>", "db": "admin" }

M0 free clusters and M2/M5 shared clusters don't support the following commands:

Note

The commands available for clusters of all other tiers, M10 and larger, correspond to the privileges defined for the built-in Atlas MongoDB roles. To learn more about permissions, see Atlas User Privileges.

M0 free clusters and M2/M5 shared clusters don't support the following command line tool options:

Command Line Tool
Unsupported Options

For more information, see Atlas M0 (Free Cluster), M2, and M5 Limitations.

Atlas requires clients to authenticate to access an Atlas cluster. Atlas provides a curated list of Database User Privileges. These privileges provide access to a subset of MongoDB commands.

Atlas limits the db.killOp() method to the MongoDB user who ran the operation.

The following table lists the most common commands and shell methods that database user privileges do not support. To ensure cluster stability and performance, Atlas subsumes or restricts the functionality that these commands provide.

Commands
Shell Method
Privilege Actions
eval
db.eval()
Commands
Shell Method
Privilege Actions

M10+ clusters don't support the --preserveUUID option for mongorestore.

[1] This command is not supported on global write clusters only.

Note

As an alternative, see the available Atlas User Roles.

[2](1, 2) You can call getUser for your own user account.

MongoDB versions 4.2 and later don't support the following commands and methods:

Commands
Shell Method
parallelCollectionScan
clone
db.cloneDatabase()
copydb
db.copyDatabase()

Contact Atlas support if your use case requires access to a command that the Atlas database user privileges don't currently support.

Atlas serverless instances don't support the following database commands and mongosh shell methods:

Database Command
Shell Method
$currentOp aggregation pipeline stage
geoNear
(deprecated in MongoDB v4.0)
$listLocalSessions aggregation pipeline stage
$listSessions aggregation pipeline stage
$planCacheStats aggregation pipeline stage
(deprecated in MongoDB v4.4)

Serverless instances don't support the following command line tool options:

Command Line Tool
Unsupported Options
←  Atlas M0 (Free Cluster), M2, and M5 LimitationsCommands Available Only in Free Clusters →
Share Feedback
© 2023 MongoDB, Inc.

About

  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2023 MongoDB, Inc.