🚀 Try Zilliz Cloud, the fully managed Milvus, for free—experience 10x faster performance! Try Now>>

Milvus
Zilliz
< Docs
  • Java

alterDatabaseProperties()

This operation alters a database’s properties.

public Void alterDatabaseProperties(AlterDatabasePropertiesReq request)

Request Syntax

alterDatabaseProperties(AlterDatabasePropertiesReq.builder()
    .databaseName(String databaseName)
    .properties(Map<String, String> properties)
    .build()
)

BUILDER METHODS:

  • databaseName(String databaseName)

    The name of the database.

  • properties(Map<String, String> properties)

    The properties of the database, such as replica number, resource groups. Possible database properties are as follows:

    • database.replica.number -

      Number of replicas for the database.

    • database.resource_groups -

      Resource groups dedicated to the database.

    • database.diskQuota.mb -

      Disk quota allocated to the database in megabytes (MB).

    • database.max.collections -

      Maximum number of collections allowed in the database.

    • database.force.deny.writing -

      Whether to deny all write operations in the database.

    • database.force.deny.reading -

      Whether to deny all read operations in the database.

RETURNS:

void

EXCEPTIONS:

  • MilvusClientExceptions

    This exception will be raised when any error occurs during this operation.

Example

Map<String, String> properties = new HashMap<>();
properties.put("database.replica.number", "1");
AlterDatabasePropertiesReq alterDatabasePropertiesReq = AlterDatabasePropertiesReq.builder()
        .databaseName(databaseName)
        .properties(properties)
        .build();
client.alterDatabaseProperties(alterDatabaseReq);

Try Managed Milvus for Free

Zilliz Cloud is hassle-free, powered by Milvus and 10x faster.

Get Started
Feedback

Was this page helpful?