You are currently browsing legacy 4.1 version of documentation. Click here to switch to the newest 4.2 version.

We can help you with migration to the latest RavenDB

Contact Us Now
see on GitHub

Operations: Server: How to add database node?

AddDatabaseNodeOperation allows you to add extra node to database group.

Syntax

public AddDatabaseNodeOperation(string databaseName, string node = null)

Parameters
databaseName string Name of a database to add node
node string Cluster node tag to extent database to. Default: random node tag.
Return Value
DatabasePutResult Database put result

Example I

// add random node to 'Northwind' database group
store.Maintenance.Server.Send(new AddDatabaseNodeOperation("Northwind"));

Example II

// add node C to 'Northwind' database group
store.Maintenance.Server.Send(new AddDatabaseNodeOperation("Northwind", "C"));