本页面在以下章节中比较了 Free 集群、Flex 集群、M10+ Atlas Core 集群和 M10+ Atlas Infinite 集群的命令支持:
Unsupported Commands lists MongoDB commands and shell methods that Atlas doesn't support, organized by command category.
Unsupported Command Line Options lists
mongodumpandmongorestoreoptions that Atlas doesn't support.Limited Commands lists commands that Atlas supports with restrictions for each cluster type.
Atlas requires clients to authenticate to access an Atlas cluster. Atlas provides a curated list of Database User Privileges that grant access to a subset of MongoDB commands. The tables in the Unsupported Commands section list the commands that fall outside this subset for each cluster type.
Atlas Free、Flex 和 Infinite 集群不支持适用于其他集群的所有功能。要了解详情,请参阅:
不支持的命令
下表按集群类型列出了 Atlas 不支持的 MongoDB 命令、shell 方法和权限操作。为了确保集群的稳定性和性能,Atlas 自动执行了这些命令提供的功能。Atlas 会根据集群的层级或数据库版本限制其他命令。
表示集群类型不支持该命令。
注意
如果在 Free 集群和 Flex 集群中使用不支持的命令或无效语法,Atlas 会返回以下错误信息:
<$command> is not allowed or the syntax is incorrect, see the Atlas documentation for more information.
要了解有关有效语法的更多信息,请参阅数据库命令
管理
命令 | Shell 方法 | 特权操作 | Free 和 Flex | M10+ Core | M10+ Infinite |
|---|---|---|---|---|---|
| |||||
| |||||
|
| ||||
| |||||
| |||||
| |||||
Others that use | |||||
聚合(Aggregation)
命令 | Shell 方法 | 特权操作 | Free 和 Flex | M10+ Core | M10+ Infinite |
|---|---|---|---|---|---|
|
身份验证
命令 | Shell 方法 | 特权操作 | Free 和 Flex | M10+ Core | M10+ Infinite |
|---|---|---|---|---|---|
| |||||
|
诊断
查询计划缓存
命令 | Shell 方法 | 特权操作 | Free 和 Flex | M10+ Core | M10+ Infinite |
|---|---|---|---|---|---|
| |||||
| |||||
复制
命令 | Shell 方法 | 特权操作 | Free 和 Flex | M10+ Core | M10+ Infinite |
|---|---|---|---|---|---|
| |||||
| |||||
| |||||
| |||||
| |||||
| |||||
| |||||
|
会话
命令 | Shell 方法 | 特权操作 | Free 和 Flex | M10+ Core | M10+ Infinite |
|---|---|---|---|---|---|
分片
命令 | Shell 方法 | 特权操作 | Free 和 Flex | M10+ Core | M10+ Infinite |
|---|---|---|---|---|---|
| |||||
| |||||
| |||||
| |||||
| |||||
| |||||
| [1] | (1, 2) You can use setAllowMigrations to control the balancing of a specific collection. |
| [2] | 只有全局写入集群不支持此命令。 |
用户和角色管理
注意
作为替代方案,请参阅可用的 Atlas 用户角色。
命令 | Shell 方法 | 特权操作 | Free 和 Flex | M10+ Core | M10+ Infinite |
|---|---|---|---|---|---|
| |||||
| [3] | (1, 2) You can call getUser for your own user account. |
不支持的命令行选项
Atlas 不支持以下命令行工具选项。 表示集群类型不支持该选项。
选项 | 命令行工具 | Free 和 Flex | M10+ Core | M10+ Infinite |
|---|---|---|---|---|
有限命令
Atlas 支持以下命令,但有一定限制。
Free 和 Flex
您可以在免费集群和 Flex 集群中有限制地运行以下命令:
命令 | Limit | ||
|---|---|---|---|
| |||
Doesn't support | |||
| |||
只允许对下面这两个文档执行此操作:
| |||
Limits the | |||
Doesn't support the $$USER_ROLES system variable. | |||
Doesn't support the $$USER_ROLES system variable. | |||
Doesn't support the $$USER_ROLES system variable. | |||
限制对以下字段的响应:
|
M10+ Core
Atlas limits the db.killOp() method to the MongoDB user who ran the operation.
Atlas doesn't support the killAllSessions command unless the database user has:
the
killAnySessionprivilege, orthe
killOpSessionrole.
Atlas 仅支持对 M30+ 分片的 Atlas Core 集群使用以下分片命令。
M10+ Infinite
Atlas limits the db.killOp() method to the MongoDB user who ran the operation.
Atlas doesn't support the killAllSessions command unless the database user has:
the
killAnySessionprivilege, orthe
killOpSessionrole.
Atlas Infinite clusters only support the profile command when the database profiler level is 0.
联系支持人员
如果使用案例需要访问 Atlas 数据库用户权限当前不支持的命令,请联系 Atlas 支持部门。