Procedures

This page provides a complete reference to the Neo4j procedures. Available procedures depend on the type of installation you have:

  • Neo4j Enterprise Edition provides a larger set of procedures than Neo4j Community Edition.

  • Cluster members have procedures that are not available in standalone mode.

To check which procedures are available in your Neo4j DBMS, use the Cypher command SHOW PROCEDURES:

Example 1. List available procedures
SHOW PROCEDURES

Some procedures can only be run by users with Admin privileges. These are labeled with Admin Only.

For more information, see Cypher Manual → Manage Privileges.

List of procedures

Table 1. Neo4j procedures
Name Community Edition Enterprise Edition Comment

db.awaitIndex()

Yes

Yes

db.awaitIndexes()

Yes

Yes

db.checkpoint()

No

Yes

db.clearQueryCaches()

Yes

Yes

Admin Only

db.constraints()

Yes

Yes

Deprecated in 4.2
In 4.1, signature changed to db.constraints() :: (name :: STRING?, description :: STRING?, details :: STRING?).
Replaced by: SHOW CONSTRAINTS.

db.createIndex()

Yes

Yes

Deprecated in 4.2
Replaced by: CREATE INDEX.

db.createLabel()

Yes

Yes

db.createNodeKey()

No

Yes

Deprecated in 4.2
Replaced by: CREATE CONSTRAINT …​ IS NODE KEY.

db.createProperty()

Yes

Yes

db.createRelationshipType()

Yes

Yes

db.createUniquePropertyConstraint()

Yes

Yes

Deprecated in 4.2
Replaced by: CREATE CONSTRAINT …​ IS UNIQUE.

db.index.fulltext.awaitEventuallyConsistentIndexRefresh()

Yes

Yes

db.index.fulltext.createNodeIndex()

Yes

Yes

Deprecated in 4.3
Replaced by: CREATE FULLTEXT INDEX …​.

db.index.fulltext.createRelationshipIndex()

Yes

Yes

Deprecated in 4.3
Replaced by: CREATE FULLTEXT INDEX …​.

db.index.fulltext.drop()

Yes

Yes

Deprecated in 4.3
Replaced by: DROP INDEX …​.

db.index.fulltext.listAvailableAnalyzers()

Yes

Yes

db.index.fulltext.queryNodes()

Yes

Yes

In 4.1, signature changed to db.index.fulltext.queryNodes(indexName :: STRING?, queryString :: STRING?, options = {} :: MAP?) :: (node :: NODE?, score :: FLOAT?).

db.index.fulltext.queryRelationships()

Yes

Yes

In 4.1, signature changed to db.index.fulltext.queryRelationships(indexName :: STRING?, queryString :: STRING?, options = {} :: MAP?) :: (relationship :: RELATIONSHIP?, score :: FLOAT?).

db.indexDetails()

Yes

Yes

Deprecated in 4.2
Replaced by: SHOW INDEXES YIELD *.

db.indexes()

Yes

Yes

Deprecated in 4.2
Replaced by: SHOW INDEXES.

db.info()

Yes

Yes

db.labels()

Yes

Yes

db.listLocks()

No

Yes

Admin Only
In 4.2, signature changed to db.listLocks() :: (mode :: STRING?, resourceType :: STRING?, resourceId :: INTEGER?, transactionId :: STRING?).

db.ping()

Yes

Yes

db.prepareForReplanning()

Yes

Yes

Admin Only

db.propertyKeys()

Yes

Yes

db.relationshipTypes()

Yes

Yes

db.resampleIndex()

Yes

Yes

db.resampleOutdatedIndexes()

Yes

Yes

db.schema.nodeTypeProperties()

Yes

Yes

db.schema.relTypeProperties()

Yes

Yes

db.schema.visualization()

Yes

Yes

db.schemaStatements()

Yes

Yes

Deprecated in 4.2
Replaced by: SHOW INDEXES YIELD * and SHOW CONSTRAINTS YIELD *.

db.stats.clear()

Yes

Yes

Admin Only

db.stats.collect()

Yes

Yes

Admin Only

db.stats.retrieve()

Yes

Yes

Admin Only

db.stats.retrieveAllAnonymized()

Yes

Yes

Admin Only

db.stats.status()

Yes

Yes

Admin Only

db.stats.stop()

Yes

Yes

Admin Only

dbms.cluster.routing.getRoutingTable()

No

Yes

dbms.cluster.overview()

No

Yes

dbms.cluster.protocols()

No

Yes

dbms.cluster.quarantineDatabase()

No

Yes

Deprecated in 4.3
Replaced by: dbms.quarantineDatabase().

dbms.cluster.readReplicaToggle()

No

Yes

dbms.cluster.role()

No

Yes

dbms.cluster.setDefaultDatabase()

No

Yes

dbms.components()

Yes

Yes

dbms.database.state()

Yes

Yes

dbms.functions()

Yes

Yes

Deprecated in 4.3
In 4.2, signature changed to dbms.functions() :: (name :: STRING?, signature :: STRING?, category :: STRING?, description :: STRING?, aggregating :: BOOLEAN?, defaultBuiltInRoles :: LIST? OF STRING?).
Replaced by: SHOW FUNCTIONS.

dbms.info()

Yes

Yes

dbms.killConnection()

Available since 4.2

Yes

dbms.killConnections()

Available since 4.2

Yes

dbms.killQueries()

Available since 4.2

Yes

Deprecated in 4.4
Replaced by: TERMINATE TRANSACTIONS.

dbms.killQuery()

Available since 4.2

Yes

Deprecated in 4.4
Replaced by: TERMINATE TRANSACTIONS.

dbms.killTransaction()

Available since 4.2

Yes

Deprecated in 4.4
Replaced by: TERMINATE TRANSACTIONS.

dbms.killTransactions()

Available since 4.2

Yes

Deprecated in 4.4
Replaced by: TERMINATE TRANSACTIONS.

dbms.listActiveLocks()

Yes

Yes

dbms.listConfig()

Yes

Yes

Admin Only

dbms.listConnections()

Available since 4.2

Yes

dbms.listPools()

No

Yes

dbms.listQueries()

Available since 4.2

Yes

Deprecated in 4.4
In 4.1, the queryId procedure format changed to no longer include the database name. For example, mydb-query-123 became query-123.
Replaced by: SHOW TRANSACTIONS.

dbms.listTransactions()

Available since 4.2

Yes

Deprecated in 4.4
In 4.1, signature changed to dbms.listTransactions() :: (transactionId :: STRING?, username :: STRING?, metaData :: MAP?, startTime :: STRING?, protocol :: STRING?, clientAddress :: STRING?, requestUri :: STRING?, currentQueryId :: STRING?, currentQuery :: STRING?, activeLockCount :: INTEGER?, status :: STRING?, resourceInformation :: MAP?, elapsedTimeMillis :: INTEGER?, cpuTimeMillis :: INTEGER?, waitTimeMillis :: INTEGER?, idleTimeMillis :: INTEGER?, allocatedBytes :: INTEGER?, allocatedDirectBytes :: INTEGER?, pageHits :: INTEGER?, pageFaults :: INTEGER?, connectionId :: STRING?, initializationStackTrace :: STRING?, database :: STRING?, estimatedUsedHeapMemory :: INTEGER?).
Replaced by: SHOW TRANSACTIONS.

dbms.procedures()

Yes

Yes

Deprecated in 4.3
Replaced by: SHOW PROCEDURES.

dbms.quarantineDatabase()

No

Yes

dbms.queryJmx()

Yes

Yes

dbms.routing.getRoutingTable()

Yes

Yes

dbms.scheduler.failedJobs()

No

Yes

Admin Only

dbms.scheduler.groups()

No

Yes

Admin Only

dbms.scheduler.jobs()

No

Yes

Admin Only

dbms.scheduler.profile()

No

Yes

Admin Only

dbms.security.activateUser()

No

Yes

Deprecated in 4.0 Admin Only
In 4.1, mode changed to write.
Replaced by: ALTER USER.

dbms.security.addRoleToUser()

No

Yes

Deprecated in 4.0 Admin Only
In 4.1, mode changed to write.
Replaced by: GRANT ROLE TO USER.

dbms.security.changePassword()

Yes

Yes

Deprecated in 4.0 Admin Only
In 4.1, mode changed to write.
Replaced by: ALTER CURRENT USER SET PASSWORD.

dbms.security.changeUserPassword()

No

Yes

Deprecated in 4.0 Admin Only
In 4.1, mode changed to write.
Replaced by: ALTER USER.

dbms.security.clearAuthCache()

No

Yes

Admin Only

dbms.security.createRole()

No

Yes

Deprecated in 4.0 Admin Only
In 4.1, mode changed to write.
Replaced by: CREATE ROLE.

dbms.security.createUser()

Yes

Yes

Deprecated in 4.0 Admin Only
In 4.1, mode changed to write.
Replaced by: CREATE USER.

dbms.security.deleteRole()

No

Yes

Deprecated in 4.0 Admin Only
In 4.1, mode changed to write.
Replaced by: DROP ROLE.

dbms.security.deleteUser()

Yes

Yes

Deprecated in 4.0 Admin Only
In 4.1, mode changed to write.
Replaced by: DROP USER.

dbms.security.listRoles()

Yes

Yes

Deprecated in 4.0 Admin Only
In 4.1, mode changed to read.
Replaced by: SHOW ROLES.

dbms.security.listRolesForUser()

No

Yes

Deprecated in 4.0
In 4.1, mode changed to read.
Replaced by: SHOW USERS.

dbms.security.listUsers()

Yes

Yes

Deprecated in 4.0 Admin Only
In 4.1, mode changed to read.
Replaced by: SHOW USERS.

dbms.security.listUsersForRole()

No

Yes

Deprecated in 4.0 Admin Only
In 4.1, mode changed to read.
Replaced by: SHOW ROLES WITH USERS.

dbms.security.removeRoleFromUser()

No

Yes

Deprecated in 4.0 Admin Only
In 4.1, mode changed to write.
Replaced by: REVOKE ROLE FROM USER.

dbms.security.suspendUser()

No

Yes

Deprecated in 4.0 Admin Only
In 4.1, mode changed to write.
Replaced by: ALTER USER.

dbms.setConfigValue()

No

Yes

Admin Only

dbms.showCurrentUser()

Yes

Yes

dbms.upgrade()

Yes

Yes

Admin Only

dbms.upgradeStatus()

Yes

Yes

Admin Only

tx.getMetaData()

Yes

Yes

tx.setMetaData()

Yes

Yes

Procedure descriptions

Table 2. db.awaitIndex()

Description

Wait for an index to come online.

Example: CALL db.awaitIndex("MyIndex", 300)

Signature

db.awaitIndex(indexName :: STRING?, timeOutSeconds = 300 :: INTEGER?) :: VOID

Mode

READ

Table 3. db.awaitIndexes()

Description

Wait for all indexes to come online.

Example: CALL db.awaitIndexes(300)

Signature

db.awaitIndexes(timeOutSeconds = 300 :: INTEGER?) :: VOID

Mode

READ

Table 4. db.checkpoint() Enterprise Edition

Description

Initiate and wait for a new check point, or wait any already on-going check point to complete.

Note that this temporarily disables the dbms.checkpoint.iops.limit setting in order to make the check point complete faster. This might cause transaction throughput to degrade slightly, due to increased IO load.

Signature

db.checkpoint() :: (success :: BOOLEAN?, message :: STRING?)

Mode

DBMS

Table 5. db.clearQueryCaches() Admin Only

Description

Clears all query caches.

Signature

db.clearQueryCaches() :: (value :: STRING?)

Mode

DBMS

Table 6. db.constraints() Deprecated in 4.2

Description

List all constraints in the database.

Signature

db.constraints() :: (name :: STRING?, description :: STRING?, details :: STRING?)

Mode

READ

Replaced by

SHOW CONSTRAINTS. For more information, see Database administration.

Table 7. db.createIndex() Deprecated in 4.2

Description

Create a named schema index with specified index provider and configuration (optional).

Yield: name, labels, properties, providerName, status

Signature

db.createIndex(indexName :: STRING?, labels :: LIST? OF STRING?, properties :: LIST? OF STRING?, providerName :: STRING?, config = {} :: MAP?) :: (name :: STRING?, labels :: LIST? OF STRING?, properties :: LIST? OF STRING?, providerName :: STRING?, status :: STRING?)

Mode

SCHEMA

Replaced by

CREATE INDEX. For more information, see Database administration.

Table 8. db.createLabel()

Description

Create a label

Signature

db.createLabel(newLabel :: STRING?) :: VOID

Mode

WRITE

Table 9. db.createNodeKey() Enterprise Edition Deprecated in 4.2

Description

Create a named node key constraint. Backing index will use specified index provider and configuration (optional).

Yield: name, labels, properties, providerName, status

Signature

db.createNodeKey(constraintName :: STRING?, labels :: LIST? OF STRING?, properties :: LIST? OF STRING?, providerName :: STRING?, config = {} :: MAP?) :: (name :: STRING?, labels :: LIST? OF STRING?, properties :: LIST? OF STRING?, providerName :: STRING?, status :: STRING?)

Mode

SCHEMA

Replaced by

CREATE CONSTRAINT …​ IS NODE KEY. For more information, see Database administration.

Table 10. db.createProperty()

Description

Create a Property

Signature

db.createProperty(newProperty :: STRING?) :: VOID

Mode

WRITE

Table 11. db.createRelationshipType()

Description

Create a RelationshipType

Signature

db.createRelationshipType(newRelationshipType :: STRING?) :: VOID

Mode

WRITE

Table 12. db.createUniquePropertyConstraint() Deprecated in 4.2

Description

Create a named unique property constraint.

Backing index will use specified index provider and configuration (optional).

Yield: name, labels, properties, providerName, status

Signature

db.createUniquePropertyConstraint(constraintName :: STRING?, labels :: LIST? OF STRING?, properties :: LIST? OF STRING?, providerName :: STRING?, config = {} :: MAP?) :: (name :: STRING?, labels :: LIST? OF STRING?, properties :: LIST? OF STRING?, providerName :: STRING?, status :: STRING?)

Mode

SCHEMA

Replaced by

CREATE CONSTRAINT …​ IS UNIQUE. For more information, see Database administration.

Table 13. db.index.fulltext.awaitEventuallyConsistentIndexRefresh()

Description

Wait for the updates from recently committed transactions to be applied to any eventually-consistent full-text indexes.

Signature

db.index.fulltext.awaitEventuallyConsistentIndexRefresh() :: VOID

Mode

READ

Table 14. db.index.fulltext.createNodeIndex() Deprecated in 4.3

Description

Create a node full-text index for the given labels and properties.

The optional 'config' map parameter can be used to supply settings to the index. Supported settings are 'analyzer', for specifying what analyzer to use when indexing and querying. Use the db.index.fulltext.listAvailableAnalyzers procedure to see what options are available. And 'eventually_consistent' which can be set to 'true' to make this index eventually consistent, such that updates from committing transactions are applied in a background thread.

Signature

db.index.fulltext.createNodeIndex(indexName :: STRING?, labels :: LIST? OF STRING?, properties :: LIST? OF STRING?, config = {} :: MAP?) :: VOID

Mode

SCHEMA

Replaced by

Table 15. db.index.fulltext.createRelationshipIndex() Deprecated in 4.3

Description

Create a relationship full-text index for the given relationship types and properties.

The optional 'config' map parameter can be used to supply settings to the index. Supported settings are 'analyzer', for specifying what analyzer to use when indexing and querying. Use the db.index.fulltext.listAvailableAnalyzers procedure to see what options are available. And 'eventually_consistent' which can be set to 'true' to make this index eventually consistent, such that updates from committing transactions are applied in a background thread.

Signature

db.index.fulltext.createRelationshipIndex(indexName :: STRING?, relationshipTypes :: LIST? OF STRING?, properties :: LIST? OF STRING?, config = {} :: MAP?) :: VOID

Mode

SCHEMA

Replaced by

Table 16. db.index.fulltext.drop() Deprecated in 4.3

Description

Drop the specified index.

Signature

db.index.fulltext.drop(indexName :: STRING?) :: VOID

Mode

SCHEMA

Replaced by

Table 17. db.index.fulltext.listAvailableAnalyzers()

Description

List the available analyzers that the full-text indexes can be configured with.

Signature

db.index.fulltext.listAvailableAnalyzers() :: (analyzer :: STRING?, description :: STRING?, stopwords :: LIST? OF STRING?)

Mode

READ

Table 18. db.index.fulltext.queryNodes()

Description

Query the given full-text index.

Returns the matching nodes, and their Lucene query score, ordered by score.

Valid keys for the options map are: 'skip' to skip the top N results; 'limit' to limit the number of results returned.

Signature

db.index.fulltext.queryNodes(indexName :: STRING?, queryString :: STRING?, options = {} :: MAP?) :: (node :: NODE?, score :: FLOAT?)

Mode

READ

Table 19. db.index.fulltext.queryRelationships()

Description

Query the given full-text index.

Returns the matching relationships, and their Lucene query score, ordered by score.

Valid keys for the options map are: 'skip' to skip the top N results; 'limit' to limit the number of results returned.

Signature

db.index.fulltext.queryRelationships(indexName :: STRING?, queryString :: STRING?, options = {} :: MAP?) :: (relationship :: RELATIONSHIP?, score :: FLOAT?)

Mode

READ

Table 20. db.indexDetails() Deprecated in 4.2

Description

Detailed description of specific index.

Signature

db.indexDetails(indexName :: STRING?) :: (id :: INTEGER?, name :: STRING?, state :: STRING?, populationPercent :: FLOAT?, uniqueness :: STRING?, type :: STRING?, entityType :: STRING?, labelsOrTypes :: LIST? OF STRING?, properties :: LIST? OF STRING?, provider :: STRING?, indexConfig :: MAP?, failureMessage :: STRING?)

Mode

READ

Replaced by

Table 21. db.indexes() Deprecated in 4.2

Description

List all indexes in the database.

Signature

db.indexes() :: (id :: INTEGER?, name :: STRING?, state :: STRING?, populationPercent :: FLOAT?, uniqueness :: STRING?, type :: STRING?, entityType :: STRING?, labelsOrTypes :: LIST? OF STRING?, properties :: LIST? OF STRING?, provider :: STRING?)

Mode

READ

Replaced by

Table 22. db.info()

Description

Provides information regarding the database.

Signature

db.info() :: (id :: STRING?, name :: STRING?, creationDate :: STRING?)

Mode

READ

Table 23. db.labels()

Description

List all labels attached to nodes within a database according to the user’s access rights. The procedure returns empty results if the user is not authorized to view those labels.

Signature

db.labels() :: (label :: STRING?)

Mode

READ

Table 24. db.listLocks() Enterprise Edition Admin Only

Description

List all locks at this database.

Signature

db.listLocks() :: (mode :: STRING?, resourceType :: STRING?, resourceId :: INTEGER?, transactionId :: STRING?)

Mode

DBMS

Table 25. db.ping()

Description

This procedure can be used by client side tooling to test whether they are correctly connected to a database. The procedure is available in all databases and always returns true. A faulty connection can be detected by not being able to call this procedure.

Signature

db.ping() :: (success :: BOOLEAN?)

Mode

READ

Table 26. db.prepareForReplanning() Admin Only

Description

Triggers an index resample and waits for it to complete, and after that clears query caches. After this procedure has finished queries will be planned using the latest database statistics.

Signature

db.prepareForReplanning(timeOutSeconds = 300 :: INTEGER?) :: VOID

Mode

READ

Table 27. db.propertyKeys()

Description

List all property keys in the database.

Signature

db.propertyKeys() :: (propertyKey :: STRING?)

Mode

READ

Table 28. db.relationshipTypes()

Description

List all types attached to relationships within a database according to the user’s access rights. The procedure returns empty results if the user is not authorized to view those relationship types.

Signature

db.relationshipTypes() :: (relationshipType :: STRING?)

Mode

READ

Table 29. db.resampleIndex()

Description

Schedule resampling of an index.

Example: CALL db.resampleIndex("MyIndex")

Signature

db.resampleIndex(indexName :: STRING?) :: VOID

Mode

READ

Table 30. db.resampleOutdatedIndexes()

Description

Schedule resampling of all outdated indexes.

Signature

db.resampleOutdatedIndexes() :: VOID

Mode

READ

Table 31. db.schema.nodeTypeProperties()

Description

Show the derived property schema of the nodes in tabular form.

Signature

db.schema.nodeTypeProperties() :: (nodeType :: STRING?, nodeLabels :: LIST? OF STRING?, propertyName :: STRING?, propertyTypes :: LIST? OF STRING?, mandatory :: BOOLEAN?)

Mode

READ

Table 32. db.schema.relTypeProperties()

Description

Show the derived property schema of the relationships in tabular form.

Signature

db.schema.relTypeProperties() :: (relType :: STRING?, propertyName :: STRING?, propertyTypes :: LIST? OF STRING?, mandatory :: BOOLEAN?)

Mode

READ

Table 33. db.schema.visualization()

Description

Visualizes the schema of the data based on available statistics. A new node is returned for each label. The properties represented on the node include name (label name), indexes (list of indexes), and constraints (list of constraints). A relationship of a given type is returned for all possible combinations of start and end nodes. Note that this may include additional relationships that do not exist in the data due to the information available in the count store.

Signature

db.schema.visualization() :: (nodes :: LIST? OF NODE?, relationships :: LIST? OF RELATIONSHIP?)

Mode

READ

Table 34. db.schemaStatements() Deprecated in 4.2

Description

List all statements for creating and dropping existing indexes and constraints. Note that only index types introduced before Neo4j 4.3 are included.

Signature

db.schemaStatements() :: (name :: STRING?, type :: STRING?, createStatement :: STRING?, dropStatement :: STRING?)

Mode

READ

Replaced by

SHOW INDEXES YIELD * and SHOW CONSTRAINTS YIELD *. For more information, see Database administration.

Table 35. db.stats.clear() Admin Only

Description

Clear collected data of a given data section.

Valid sections are 'QUERIES'

Signature

db.stats.clear(section :: STRING?) :: (section :: STRING?, success :: BOOLEAN?, message :: STRING?)

Mode

READ

Table 36. db.stats.collect() Admin Only

Description

Start data collection of a given data section.

Valid sections are 'QUERIES'

Signature

db.stats.collect(section :: STRING?, config = {} :: MAP?) :: (section :: STRING?, success :: BOOLEAN?, message :: STRING?)

Mode

READ

Table 37. db.stats.retrieve() Admin Only

Description

Retrieve statistical data about the current database.

Valid sections are 'GRAPH COUNTS', 'TOKENS', 'QUERIES', 'META'

Signature

db.stats.retrieve(section :: STRING?, config = {} :: MAP?) :: (section :: STRING?, data :: MAP?)

Mode

READ

Table 38. db.stats.retrieveAllAnonymized() Admin Only

Description

Retrieve all available statistical data about the current database, in an anonymized form.

Signature

db.stats.retrieveAllAnonymized(graphToken :: STRING?, config = {} :: MAP?) :: (section :: STRING?, data :: MAP?)

Mode

READ

Table 39. db.stats.status() Admin Only

Description

Retrieve the status of all available collector daemons, for this database.

Signature

db.stats.status() :: (section :: STRING?, status :: STRING?, data :: MAP?)

Mode

READ

Table 40. db.stats.stop() Admin Only

Description

Stop data collection of a given data section.

Valid sections are 'QUERIES'

Signature

db.stats.stop(section :: STRING?) :: (section :: STRING?, success :: BOOLEAN?, message :: STRING?)

Mode

READ

Table 41. dbms.cluster.routing.getRoutingTable()

Description

Returns endpoints of this instance.

Signature

dbms.cluster.routing.getRoutingTable(context :: MAP?, database = null :: STRING?) :: (ttl :: INTEGER?, servers :: LIST? OF MAP?)

Mode

DBMS

Table 42. dbms.cluster.overview() Enterprise Edition

Description

Overview of all currently accessible cluster members, their databases and roles.

Signature

dbms.cluster.overview() :: (id :: STRING?, addresses :: LIST? OF STRING?, databases :: MAP?, groups :: LIST? OF STRING?)

Mode

READ

Table 43. dbms.cluster.protocols() Enterprise Edition

Description

Overview of installed protocols.

Note that this can only be executed on a cluster core member.

Signature

dbms.cluster.protocols() :: (orientation :: STRING?, remoteAddress :: STRING?, applicationProtocol :: STRING?, applicationProtocolVersion :: INTEGER?, modifierProtocols :: STRING?)

Mode

READ

Table 44. dbms.cluster.quarantineDatabase() Enterprise Edition Deprecated in 4.3

Description

Place a database in quarantine or remove thereof.

Signature

dbms.cluster.quarantineDatabase(databaseName :: STRING?, setStatus :: BOOLEAN?, reason = No reason given :: STRING?) :: (databaseName :: STRING?, quarantined :: BOOLEAN?, result :: STRING?)

Mode

DBMS

Replaced by

Table 45. dbms.cluster.readReplicaToggle() Enterprise Edition

Description

The toggle can pause or resume the pulling of new transactions for a specific database. If paused, the Read Replica does not pull new transactions from the other cluster members for the specific database. The Read Replica is still available for reads, you can perform a backup, etc.

What is it for?

You can perform a point in time backup, as the backup will contain only the transactions up to the point where the transaction pulling was paused.

  1. Connect directly to the Read Replica cluster member. (Neo4j Driver use bolt:// or use the HTTP API).

  2. Pause transaction pulling for the specified database.

  3. Create a point in time backup, see Back up an online database.

If connected directly to a Read Replica, Data Scientists can execute analysis on a specific database that is paused, the data will not unexpectedly change while performing the analysis.

This procedure can only be executed on a Read Replica cluster member.

Pause transaction pulling for database neo4j
CALL dbms.cluster.readReplicaToggle("neo4j", true)
Resume transaction pulling for database neo4j
CALL dbms.cluster.readReplicaToggle("neo4j", false)

Signature

dbms.cluster.readReplicaToggle(databaseName :: STRING?, pause :: BOOLEAN?) :: (state :: STRING?)

Mode

READ

Table 46. dbms.cluster.role() Enterprise Edition

Description

The role of this instance in the cluster for the specified database.

Signature

dbms.cluster.role(database :: STRING?) :: (role :: STRING?)

Mode

READ

Table 47. dbms.cluster.setDefaultDatabase() Enterprise Edition

Description

Change the default database to the provided value.

The database must exist and the old default database must be stopped.

For more information see Change the default database.

Note that this can only be executed on a cluster core member.

Signature

dbms.cluster.setDefaultDatabase(databaseName :: STRING?) :: (result :: STRING?)

Mode

WRITE

Table 48. dbms.components()

Description

List DBMS components and their versions.

Signature

dbms.components() :: (name :: STRING?, versions :: LIST? OF STRING?, edition :: STRING?)

Mode

DBMS

Table 49. dbms.database.state()

Description

The actual status of the database with the provided name on this neo4j instance.

Signature

dbms.database.state(databaseName :: STRING?) :: (role :: STRING?, address :: STRING?, status :: STRING?, error :: STRING?)

Mode

READ

Table 50. dbms.functions() Deprecated in 4.3

Description

List all functions in the DBMS.

Signature

dbms.functions() :: (name :: STRING?, signature :: STRING?, category :: STRING?, description :: STRING?, aggregating :: BOOLEAN?, defaultBuiltInRoles :: LIST? OF STRING?)

Mode

DBMS

Replaced by

Table 51. dbms.info()

Description

Provides information regarding the DBMS.

Signature

dbms.info() :: (id :: STRING?, name :: STRING?, creationDate :: STRING?)

Mode

DBMS

Table 52. dbms.killConnection()

Description

Kill network connection with the given connection id.

Signature

dbms.killConnection(id :: STRING?) :: (connectionId :: STRING?, username :: STRING?, message :: STRING?)

Mode

DBMS

Table 53. dbms.killConnections()

Description

Kill all network connections with the given connection ids.

Signature

dbms.killConnections(ids :: LIST? OF STRING?) :: (connectionId :: STRING?, username :: STRING?, message :: STRING?)

Mode

DBMS

Table 54. dbms.killQueries() Deprecated in 4.4

Description

Kill all transactions executing a query with any of the given query ids.

Signature

dbms.killQueries(ids :: LIST? OF STRING?) :: (queryId :: STRING?, username :: STRING?, message :: STRING?)

Mode

DBMS

Replaced by

Table 55. dbms.killQuery() Deprecated in 4.4

Description

Kill all transactions executing the query with the given query id.

Signature

dbms.killQuery(id :: STRING?) :: (queryId :: STRING?, username :: STRING?, message :: STRING?)

Mode

DBMS

Replaced by

Table 56. dbms.killTransaction() Deprecated in 4.4

Description

Kill transaction with provided id.

Signature

dbms.killTransaction(id :: STRING?) :: (transactionId :: STRING?, username :: STRING?, message :: STRING?)

Mode

DBMS

Replaced by

Table 57. dbms.killTransactions() Deprecated in 4.4

Description

Kill transactions with provided ids.

Signature

dbms.killTransactions(ids :: LIST? OF STRING?) :: (transactionId :: STRING?, username :: STRING?, message :: STRING?)

Mode

DBMS

Replaced by

Table 58. dbms.listActiveLocks() Enterprise Edition

Description

List the active lock requests granted for the transaction executing the query with the given query id.

Signature

dbms.listActiveLocks(queryId :: STRING?) :: (mode :: STRING?, resourceType :: STRING?, resourceId :: INTEGER?)

Mode

DBMS

Table 59. dbms.listConfig() Admin Only

Description

List the currently active config of Neo4j.

Signature

dbms.listConfig(searchString = :: STRING?) :: (name :: STRING?, description :: STRING?, value :: STRING?, dynamic :: BOOLEAN?)

Mode

DBMS

Table 60. dbms.listConnections()

Description

List all accepted network connections at this instance that are visible to the user.

Signature

dbms.listConnections() :: (connectionId :: STRING?, connectTime :: STRING?, connector :: STRING?, username :: STRING?, userAgent :: STRING?, serverAddress :: STRING?, clientAddress :: STRING?)

Mode

DBMS

Table 61. dbms.listPools() Enterprise Edition

Description

List all memory pools, including sub pools, currently registered at this instance that are visible to the user.

Signature

dbms.listPools() :: (pool :: STRING?, databaseName :: STRING?, heapMemoryUsed :: STRING?, heapMemoryUsedBytes :: STRING?, nativeMemoryUsed :: STRING?, nativeMemoryUsedBytes :: STRING?, freeMemory :: STRING?, freeMemoryBytes :: STRING?, totalPoolMemory :: STRING?, totalPoolMemoryBytes :: STRING?)

Mode

DBMS

Table 62. dbms.listQueries() Deprecated in 4.4

Description

List all queries currently executing at this instance that are visible to the user.

Signature

dbms.listQueries() :: (queryId :: STRING?, username :: STRING?, metaData :: MAP?, query :: STRING?, parameters :: MAP?, planner :: STRING?, runtime :: STRING?, indexes :: LIST? OF MAP?, startTime :: STRING?, protocol :: STRING?, clientAddress :: STRING?, requestUri :: STRING?, status :: STRING?, resourceInformation :: MAP?, activeLockCount :: INTEGER?, elapsedTimeMillis :: INTEGER?, cpuTimeMillis :: INTEGER?, waitTimeMillis :: INTEGER?, idleTimeMillis :: INTEGER?, allocatedBytes :: INTEGER?, pageHits :: INTEGER?, pageFaults :: INTEGER?, connectionId :: STRING?, database :: STRING?)

Mode

DBMS

Replaced by

Table 63. dbms.listTransactions() Deprecated in 4.4

Description

List all transactions currently executing at this instance that are visible to the user.

Signature

dbms.listTransactions() :: (transactionId :: STRING?, username :: STRING?, metaData :: MAP?, startTime :: STRING?, protocol :: STRING?, clientAddress :: STRING?, requestUri :: STRING?, currentQueryId :: STRING?, currentQuery :: STRING?, activeLockCount :: INTEGER?, status :: STRING?, resourceInformation :: MAP?, elapsedTimeMillis :: INTEGER?, cpuTimeMillis :: INTEGER?, waitTimeMillis :: INTEGER?, idleTimeMillis :: INTEGER?, allocatedBytes :: INTEGER?, allocatedDirectBytes :: INTEGER?, pageHits :: INTEGER?, pageFaults :: INTEGER?, connectionId :: STRING?, initializationStackTrace :: STRING?, database :: STRING?, estimatedUsedHeapMemory :: INTEGER?)

Mode

DBMS

Replaced by

Table 64. dbms.procedures() Deprecated in 4.3

Description

List all procedures in the DBMS.

Signature

dbms.procedures() :: (name :: STRING?, signature :: STRING?, description :: STRING?, mode :: STRING?, defaultBuiltInRoles :: LIST? OF STRING?, worksOnSystem :: BOOLEAN?)

Mode

DBMS

Replaced by

Table 65. dbms.quarantineDatabase

Description

Place a database in quarantine or remove thereof.

Signature

dbms.quarantineDatabase(databaseName :: STRING?, setStatus :: BOOLEAN?, reason = No reason given :: STRING?) :: (databaseName :: STRING?, quarantined :: BOOLEAN?, result :: STRING?)

Mode

DBMS

Table 66. dbms.queryJmx()

Description

Query JMX management data by domain and name.

Valid queries should use the syntax outlined in the javax.management.ObjectName API documentation.
For instance, use "*:*" to find all JMX beans.

Signature

dbms.queryJmx(query :: STRING?) :: (name :: STRING?, description :: STRING?, attributes :: MAP?)

Mode

DBMS

Table 67. dbms.routing.getRoutingTable()

Description

Returns endpoints of this instance.

Signature

dbms.routing.getRoutingTable(context :: MAP?, database = null :: STRING?) :: (ttl :: INTEGER?, servers :: LIST? OF MAP?)

Mode

DBMS

Table 68. dbms.scheduler.failedJobs() Enterprise Edition Admin Only

Description

List failed job runs. There is a limit for amount of historical data.

Signature

dbms.scheduler.failedJobs() :: (jobId :: STRING?, group :: STRING?, database :: STRING?, submitter :: STRING?, description :: STRING?, type :: STRING?, submitted :: STRING?, executionStart :: STRING?, failureTime :: STRING?, failureDescription :: STRING?)

Mode

DBMS

Table 69. dbms.scheduler.groups() Enterprise Edition Admin Only

Description

List the job groups that are active in the database internal job scheduler.

Signature

dbms.scheduler.groups() :: (group :: STRING?, threads :: INTEGER?)

Mode

DBMS

Table 70. dbms.scheduler.jobs() Enterprise Edition Admin Only

Description

List all jobs that are active in the database internal job scheduler.

Signature

dbms.scheduler.jobs() :: (jobId :: STRING?, group :: STRING?, submitted :: STRING?, database :: STRING?, submitter :: STRING?, description :: STRING?, type :: STRING?, scheduledAt :: STRING?, period :: STRING?, state :: STRING?, currentStateDescription :: STRING?)

Mode

DBMS

Table 71. dbms.scheduler.profile() Enterprise Edition Admin Only

Description

Begin profiling all threads within the given job group, for the specified duration.

Note that profiling incurs overhead to a system, and will slow it down.

Signature

dbms.scheduler.profile(method :: STRING?, group :: STRING?, duration :: STRING?) :: (profile :: STRING?)

Mode

DBMS

Table 72. dbms.security.activateUser() Enterprise Edition Admin Only Deprecated in 4.0

Description

Activate a suspended user.

Signature

dbms.security.activateUser(username :: STRING?, requirePasswordChange = true :: BOOLEAN?) :: VOID

Mode

WRITE

Table 73. dbms.security.addRoleToUser() Enterprise Edition Admin Only Deprecated in 4.0

Description

Assign a role to the user.

Signature

dbms.security.addRoleToUser(roleName :: STRING?, username :: STRING?) :: VOID

Mode

WRITE

Table 74. dbms.security.changePassword() Admin Only Deprecated in 4.0

Description

Change the current user’s password.

Signature

dbms.security.changePassword(password :: STRING?, requirePasswordChange = false :: BOOLEAN?) :: VOID

Mode

WRITE

Table 75. dbms.security.changeUserPassword() Enterprise Edition Admin Only Deprecated in 4.0

Description

Change the given user’s password.

Signature

dbms.security.changeUserPassword(username :: STRING?, newPassword :: STRING?, requirePasswordChange = true :: BOOLEAN?) :: VOID

Mode

WRITE

Table 76. dbms.security.clearAuthCache() Enterprise Edition Admin Only

Description

Clears authentication and authorization cache.

Signature

dbms.security.clearAuthCache() :: VOID

Mode

DBMS

Table 77. dbms.security.createRole() Enterprise Edition Admin Only Deprecated in 4.0

Description

Create a new role.

Signature

dbms.security.createRole(roleName :: STRING?) :: VOID

Mode

WRITE

Table 78. dbms.security.createUser() Admin Only Deprecated in 4.0

Description

Create a new user.

Signature

dbms.security.createUser(username :: STRING?, password :: STRING?, requirePasswordChange = true :: BOOLEAN?) :: VOID

Mode

WRITE

Table 79. dbms.security.deleteRole() Enterprise Edition Admin Only Deprecated in 4.0

Description

Delete the specified role. Any role assignments will be removed.

Signature

dbms.security.deleteRole(roleName :: STRING?) :: VOID

Mode

WRITE

Table 80. dbms.security.deleteUser() Admin Only Deprecated in 4.0

Description

Delete the specified user.

Signature

dbms.security.deleteUser(username :: STRING?) :: VOID

Mode

WRITE

Table 81. dbms.security.listRoles() Enterprise Edition Admin Only Deprecated in 4.0

Description

List all available roles.

Signature

dbms.security.listRoles() :: (role :: STRING?, users :: LIST? OF STRING?)

Mode

READ

Table 82. dbms.security.listRolesForUser() Enterprise Edition Deprecated in 4.0

Description

List all roles assigned to the specified user.

Signature

dbms.security.listRolesForUser(username :: STRING?) :: (value :: STRING?)

Mode

READ

Table 83. dbms.security.listUsers() Admin Only Deprecated in 4.0

Description

List all native users.

Signature

dbms.security.listUsers() :: (username :: STRING?, roles :: LIST? OF STRING?, flags :: LIST? OF STRING?)

Mode

READ

Table 84. dbms.security.listUsersForRole() Enterprise Edition Admin Only Deprecated in 4.0

Description

List all users currently assigned the specified role.

Signature

dbms.security.listUsersForRole(roleName :: STRING?) :: (value :: STRING?)

Mode

READ

Table 85. dbms.security.removeRoleFromUser() Enterprise Edition Admin Only Deprecated in 4.0

Description

Unassign a role from the user.

Signature

dbms.security.removeRoleFromUser(roleName :: STRING?, username :: STRING?) :: VOID

Mode

WRITE

Table 86. dbms.security.suspendUser() Enterprise Edition Admin Only Deprecated in 4.0

Description

Suspend the specified user.

Signature

dbms.security.suspendUser(username :: STRING?) :: VOID

Mode

WRITE

Table 87. dbms.setConfigValue() Enterprise Edition Admin Only

Description

Update a given setting value. Passing an empty value results in removing the configured value and falling back to the default value. Changes do not persist and are lost if the server is restarted. In a clustered environment, dbms.setConfigValue affects only the cluster member it is run against.

Signature

dbms.setConfigValue(setting :: STRING?, value :: STRING?) :: VOID

Mode

DBMS

Table 88. dbms.showCurrentUser()

Description

Show the current user.

Signature

dbms.showCurrentUser() :: (username :: STRING?, roles :: LIST? OF STRING?, flags :: LIST? OF STRING?)

Mode

DBMS

Table 89. dbms.upgrade() Admin Only

Description

Upgrade the system database schema if it is not the current schema.

Signature

dbms.upgrade() :: (status :: STRING?, upgradeResult :: STRING?)

Mode

WRITE

Table 90. dbms.upgradeStatus() Admin Only

Description

Report the current status of the system database sub-graph schema.

Signature

dbms.upgradeStatus() :: (status :: STRING?, description :: STRING?, resolution :: STRING?)

Mode

READ

Table 91. tx.getMetaData()

Description

Provides attached transaction metadata.

Signature

tx.getMetaData() :: (metadata :: MAP?)

Mode

DBMS

Table 92. tx.setMetaData()

Description

Attaches a map of data to the transaction. The data will be printed when listing queries, and inserted into the query log.

Signature

tx.setMetaData(data :: MAP?) :: VOID

Mode

DBMS