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. Assume that you create a ticket to perform a data change or schema design on a database and the database belongs to a database group. After you select the database, DMS sends 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.

Create a database group

  1. Log on to the DMS console.
  2. In the top navigation bar, move the pointer over the More icon and choose System > Database grouping.
  3. Click New Group.
  4. In the NewGrouping dialog box, perform the following steps:
    1. Enter a group name in the Group name field.
    2. Set the Grouping type parameter to General grouping.
      Note You cannot set this parameter to Remote live. This feature will be available soon.
    3. Click Add database. In the Search database dialog box, enter a prefix in the search box to search for databases. Select one or more databases to be grouped from the matched results and click Add in the Operation column.
      Database grouping: Add databases
    4. After you add all the databases to be grouped, click the Close icon icon in the upper-right corner to close the Search database dialog box.
  5. After you complete the configurations, click Save.
    Save icon

Scenarios

  • Data change
    Assume that you create a ticket to perform a data change on a database and the database belongs to a database group. After you select the database, DMS sends a message to remind you that the selected database belongs to a database 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 figure shows the message. Create a data change ticket

    The data change ticket must be a Normal Data Modify ticket, a Lockless change ticket, a History Data Clean ticket, a Large Data Import ticket, or a Programmable Object ticket. For more information about how to create a ticket, click the corresponding link.

  • Schema design
    Assume that 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 sends 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. The following figure shows the message. Create a schema design ticket

    For more information about how to use the schema design feature, see Design schemas.