对于 AI 代理:可在 https://www.mongodb.com/zh-cn/docs/llms.txt 获取文档索引—通过在任何 URL 路径后添加 .md 可获取所有页面的 Markdown 版本。
Docs 菜单

setParameter(数据库命令)

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.

此命令可用于以下环境中托管的部署:

重要

MongoDB Atlas 集群不支持此命令。有关 Atlas 对所有命令的支持的信息,请参阅不支持的命令

db.adminCommand(
{
setParameter: 1,
<parameter>: <value>
}
)

有关可用参数(包括示例),请参阅适用于自托管部署的MongoDB Server参数。

Commands issued by the admin command setParameter do not survive server restarts. For a persistent option use the --setParameter command line option or the setParameter configuration file setting.

使用 Stable API V1 且 apiStrict设立为 true时,您无法使用setParameter 修改服务器参数。

给本页内容打分