Server management command syntax

Servers can be added and managed using a set of Cypher administrative commands executed against the system database.

When connected to the DBMS over bolt, administrative commands are automatically routed to the system database.

Server management command syntax

More details about the syntax descriptions can be found on the page Database management command syntax → Reading the administrative commands syntax.

Enable a server

Command

ENABLE SERVER

Syntax

ENABLE SERVER 'serverId' [OPTIONS "{" option: value[,...] "}"]

Description

Adds a server that has been discovered to the cluster. For more information see Enabled state.

Required privilege

GRANT SERVER MANAGEMENT

List servers

Command

SHOW SERVERS

Syntax

SHOW SERVER[S]
  [YIELD { * | field[, ...] } [ORDER BY field[, ...]] [SKIP n] [LIMIT n]]
  [WHERE expression]
  [RETURN field[, ...] [ORDER BY field[, ...]] [SKIP n] [LIMIT n]]

Description

Lists all servers visible to the cluster. For more information see Listing servers.

Required privilege

GRANT SHOW SERVERS

Alter server’s options

Command

ALTER SERVER

Syntax

ALTER SERVER 'name' SET OPTIONS "{" option: value[,...] "}"

Description

Changes the constraints for a server. For more information see Altering server options.

Required privilege

GRANT SERVER MANAGEMENT

Rename a server

Command

RENAME SERVER

Syntax

RENAME SERVER 'name' TO 'newName'

Description

Changes the name of a server. For more information see Renaming a server.

Required privilege

GRANT SERVER MANAGEMENT

Remove a server

Command

DROP SERVER

Syntax

DROP SERVER 'name'

Description

Removes a server not hosting any databases from the cluster. For more information see Dropping a server.

Required privilege

GRANT SERVER MANAGEMENT

Reallocate databases in a cluster

Command

REALLOCATE DATABASES

Syntax

[DRYRUN] REALLOCATE DATABASE[S]

Description

Re-balances databases among the servers in the cluster. For more information see Hosting databases on added servers.

Note that is a cluster-level command, not a server-level command.

Required privilege

GRANT SERVER MANAGEMENT

Deallocate databases from a server

Command

DEALLOCATE DATABASES

Syntax

[DRYRUN] DEALLOCATE DATABASE[S] FROM SERVER[S] 'name'[, ...]

Description

Removes all user databases from the given servers. For more information see Deallocating databases from server.

Required privilege

GRANT SERVER MANAGEMENT