Before you create a data migration or synchronization task, you must configure the data sources. This topic describes how to create an OceanBase-CE data source in OceanBase Migration Service (OMS).
Prerequisites
You have obtained the IP address and port number of the related database.
A database user used for data migration or synchronization is available.
We recommend that you create a dedicated database user for data migration or synchronization and grant the required data operation privileges to the user. For more information, see Create a database user.
Procedure
Log on to the console of OMS Community Edition.
In the left-side navigation pane, click Data Source Management.
On the Data Sources page, click New Data Source in the upper-right corner.
In the Create Data Source dialog box, configure the parameters. The default value of Data Source Type is OceanBase-CE.
Parameter Description Data Source Identifier We recommend that you set it to a combination of digits and letters. It must not contain any spaces and cannot exceed 32 characters in length. Region The region where the data source resides. Select a region from the drop-down list.
Notice- This parameter is displayed only when multiple regions are available.
- Make sure that the mappings between the data source and the region are consistent. Otherwise, the migration and synchronization performance can be poor.
Tenant Type The type of tenants of OceanBase Database Community Edition. At present, only MySQL tenants are supported. OCP Cluster (Optional) The OceanBase Cloud Platform (OCP) cluster associated with the data source. Select an OCP cluster from the drop-down list. - Check whether the data source is managed in the selected OCP cluster.
- This parameter allows OMS Community Edition to obtain the incremental data of OceanBase Database Community Edition. If you do not set this parameter, you cannot select Incremental Synchronization or Reverse Incremental Migration.
Input Method Valid values: Manual Input and Command-line Connection String. - Manual Input: Enter the public IP address and port of OceanBase Database Community Edition.
- Command-line Connection String: Enter the command-line connection string.
Host IP Address The IP address of the host where the database is located. Port The port number of the host where the database is located. Tenant Name (Optional) The name of the tenant of OceanBase Database Community Edition.
If you want to create an OceanBase data source on Alibaba Cloud, you do not need to enter the tenant name.Cluster Name (Optional) The name of the cluster where the tenant of OceanBase Database Community Edition resides. Database Username The username of OceanBase Database Community Edition for data migration or synchronization. We recommend that you create a dedicated database user for data migration. Database Password The password of the database user. Database Name (Optional) The name of the database.
Note
If you specify Database Name, when the created data source serves as the source data source of a data migration or synchronization task, you can select only objects in the specified database as the migration or synchronization objects.Remarks (Optional) Additional information about the data source. (Optional) In the Create Data Source dialog box, click Show next to Advanced Options to set the parameters as needed.
Parameter Description DRC User Name (Optional) This user is used to read incremental data and database object schemas from OceanBase Database Community Edition. You must create this user in the sys tenant of your business cluster. Configurl or RootService (Optional) The ConfigUrl is used to obtain the actual IP address of the server where OceanBase Database Community Edition runs. - If you specify OCP Cluster, this parameter is not displayed. In this case, OMS Community Edition automatically obtains the ConfigUrl from the OCP cluster.
- If you do not specify OCP Cluster, you can enter Username and Password and then click Search in OBServer next to the ConfigUrl or RootService field to obtain the ConfigUrl or RootService list.
If the query fails, you can run theshow parameters like 'obconfig_url'command in the sys tenant of OceanBase Database Community Edition. The returned value is the ConfigUrl. If you run theshow parameters like 'rootservice_list';command, the returned value is the RootService list.
Password (Optional) The password of the user specified by the drc_userparameter.__OCEANBASE_INNER_DRC_USER password (Optional) This user is used to migrate data of tables without a unique key in OceanBase Database.
Notice
You must create this user in the tenant where the current data source resides.When you create a data migration or synchronization task with an OceanBase-CE data source as the source:
You must enter the username and password for schema migration, schema synchronization, and incremental synchronization. If OCP Cluster is not specified, you must also enter the ConfigUrl or RootService list.
When you migrate a table without a unique key, you must enter the password of the
_OCEANBASE_INNER_DRC_USERuser.
When you create a data migration task with an OceanBase-CE data source serving as the destination, you must enter the username and password for reverse incremental migration. If OCP Cluster is not specified, you must also enter the ConfigUrl or RootService list.
Click Test Connection to verify the network connection between OMS Community Edition and the data source, as well as the validity of the username and password.
After the test is passed, click OK.