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
* Explain how existing store files work, this has never really been well documented
* Add a different set of options for Cypher 25
* WAIT is different in Cypher 25.
Copy file name to clipboardExpand all lines: modules/ROOT/pages/database-administration/standard-databases/create-databases.adoc
+87-1Lines changed: 87 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ For more information, see link:{neo4j-docs-base-uri}/upgrade-migration-guide/upg
18
18
[[create-neo4j-database]]
19
19
== Create databases
20
20
21
-
You can create a database using the Cypher command `CREATE DATABASE`.
21
+
You can create a database using the Cypher command `CREATE DATABASE`. The initial contents of the database will depend on the state of the server and the options provided to the command. When no additional options are provided, `CREATE DATABASE` will attempt to mount any pre-existing store files in place (e.g. as the result of restoring a backup). If no pre-existing store files are available, an empty database will be created.
22
22
23
23
[NOTE]
24
24
====
@@ -64,6 +64,11 @@ CREATE OR REPLACE DATABASE name
64
64
[[manage-databases-create-database-options]]
65
65
=== Options
66
66
67
+
[.tabbed-example]
68
+
=====
69
+
[.include-with-cypher5]
70
+
======
71
+
67
72
The `CREATE DATABASE` command can have a map of options, e.g. `OPTIONS {key: 'value'}`.
68
73
69
74
[options="header"]
@@ -128,7 +133,57 @@ Starting from Neo4j 2025.01, you can use `existingData`, `seedURI`, `seedConfig`
128
133
The `existingDataSeedInstance` and `existingDataSeedServer` are still not supported with the `CREATE OR REPLACE DATABASE` command.
129
134
More details about seeding options can be found in xref::clustering/databases.adoc#cluster-seed[Seed a cluster].
130
135
====
136
+
======
137
+
[.include-with-cypher25]
138
+
======
139
+
The `CREATE DATABASE [OR REPLACE]` command can have a map of options, e.g. `OPTIONS {key: 'value'}`.
140
+
141
+
[options="header"]
142
+
|===
143
+
144
+
| Key | Value | Description
145
+
146
+
|`existingDataSeedServer`
147
+
| ID of the cluster server
148
+
|
149
+
Defines which server is used for seeding the data of the created database.
150
+
The server ID can be found in the `serverId` column after running `SHOW SERVERS`.
151
+
Replaced by `existingDataSeedServer`.
152
+
153
+
| `seedURI`
154
+
| URI to a backup or a dump from an existing database.
155
+
|
156
+
Defines an identical seed from an external source which will be used to seed all servers.
157
+
158
+
| `seedConfig`
159
+
| Comma-separated list of configuration values.
160
+
|
161
+
For more information see xref::clustering/databases.adoc#cluster-seed-uri[Seed from URI].
131
162
163
+
| `txLogEnrichment`
164
+
| `FULL` \| `DIFF` \| `OFF`
165
+
|
166
+
Defines the level of enrichment applied to transaction logs for Change Data Capture (CDC) purposes.
167
+
168
+
For details about enrichment mode, see link:{neo4j-docs-base-uri}/cdc/current/get-started/self-managed/#set-enrichment-mode/[Change Data Capture Manual -> Enable CDC on self-managed instances -> Set the enrichment mode].
Defines the store format if the database created is new.
174
+
`high_limit` and `standard` formats are deprecated from 5.23.
175
+
For more information on store formats, see xref::database-internals/store-formats.adoc[Store formats].
176
+
177
+
If the store is seeded with `seedURI` or `existingDataSeedServer`, or if the command is used to mount pre-existing store files already present on the disk, they will retain their current store format without any modifications.
178
+
179
+
| `existingData` label:deprecated[Deprecated]
180
+
| `use`
181
+
|
182
+
Included for backward compatibility only, has no effect and will be removed in a future version
183
+
184
+
|===
185
+
======
186
+
=====
132
187
133
188
=== Examples
134
189
@@ -164,6 +219,10 @@ SHOW DATABASES YIELD name
164
219
165
220
==== Create a database with xref:database-administration/standard-databases/wait-options.adoc[`WAIT`]
166
221
222
+
[.tabbed-example]
223
+
=====
224
+
[.include-with-cypher5]
225
+
======
167
226
Sub-clause `WAIT` allows you to specify a time limit in which the command must complete and return.
0 commit comments