|
| 1 | +.. _mql-support-administration-cmd: |
| 2 | + |
| 3 | +======================= |
| 4 | +Administration Commands |
| 5 | +======================= |
| 6 | + |
| 7 | +.. default-domain:: mongodb |
| 8 | + |
| 9 | +.. contents:: On this page |
| 10 | + :local: |
| 11 | + :backlinks: none |
| 12 | + :depth: 2 |
| 13 | + :class: singlecol |
| 14 | + |
| 15 | +``isMaster`` |
| 16 | +------------ |
| 17 | + |
| 18 | +For :manual:`isMaster </reference/command/isMaster>` command, the |
| 19 | +response always contains a document in which ``isMaster: true``. It |
| 20 | +also includes operational parameters. |
| 21 | + |
| 22 | +{+adl+} supports the optional ``saslSupportedMechs`` field set to the ``<db.user>``. |
| 23 | + |
| 24 | +.. note:: About the ``hello`` Command |
| 25 | + |
| 26 | + {+adl+} also supports the ``hello`` command, which is an alias for |
| 27 | + the ``isMaster`` command. The ``hello`` command returns a document |
| 28 | + that is identical to the document returned by the ``isMaster`` |
| 29 | + command. In the document returned by the ``hello`` command, the |
| 30 | + ``isWritablePrimary`` field is set to ``true`` instead of the |
| 31 | + ``isMaster`` field. We recommend the ``hello`` command instead of |
| 32 | + ``isMaster``. |
| 33 | + |
| 34 | +``killCursors`` |
| 35 | +--------------- |
| 36 | + |
| 37 | +The :manual:`killCursors </reference/command/killCursors>` command |
| 38 | +kills the specified cursor or cursors for a collection. |
| 39 | + |
| 40 | +``listCollections`` |
| 41 | +------------------- |
| 42 | + |
| 43 | +The :manual:`listCollections </reference/command/listCollections>` |
| 44 | +command retrieves information about the collections in a database, such |
| 45 | +as collection names and options. The response contains information that |
| 46 | +can be used to create a cursor to the collection information. |
| 47 | + |
| 48 | +{+adl+} supports the following options: |
| 49 | + |
| 50 | +- ``filter`` (Exact match only.) |
| 51 | +- ``nameOnly`` |
| 52 | +- ``authorizedCollections`` |
| 53 | + |
| 54 | +``listDatabases`` |
| 55 | +----------------- |
| 56 | + |
| 57 | +The :manual:`listDatabases </reference/command/listDatabses>` command |
| 58 | +provides a list of all existing databases. You must use the ``admin`` |
| 59 | +database to run the ``listDatabases`` command. |
| 60 | + |
| 61 | +The following options are supported: |
| 62 | + |
| 63 | +- ``filter`` (Exact match only.) |
| 64 | +- ``nameOnly`` |
| 65 | +- ``authorizedDatabases`` |
| 66 | + |
| 67 | +The ``listDatabases`` command always returns ``sizeOnDisk: 0`` and |
| 68 | +``empty: false`` so it can return quickly, without scanning all the |
| 69 | +files in the |data-lake|. |
0 commit comments