|
| 1 | +:description: This section provides a summary of server management Cypher syntax. |
| 2 | +[role=enterprise-edition] |
| 3 | +[[server-commands-reference]] |
| 4 | += Server commands reference |
| 5 | + |
| 6 | +Servers can be added and managed using a set of Cypher administration commands executed against the `system` database. |
| 7 | + |
| 8 | +When connected to the DBMS over `bolt`, administration commands are automatically routed to the `system` database. |
| 9 | + |
| 10 | + |
| 11 | +[[server-management-syntax]] |
| 12 | +== Server management command syntax |
| 13 | + |
| 14 | +[NOTE] |
| 15 | +==== |
| 16 | +More details about the syntax descriptions can be found xref:database-administration/syntax.adoc[here]. |
| 17 | +==== |
| 18 | + |
| 19 | +[cols="<15s,<85"] |
| 20 | +|=== |
| 21 | +| Command |
| 22 | +m| ENABLE SERVER |
| 23 | + |
| 24 | +| Syntax |
| 25 | +a| |
| 26 | +[source, syntax, role=noheader] |
| 27 | +---- |
| 28 | +ENABLE SERVER 'serverId' [OPTIONS "{" option: value[,...] "}"] |
| 29 | +---- |
| 30 | + |
| 31 | +| Description |
| 32 | +a| Adds a server that has been discovered to the cluster. |
| 33 | +For more information see xref:clustering/servers.adoc#server-enabled-state[Enabled state]. |
| 34 | + |
| 35 | +| Required privilege |
| 36 | +a| `GRANT SERVER MANAGEMENT` |
| 37 | + |
| 38 | +(see xref:authentication-authorization/dbms-administration.adoc#access-control-dbms-administration-privilege-management[SERVER MANAGEMENT privileges]) |
| 39 | +|=== |
| 40 | + |
| 41 | +[cols="<15s,<85"] |
| 42 | +|=== |
| 43 | +| Command |
| 44 | +m| ALTER SERVER |
| 45 | + |
| 46 | +| Syntax |
| 47 | +a| |
| 48 | +[source, syntax, role=noheader] |
| 49 | +---- |
| 50 | +ALTER SERVER 'name' SET OPTIONS "{" option: value[,...] "}" |
| 51 | +---- |
| 52 | + |
| 53 | +| Description |
| 54 | +a| Changes the constraints for a server. |
| 55 | +For more information see xref:clustering/servers.adoc#alter-server-options[Altering server options]. |
| 56 | + |
| 57 | +| Required privilege |
| 58 | +a| `GRANT SERVER MANAGEMENT` |
| 59 | + |
| 60 | +(see xref:authentication-authorization/dbms-administration.adoc#access-control-dbms-administration-privilege-management[SERVER MANAGEMENT privileges]) |
| 61 | +|=== |
| 62 | + |
| 63 | +[cols="<15s,<85"] |
| 64 | +|=== |
| 65 | +| Command |
| 66 | +m| RENAME SERVER |
| 67 | + |
| 68 | +| Syntax |
| 69 | +a| |
| 70 | +[source, syntax, role=noheader] |
| 71 | +---- |
| 72 | +RENAME SERVER 'name' TO 'newName' |
| 73 | +---- |
| 74 | + |
| 75 | +| Description |
| 76 | +a| Changes the name of a server. |
| 77 | +For more information see xref:clustering/servers.adoc#_renaming_a_server[Renaming a server]. |
| 78 | + |
| 79 | +| Required privilege |
| 80 | +a| `GRANT SERVER MANAGEMENT` |
| 81 | + |
| 82 | +(see xref:authentication-authorization/dbms-administration.adoc#access-control-dbms-administration-privilege-management[SERVER MANAGEMENT privileges]) |
| 83 | +|=== |
| 84 | + |
| 85 | + |
| 86 | +[cols="<15s,<85"] |
| 87 | +|=== |
| 88 | +| Command |
| 89 | +m| DEALLOCATE DATABASES |
| 90 | + |
| 91 | +| Syntax |
| 92 | +a| |
| 93 | +[source, syntax, role=noheader] |
| 94 | +---- |
| 95 | +[DRYRUN] DEALLOCATE DATABASE[S] FROM SERVER[S] 'name'[, ...] |
| 96 | +---- |
| 97 | + |
| 98 | +| Description |
| 99 | +a| Removes all databases from the given servers. |
| 100 | +For more information see xref:clustering/servers.adoc#_deallocating_databases_from_a_server[Deallocating databases from server]. |
| 101 | + |
| 102 | +| Required privilege |
| 103 | +a| `GRANT SERVER MANAGEMENT` |
| 104 | + |
| 105 | +(see xref:authentication-authorization/dbms-administration.adoc#access-control-dbms-administration-privilege-management[SERVER MANAGEMENT privileges]) |
| 106 | +|=== |
| 107 | + |
| 108 | +[cols="<15s,<85"] |
| 109 | +|=== |
| 110 | +| Command |
| 111 | +m| DROP SERVER |
| 112 | + |
| 113 | +| Syntax |
| 114 | +a| |
| 115 | +[source, syntax, role=noheader] |
| 116 | +---- |
| 117 | +DROP SERVER 'name' |
| 118 | +---- |
| 119 | + |
| 120 | +| Description |
| 121 | +a| Removes a server not hosting any databases from the cluster. |
| 122 | +For more information see xref:clustering/servers.adoc#_dropping_a_server[Dropping a server]. |
| 123 | + |
| 124 | +| Required privilege |
| 125 | +a| `GRANT SERVER MANAGEMENT` |
| 126 | + |
| 127 | +(see xref:authentication-authorization/dbms-administration.adoc#access-control-dbms-administration-privilege-management[SERVER MANAGEMENT privileges]) |
| 128 | +|=== |
| 129 | + |
| 130 | +[cols="<15s,<85"] |
| 131 | +|=== |
| 132 | +| Command |
| 133 | +m| SHOW SERVERS |
| 134 | + |
| 135 | +| Syntax |
| 136 | +a| |
| 137 | +[source, syntax, role=noheader] |
| 138 | +---- |
| 139 | +SHOW SERVER[S] |
| 140 | + [YIELD { * \| field[, ...] } [ORDER BY field[, ...]] [SKIP n] [LIMIT n]] |
| 141 | + [WHERE expression] |
| 142 | + [RETURN field[, ...] [ORDER BY field[, ...]] [SKIP n] [LIMIT n]] |
| 143 | +---- |
| 144 | + |
| 145 | +| Description |
| 146 | +a| Lists all servers visible to the cluster. |
| 147 | +For more information see xref:clustering/servers.adoc#_listing_servers[Listing servers]. |
| 148 | + |
| 149 | +| Required privilege |
| 150 | +a| `GRANT SHOW SERVERS` |
| 151 | + |
| 152 | +(see xref:authentication-authorization/dbms-administration.adoc#access-control-dbms-administration-privilege-management[SERVER MANAGEMENT privileges]) |
| 153 | +|=== |
| 154 | + |
| 155 | +[cols="<15s,<85"] |
| 156 | +|=== |
| 157 | +| Command |
| 158 | +m| REALLOCATE DATABASES |
| 159 | + |
| 160 | +| Syntax |
| 161 | +a| |
| 162 | +[source, syntax, role=noheader] |
| 163 | +---- |
| 164 | +[DRYRUN] REALLOCATE DATABASE[S] |
| 165 | +---- |
| 166 | + |
| 167 | +| Description |
| 168 | +a| Re-balances databases among the servers in the cluster. |
| 169 | +For more information see xref:clustering/servers.adoc#_hosting_databases_on_added_servers[Hosting databases on added servers]. |
| 170 | + |
| 171 | +Note that is a cluster-level command, not a server-level command. |
| 172 | + |
| 173 | +| Required privilege |
| 174 | +a| `GRANT SERVER MANAGEMENT` |
| 175 | + |
| 176 | +(see xref:authentication-authorization/dbms-administration.adoc#access-control-dbms-administration-privilege-management[SERVER MANAGEMENT privileges]) |
| 177 | +|=== |
0 commit comments