Navigation

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 in the form:

{ setParameter: 1, <option>: <value> }

Replace the <option> with one of the supported setParameter options:

Indexing

Logging

Replication

Security

Sharding

Storage

JavaScript

General

The command can also take the following options:

Option Type Description
txnNumber 64-bit integer/long

Optional.

A strictly increasing non-negative number that uniquely identifies the command in the command’s session.

If specified, the command must also include the lsid option.

New in version 3.6.

lsid Document

Optional.

The document that specifies the unique id of the session associated with the command. If the txnNumber is specified, the lsid is required.

Tip

The mongo shell and the drivers provide helpers to start the session and set the lsid for the commands.

New in version 3.6.