On this page本页内容
setParameter
setParameter
is an administrative command for modifying options normally set on the command line. 是一个管理命令,用于修改通常在命令行上设置的选项。You must issue the 必须对setParameter
command against the admin database in the form:admin
数据库发出setParameter
命令,格式如下:
db.adminCommand( { setParameter: 1, <parameter>: <value> } )
For the available parameters, including examples, see MongoDB Server Parameters.有关可用参数(包括示例),请参阅MongoDB Server parameters。
Commands issued by the admin command 管理命令setParameter
do not survive server restarts. setParameter
发出的命令在服务器重新启动后无法继续执行。For a persistent option use the 对于持久选项,请使用--setParameter
command line option or the setParameter
configuration file setting.--setParameter
命令行选项或setParameter
配置文件设置。
When using Stable API V1 with apiStrict set to 当使用true
, you cannot use setParameter
to modify server parameters.apiStrict
设置为true
的稳定的API V1时,不能使用setParameter
修改服务器参数。