You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The command can only be executed successfully if the cluster's servers are able to satisfy the specified topology.
24
41
If they are not, the command results in an error.
@@ -36,24 +53,6 @@ However, over time, or after several `CREATE DATABASE` commands have been issued
36
53
At this point you can run `REALLOCATE DATABASES` to make the cluster re-balance databases across all servers that are part of the cluster.
37
54
====
38
55
39
-
The `CREATE DATABASE` and `ALTER DATABASE` commands support the usage of link:{neo4j-docs-base-uri}/cypher-manual/{page-version}/syntax/parameters[parameters] when providing the database, the number of primaries and/or the number of secondaries.
@@ -68,6 +67,23 @@ To change the topology of the database `foo` from the previous example, the comm
68
67
----
69
68
ALTER DATABASE foo SET TOPOLOGY 2 PRIMARIES 1 SECONDARY
70
69
----
70
+
Alternatively, using link:{neo4j-docs-base-uri}/cypher-manual/{page-version}/syntax/parameters[parameters]:
71
+
72
+
.Parameters
73
+
[source,javascript, indent=0]
74
+
----
75
+
{
76
+
"dbname": "foo",
77
+
"primary": 2,
78
+
"secondary": 1
79
+
}
80
+
----
81
+
82
+
.Query
83
+
[source, cypher, indent=0]
84
+
----
85
+
ALTER DATABASE $dbname SET TOPOLOGY $primary PRIMARIES $secondary SECONDARIES
86
+
----
71
87
72
88
Like the `CREATE DATABASE` command, this command results in an error if the cluster does not contain sufficient servers to satisfy the requested topology.
0 commit comments