All Products
Search
Document Center

Data Management:Supported MongoDB commands

Last Updated:Mar 28, 2026

DMS SQL Console supports two resolver versions for ApsaraDB for MongoDB. Use this reference to confirm command compatibility before writing scripts or running operations.

Usage notes

  • SQL Console uses the new-version resolver by default.

  • To switch to the previous-version resolver, click the return icon in the upper-right corner of SQL Console.

  • Commands supported by the new-version resolver are case-sensitive.

For the full MongoDB command reference, see the MongoDB documentation.

Supported commands

In the following tables, means the command is supported and × means it is not supported.

Collection

CategoryCommandNew-version resolverPrevious-version resolver
Querydata×
QueryRegular expression
Querysort
Queryskip
Querylimit
Queryeval×
Queryfind
QueryfindOne
Queryaggregate×
Querycount
QuerycountDocuments×
QueryestimatedDocumentCount×
Querydistinct
QuerygetIndexes
QueryfindAndModify
QueryfindOneAndDelete×
QueryfindOneAndReplace×
QueryfindOneAndUpdate×
Queryfind.collation×
QuerygetShardDistribution×
QueryisCapped
QuerystorageSize
QuerylatencyStats×
QuerygetShardVersion×
QuerytotalIndexSize
QuerytotalSize
Data updateinsert
Data updateinsertOne×
Data updateinsertMany×
Data updatesave
Data updatefindAndModify
Data updateremove
Data updateupdate
Data updateupdateOne×
Data updateupdateMany×
Data updatebulkWrite××
Collection modificationdrop
Collection modificationreplaceOne×
Collection modificationdropIndexes×
Collection modificationrenameCollection
Collection creationcreateCollection
Index modificationcreateIndexes
Index modificationdropIndexes×
Index modificationreIndex×
Othersvalidate

Database

CategoryCommandNew-version resolverPrevious-version resolver
Database queryadminCommand×
Database querycommandHelp
Database querygetCollectionInfos
Database querygetCollectionNames
Database querygetLogComponents
Database querygetProfilingStatus
Database querygetSiblingDB
Database queryhelp
Database queryhostInfo
Database queryisMaster
Database querylistCommands
Database queryserverStatus
Database queryresetError
Database queryserverBuildInfo
Database queryserverCmdLineOpts×
Database querysetLogLevel
Database querysetProfilingLevel
Database querystats
Database queryversion
View creationcreateView×
High-risk commandscurrentOp
High-risk commandsfsyncLock
High-risk commandsfsyncUnlock

Cache query

CategoryCommandNew-version resolverPrevious-version resolver
Cache queryCommands in brackets ([])×
Cache querymap×
Cache queryforEach×

User management

CategoryCommandNew-version resolverPrevious-version resolver
Role querygetRole
Role querygetRols
Role modificationcreateRole
Role modificationdropRole
Role modificationdropAllRoles
Role modificationgrantPrivilegesToRole
Role modificationrevokePrivilegesFromRole
Role modificationrevokeRolesFromRole
Role modificationupdateRole