A.2. Built-in procedures

This section shows the built-in procedures that are bundled with Neo4j.

A.2.1. General-purpose procedures

Neo4j comes bundled with a number of built-in procedures. These can be used to:

  • Inspect schema.
  • Inspect meta data.
  • Explore procedures and components.
  • Monitor management data.

A subset of these are listed in the table below. Running CALL dbms.procedures() will display the full list of all the procedures.

Procedure name Command to invoke procedure What it does

ListLabels

CALL db.labels()

List all labels in the database.

ListRelationshipTypes

CALL db.relationshipTypes()

List all relationship types in the database.

ListPropertyKeys

CALL db.propertyKeys()

List all property keys in the database.

ListIndexes

CALL db.indexes()

List all indexes in the database.

AwaitIndex

CALL db.awaitIndex(label, property, timeout)

Wait for the specified index to come online.

ListConstraints

CALL db.constraints()

List all constraints in the database.

ListProcedures

CALL dbms.procedures()

List all procedures in the DBMS.

ListFunctions

CALL dbms.functions()

List all user functions in the DBMS.

ListComponents

CALL dbms.components()

List DBMS components and their versions.

ListConfig

CALL dbms.listConfig()

List the currently active config of Neo4j.

QueryJmx

CALL dbms.queryJmx(query)

Query JMX management data by domain and name. For instance, "org.neo4j:*".

dbms.setTXMetaData

CALL dbms.setTXMetaData(<map>)

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

A.2.2. Procedures for native user and role management

We provide below a list of all available procedures for native user and role management. These procedures are available in Neo4j Enterprise Edition.

Name Description

dbms.security.activateUser

Activate a user

dbms.security.addRoleToUser

Assign a role to a user

dbms.security.changeUserPassword

Change a user’s password

dbms.security.changePassword

Change your own password

dbms.security.createRole

Create a custom role

dbms.security.createUser

Add a user

dbms.security.deleteRole

Delete a custom role

dbms.security.deleteUser

Delete a user

dbms.security.listRoles

List all roles

dbms.security.listRolesForUser

List all roles for a user

dbms.security.listUsers

List all users

dbms.security.listUsersForRole

List all users for a role

dbms.security.removeRoleFromUser

Remove a role from a user

dbms.security.suspendUser

Suspend a user