alterDatabase()

This operation modifies database properties, such as setting or deleting configuration key-value pairs.

await milvusClient.alterDatabase(data: AlterDatabaseRequest)

Request Syntax

await milvusClient.alterDatabase({
    db_name: string,
    properties: object,
    delete_keys?: string[],
    timeout?: number,
})

PARAMETERS:

  • db_name (string) -

    [REQUIRED]

    The name of the database.

  • properties (object) -

    [REQUIRED]

    An object of properties to set (e.g., { "database.replica.number": "2" }).

  • delete_keys (string[]) -

    Property keys to delete. Optional.

  • timeout (number) -

    RPC timeout in milliseconds. Optional.

RETURNS:

Promise

EXCEPTIONS:

  • MilvusError

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

Example

import { MilvusClient } from '@zilliz/milvus2-sdk-node';

const client = new MilvusClient({
    address: 'localhost:19530',
    token: 'root:Milvus',
});
await client.alterDatabase({
    db_name: 'my_database',
    properties: { 'database.replica.number': '2' },
});

Try Managed Milvus for Free

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

Get Started
Feedback

Was this page helpful?