This topic describes how to create a database group in Data Management (DMS). You can use this feature to apply a data change or schema design to all of the databases in a database group with ease.

Prerequisites

The databases that you want to add to a database group meet the following conditions:
  • All of the instances to which the databases belong are managed in Security Collaboration mode.
  • All of the databases are physical databases or logical databases.
  • All of the databases are deployed in the same environment, such as the development environment.
  • The engines of the databases are of the same type. For example, all of the databases are MySQL databases.

Background information

You may deploy your business in multiple regions and have multiple databases. In this case, every time you want to perform a change, you must apply the change to all the databases. This requires you to remember the endpoints of all the databases in the different regions. When you create a data change or schema design ticket, you must select all the databases so as to apply the data change or schema design to all the databases. However, you may accidentally omit one or more databases. This poses risks to the stability of your business. In addition, if you have a large number of databases, time and efforts are needed to select all of the databases. This is also prone to errors.

To resolve this issue, DMS provides the database grouping feature. You can use this feature to group multiple databases that are of the same engine type and deployed in the same environment together. For example, you create a ticket to perform a data change or schema design on a database that belongs to a database group. After you select the database, DMS displays a message to ask whether you want to perform the operation on all of the databases in the group. If you click OK, DMS adds all the other databases in the group as the databases on which the data change or schema design will be performed.

Common scenarios

  • Data change

    For example, you create a ticket to perform a data change on a database that belongs to a database group. After you select the database, DMS displays a message to ask whether you want to perform the operation on all of the databases in the group. If you click OK, DMS adds all the other databases in the group as the databases on which the data change will be performed. This saves your effort in selecting databases one by one. If you click Cancel, the other databases in the group will not be selected.

    The following types of data change tickets are supported: Normal Data Modify, Lockless change, History Data Clean, Large Data Import, and Programmable Object.

  • Schema design

    For example, you create a schema design ticket and select a database that belongs to a database group as a base database. After you click Perform Changes to Base Database, DMS displays a message. This message is used to remind you that the base database belongs to a database group and the current operation will apply to all the other databases in the group. For more information about how to use the schema design feature, see Design schemas.

Create a database group

  1. Log on to the DMS console V5.0.
  2. In the top navigation bar, click O&M. In the left-side navigation pane, click Database Grouping.
  3. On the Database Grouping page, click New Group.
  4. In the NewGrouping dialog box, perform the following steps:
    Parameter Description
    Group name The name of the database group that you want to create.
    Add database Click Add database. In the Search database dialog box, enter a database name in the search box. Find the databases to be grouped from the matched results and click Add in the Operation column.
  5. Click Save.