Configuring a data source is a prerequisite for creating a data migration or data verification task. This topic describes how to create an SQL Server data source in OceanBase Migration Service (OMS).
Prerequisites
You have obtained the IP address, domain name, and port number of the SQL Server database. The default port for SQL Server is 1433.
Only SQL Server Enterprise Edition on Windows operating systems is supported. Supported versions include 2008, 2008 R2, 2012, 2014, 2016, 2017, and 2019. For details, see Limitations.
You have created an SQL Server database user for data migration and granted the corresponding permissions. For details, see Create a database user and User privileges.
Note
For the required SQL Server database user privileges in different scenarios, see "Privileges required when SQL Server database serves as the source" in User privileges. Note that enabling CDC for a database must be performed by an administrator with
sysadminprivileges. Migration accounts are granted corresponding privileges based on actual scenarios such as incremental, heartbeat, and reverse incremental migration. It is not necessary to have bothsysadminanddb_ownerprivileges.If you need to perform incremental synchronization, the CDC feature must be enabled for the source SQL Server database, and the SQL Server Agent service must be running. For details, see the "Prerequisites" section in the corresponding migration link documentation.
Procedure
Log in to the OMS console.
In the left navigation bar, click Data Source Management.
On the Data Source Management page, click New Data Source in the upper-right corner.
In the New Data Source dialog box, select Data Source Type as SQLServer.
Configure the parameters.
ParameterDescriptionData Source Identifier It is recommended to use a combination of Chinese characters, numbers, and letters. The name cannot contain spaces and must not exceed 32 characters in length. Notice
The data source identifier must be globally unique within the OMS system.
Region Select the region to which the data source belongs from the drop-down list (the cm_regionparameter configured when deploying OMS).Notice
- This parameter is displayed only in multi-region scenarios.
- Ensure the mapping between data sources and regions remains consistent; otherwise, migration performance may suffer.
Host IP The access address for the SQL Server database. You can enter a domain name or IP address. The IP address supports IPv4 and IPv6. Port The port number of the SQL Server database. It must be a number, defaults to 1433, and can be modified. Database username The username of the SQL Server database user used for data migration or verification. The username cannot contain spaces. Database password The password of the database user. Database name The name of the SQL Server database. Notice
Using system databases
master,msdb,model,tempdb, orresourceas database names is not supported.Instance name (Optional) The instance name of SQL Server. For a default instance, this field can be left empty, in which case OMS accesses the database via the host IP and port. For a named instance, you must provide the instance name, and OMS will access the database using the specified name. Allow OMS to Write Heartbeat Data During Data Synchronization This option is selected by default. To allow the incremental synchronization link to write heartbeat data at the source, keep this option selected. After enabling this option, the incremental synchronization link creates a heartbeat table in the source SQL Server database and periodically writes heartbeat data to resolve the issue where the synchronization timestamp cannot advance in scenarios without business writes at the source. Heartbeat data is not migrated to the target as business data. Note
After enabling this option, the SQL Server database user must have the permissions to create and write to tables (
db_ddladminanddb_datawriter). The pre-check verifies the above privileges.Note (Optional) Remarks for the data source, with a maximum of 2048 characters. Click Test Connection to verify the network connection between OMS and the SQL Server database, as well as the validity of the username and password.
After the test connection passes, click Create.
What to do next
After creating an SQL Server data source, you can use it as the source to create data migration tasks and data verification tasks. The supported links are as follows:
- SQL Server database -> OceanBase Database in MySQL-compatible mode
- SQL Server database -> OceanBase Database in Oracle-compatible mode
For more information, see Data migration overview, Migrate data from an SQL Server database to an OceanBase Database instance in MySQL-compatible mode, Migrate data from an SQL Server database to an OceanBase Database instance in Oracle-compatible mode, and Data verification overview.
Note
Data verification tasks with SQL Server as the source can be created via the Configure Verification Task entry in the upper-right corner of the data migration task details page. The verification types are Full Verification and Row Count Verification; Incremental Verification is not supported.