Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • Pricing
  • Documentation
  • Contact us
Get started
Yandex Database
  • Getting started
    • Overview
    • Create databases
    • Examples of YQL queries
    • Examples of operations in the YDB CLI
    • Launch a test app
    • Document API
    • Developing in NodeJS through the Document API
  • Step-by-step instructions
    • Database management
    • How to connect to a database
    • Table management
    • Reading and writing data
    • Working with secondary indexes
  • Working with the SDK
  • Concepts
    • Overview
    • Data model and schema
    • Serverless and Dedicated operation modes
    • Data types
    • Transactions
    • Secondary indexes
    • Time to Live (TTL)
    • Terms and definitions
    • Quotas and limits
  • Access management
  • Pricing policy
    • Overview
    • Serverless mode
    • Dedicated mode
  • Recommendations
    • Schema design
    • Partitioning tables
    • Secondary indexes
    • Paginated output
    • Loading large data volumes
    • Using timeouts
  • YDB API and API reference
    • Database limits
    • Handling errors in the API
  • Amazon DynamoDB-compatible HTTP API
    • API reference
      • All methods
      • Actions
        • BatchGetItem
        • BatchWriteItem
        • CreateTable
        • DeleteItem
        • DeleteTable
        • DescribeTable
        • GetItem
        • ListTables
        • PutItem
        • Query
        • Scan
        • TransactGetItems
        • TransactWriteItems
        • UpdateItem
      • Common errors
  • YQL reference guide
    • Overview
    • Data types
      • Simple
      • Optional
      • Containers
      • Special
    • Syntax
      • Unsupported statements
      • For text representation of data types
      • Expressions
      • CREATE TABLE
      • DROP TABLE
      • INSERT INTO
      • UPSERT INTO
      • REPLACE INTO
      • UPDATE
      • DELETE
      • SELECT
      • GROUP BY
      • JOIN
      • FLATTEN
      • ACTION
      • DISCARD
      • PRAGMA
      • DECLARE
      • OVER, PARTITION BY, and WINDOW
    • Built-in functions
      • Basic
      • Aggregate
      • Window
      • For lists
      • For dictionaries
      • For JSON
      • For structures
      • For types
    • Preset user-defined functions
      • HyperScan
      • Pcre
      • Pire
      • Re2
      • String
      • Unicode
      • Datetime
      • Url
      • Ip
      • Digest
      • Math
      • Histogram
    • For text representation of data types
  • YQL tutorial
    • Overview
    • Creating a table
    • Adding data to a table
    • Selecting data from all columns
    • Selecting data from specific columns
    • Sorting and filtering
    • Data aggregation
    • Additional selection criteria
    • Joining tables by JOIN
    • Data insert and update by REPLACE
    • Data insert and update by UPSERT
    • Data insert by INSERT
    • Data update by UPDATE
    • Deleting data
    • Adding and deleting columns
    • Deleting a table
  • Maintenance
    • Backups
  • Diagnostics
    • System views
  • Questions and answers
    • General questions
    • Errors
    • YQL
    • All questions on the same page
  • Public materials
  1. Step-by-step instructions
  2. Database management

Database management

  • Viewing the list of databases
  • Creating a database
  • Updating database settings
  • Deleting a database

Viewing the list of databases

Management console
CLI
  1. In the management console, select the folder to get a list of databases for.
  2. In the list of services, select Yandex Database.

If you don't have the Yandex.Cloud command line interface yet, install and initialize it.

The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name or --folder-id parameter.

To get a list of databases in the default folder, run the command:

$ yc ydb database list

Creating a database

You can create a database in a Serverless configuration or with Dedicated servers in each availability zone. For more information about the differences in configurations, see Overview.

To create a database:

Serverless
Dedicated
  1. In the management console, select a folder to create your database in.

  2. In the list of services, select Yandex Database.

  3. Click Create database.

  4. Enter a name for the database. Naming requirements:

    • The name must be unique within the folder.
    • The name may contain lowercase Latin letters, numbers, and hyphens.
    • The first character must be a letter. The last character can't be a hyphen.
    • The maximum length of the name is 63 characters.
  5. Under Database type, select the Serverless option.

  6. Click Create database.

  7. Wait until the database starts. When a database is being created, it has the Provisioning status. When it is ready for use, the status changes to Running.

  1. In the management console, select a folder to create your database in.

  2. In the list of services, select Yandex Database.

  3. Click Create database.

  4. Enter a name for the database. Naming requirements:

    • The name must be unique within the folder.
    • The name may contain lowercase Latin letters, numbers, and hyphens.
    • The first character must be a letter. The last character can't be a hyphen.
    • The maximum length of the name is 63 characters.
  5. Under Computing resources, select the type and amount of computing resources.

  6. Under Storage groups, select the disk type and number of storage groups that determines the total amount of storage.

  7. Under Network, select a network and allow assigning public IP addresses to DB nodes.

    If you plan to send DB requests both from the Yandex.Cloud network and the internet, select the Assign option next to the Public IP addresses field.

    Warning

    The consumption of outgoing internet traffic for YDB databases with external IPs is accounted for based on the current pricing policy.

    Amounts charged for outgoing internet traffic resulting from the use of YDB will be compensated with grants.

    Select an existing network from the Cloud network list.

    If there is no network, create one:

    • Click Create new.
    • In the window that opens, enter a name for the new network and select the Create subnets option if no subnets were created. Subnets are created for each availability zone.
    • Click Create.
  8. Click Create database.

  9. Wait until the database starts. When a database is being created, it has the Provisioning status. When it is ready for use, the status changes to Running.

Updating database settings

Warning

You can only update settings for databases running in the dedicated server configuration.

Management console
CLI
  1. In the management console, select the folder where you want to update DB settings.
  2. In the list of services, select Yandex Database.
  3. Click in the line with the desired DB and select Change.
  4. Configure the DB settings:
    1. Under Computing resources, select the type and amount of computing resources.
    2. Under Storage groups, select the disk type and number of storage groups that determines the total amount of storage.
  5. Click Edit database.

If you don't have the Yandex.Cloud command line interface yet, install and initialize it.

The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name or --folder-id parameter.

To update DB settings:

  1. View a description of the CLI's update DB parameter command:

    $ yc ydb database update --help
    
  2. Run a command like:

    $ yc ydb database update <DB name> \
                   --new-name <new DB name> \
                   --description <new DB description> \
                   --resource-preset <class ID> \
                   --storage groups=<number of storage groups>                     
                   ...
    

Deleting a database

Management console
CLI
  1. In the management console, select the folder to delete the DB from.
  2. In the list of services, select Yandex Database.
  3. Click in the line with the desired DB and select Delete.
  4. Confirm the deletion.

If you don't have the Yandex.Cloud command line interface yet, install and initialize it.

The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name or --folder-id parameter.

To delete a database, run the command:

$ yc ydb database delete <DB name>
In this article:
  • Viewing the list of databases
  • Creating a database
  • Updating database settings
  • Deleting a database
Language
Careers
Privacy policy
Terms of use
© 2021 Yandex.Cloud LLC