Synopsis
MongoDB は、<database>.system.* 名前空間のコレクションにシステム情報を保存します。この名前空間は MongoDB によって内部使用のために予約されるため、system で始まるコレクションは作成できません。
MongoDB は、具体的にはレプリケーション目的で、および local.replset.*セッション情報 用にコンフィギュレーション データベース に、 ローカルデータベース 名前空間に追加のインスタンス ローカル メタデータを保存します。
MongoDB Atlasおよびその他のMongoDBクラウドサービスでは、プレフィックス __mdb_internal_* を使用する専用データベースに重要な運用データが保存されます。このプレフィックスを持つデータベースにはアクセスしたり、変更したりしないでください。管理ツールではこれらの名前空間を無視することをお勧めします。これらのクラウド固有のデータベースの詳細については、内部データベースを参照してください。
コレクション
システム コレクションには、admin データベースに保存されている次のコレクションが含まれます。
admin.system.rolesThe
admin.system.rolescollection stores custom roles that administrators create and assign to users to provide access to specific resources.
admin.system.usersThe
admin.system.userscollection stores the user's authentication credentials as well as any roles assigned to the user. Users may define authorization roles in theadmin.system.rolescollection.
admin.system.versionThe
admin.system.versioncollection stores metadata to support internal operations. Do not modify this collection unless specifically instructed to in this documentation or by a MongoDB support engineer.
システム コレクションには、config データベースに保存されている次のコレクションが含まれます。
config.system.indexBuildsThe
indexBuildscollection stores information related to in-progress index builds.
config.system.preimagesChangeStreamPreAndPostImages オプションが有効になっているコレクションから、変更されたドキュメントの以前のバージョンを保存します。プレイメージの有効期限が切れると、
config.system.preimagesコレクションは自動的に消去されます。詳しくは、changeStreamOptions.preAndPostImages.expireAfterSecondsを参照してください。
データベース固有のコレクション
システム コレクションには、各データベースに直接保存される次のコレクションも含まれます。
<database>.system.profileThe
<database>.system.profilecollection stores database profiling information. For information on profiling, see Database Profiler.
<database>.system.jsThe
<database>.system.jscollection stores special JavaScript code for use in server side JavaScript. See Store a JavaScript Function on the Server for more information.
<database>.system.viewsThe
<database>.system.viewscollection contains information about each view in the database.Starting in MongoDB 5.0, for featureCompatibilityVersion set to
"5.0"or greater, users can no longer write directly to the<database>.system.viewscollection.