All Products
Search
Document Center

Data Management:Supported MongoDB commands

Last Updated:Apr 01, 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

Category Command New-version resolver Previous-version resolver
Query data √ ×
Regular expression √ √
sort √ √
skip √ √
limit √ √
eval √ ×
find √ √
findOne √ √
aggregate √ ×
count √ √
countDocuments √ ×
estimatedDocumentCount √ ×
distinct √ √
getIndexes √ √
findAndModify √ √
findOneAndDelete √ ×
findOneAndReplace √ ×
findOneAndUpdate √ ×
find.collation √ ×
getShardDistribution × √
isCapped √ √
storageSize √ √
latencyStats √ ×
getShardVersion √ ×
totalIndexSize √ √
totalSize √ √
Data update insert √ √
insertOne √ ×
insertMany √ ×
save √ √
findAndModify √ √
remove √ √
update √ √
updateOne √ ×
updateMany √ ×
bulkWrite × ×
Collection modification drop √ √
replaceOne √ ×
dropIndexes √ ×
renameCollection √ √
Collection creation createCollection √ √
Index modification createIndexes √ √
dropIndexes √ ×
reIndex √ ×
Others validate √ √

Database

Category Command New-version resolver Previous-version resolver
Database query adminCommand √ ×
commandHelp √ √
getCollectionInfos √ √
getCollectionNames √ √
getLogComponents √ √
getProfilingStatus √ √
getSiblingDB √ √
help √ √
hostInfo √ √
isMaster √ √
listCommands √ √
serverStatus √ √
resetError √ √
serverBuildInfo √ √
serverCmdLineOpts √ ×
setLogLevel √ √
setProfilingLevel √ √
stats √ √
version √ √
View creation createView √ ×
High-risk commands currentOp √ √
fsyncLock √ √
fsyncUnlock √ √

Cache query

Category Command New-version resolver Previous-version resolver
Cache query Commands in brackets ([]) √ ×
map √ ×
forEach √ ×

User management

Category Command New-version resolver Previous-version resolver
Role query getRole √ √
getRols √ √
Role modification createRole √ √
dropRole √ √
dropAllRoles √ √
grantPrivilegesToRole √ √
revokePrivilegesFromRole √ √
revokeRolesFromRole √ √
updateRole √ √