On this page本页内容
MongoDB stores system information in collections that use the MongoDB在使用<database>.system.*
namespace, which MongoDB reserves for internal use. <database>.system.*
名称空间的集合中存储系统信息,MongoDB保留该名称空间供内部使用。Do not create collections that begin with 不要创建以system
.system
开头的集合。
MongoDB also stores some additional instance-local metadata in the local database, specifically for replication purposes and in the config database for sessions information.MongoDB还将一些额外的实例本地元数据存储在local
数据库中,专门用于复制目的,并存储在配置数据库中以获取会话信息。
System collections include these collections stored in the 系统集合包括存储在admin
database:admin
数据库中的这些集合:
admin.system.roles
The admin.system.roles
collection stores custom roles that administrators create and assign to users to provide access to specific resources.admin.system.roles
集合存储管理员创建并分配给用户的自定义角色,以提供对特定资源的访问。
admin.system.users
The admin.system.users
collection stores the user's authentication credentials as well as any roles assigned to the user. admin.system.users
集合存储用户的身份验证凭据以及分配给用户的任何角色。Users may define authorization roles in the 用户可以在admin.system.roles
collection.admin.system.roles
集合中定义授权角色。
admin.system.version
The admin.system.version
collection stores metadata to support internal operations. admin.system.version
集合存储元数据以支持内部操作。Do not modify this collection unless specifically instructed to in this documentation or by a MongoDB support engineer.除非本文档或MongoDB支持工程师明确指示,否则不要修改此集合。
System collections include these collections stored in the 系统集合包括存储在config
database:config
数据库中的这些集合:
config.system.indexBuilds
New in version 4.4.在版本4.4中新增。
The indexBuilds
collection stores information related to in-progress index builds.indexBuilds
集合存储与正在进行的索引生成相关的信息。
System collections also include these collections stored directly in each database:系统集合还包括直接存储在每个数据库中的这些集合:
<database>.system.namespaces
Starting in MongoDB 4.2, 从MongoDB 4.2开始,<database>.system.namespaces
has been removed (access to the collection has been deprecated since 3.0). <database>.system.namespaces
已被删除(自3.0以来,对集合的访问已被弃用)。To list the collections in a database, use the 要列出数据库中的集合,请改用listCollections
command instead.listCollections
命令。
<database>.system.indexes
Starting in MongoDB 4.2, 从MongoDB 4.2开始,<database>.system.indexes
has been removed (access to the collection has been deprecated since 3.0). <database>.system.indexes
已被删除(自3.0以来,对该集合的访问已被弃用)。To list the indexes, use the 要列出索引,请改用listIndexes
command instead.listIndexes
命令。
<database>.system.profile
The <database>.system.profile
collection stores database profiling information. <database>.system.profile
集合存储数据库分析信息。For information on profiling, see Database Profiling.有关分析的信息,请参阅数据库分析。
<database>.system.js
The <database>.system.js
collection stores special JavaScript code for use in server side JavaScript. <database>.system.js
集合存储用于服务器端JavaScript的特殊JavaScript代码。See Store a JavaScript Function on the Server for more information.有关更多信息,请参阅在服务器上存储JavaScript函数。
<database>.system.views
The <database>.system.views
collection contains information about each view in the database.<database>.system.views
集合包含关于数据库中每个视图的信息。
Starting in MongoDB 5.0, for featureCompatibilityVersion set to 从MongoDB 5.0开始,对于设置为"5.0"
or greater, users can no longer write directly to the <database>.system.views
collection."5.0"
或更高版本的功能兼容性版本用户不能再直接写入<database>.system.views
集合。