Synchronization from Oracle to GuassDB(for MySQL) Primary/Standby Edition
This section uses synchronization from Oracle to GuassDB(for MySQL) Primary/Standby Edition as an example to describe how to configure a synchronization task.
Prerequisites
- You have logged in to the DRS console.
- Your account balance is greater than or equal to ¥0.
- The database you want to synchronize meets the database type requirements. For details, see Real-Time Synchronization.
- The constraints on DRS usage are met. For details, see Before You Start.
Procedure
- On the Data Synchronization Management page, click Create Synchronization Task.
- On the Create Synchronization Instance page, configure the task details, recipients, description, and the synchronization instance, and click Next. Figure 1 Synchronization task information
Table 1 Task information Parameter
Description
Task Name
The task name consists of 4 to 50 characters, starts with a letter, and can contain only letters (case-insensitive), digits, hyphens (-), and underscores (_).
Send Notifications
(Optional) If this function is enabled, DRS will send notifications to specified recipients based on the mobile numbers and email addresses you set. If an exception occurs during synchronization, the system will send a notification to the specified recipients.
NOTE:Recipients must confirm the subscription on the SMN console within 48 hours of receiving an SMS message or email. Otherwise, they cannot receive notifications from DRS.
Task Inheritance
(Optional) If this function is enabled, enter the ID of the task to be inherited and verify the ID. After the inherited task takes effect, it will continue the original task. An inherited task can be in the Failed, Pause, or Deleted state. A running task cannot be inherited.
NOTE:Only Oracle to MRS Kafka synchronization supports this function.
Synchronization Delay Threshold
During an incremental synchronization, a synchronization delay indicates a time difference (in seconds) of synchronization between the source and destination database.
If the synchronization delay exceeds the threshold you specify, DRS will send alarms to the specified recipients. The value ranges from 1 to 3,600. To avoid repeated alarms caused by the fluctuation of delay, an alarm is sent only after the delay has exceeded the threshold for six minutes.
NOTE:- In the early stages of an incremental synchronization, there is more delay because more data is waiting to be synchronized. In this situation, no notifications will be sent.
- Before setting the delay threshold, enter the recipient's mobile number or email address.
Description
The description consists of a maximum of 256 characters and cannot contain the following special characters !=<>'&"
Figure 2 Synchronization instance information
Table 2 Synchronization instance settings Parameter
Description
Data Flow
Select To the cloud.
Source DB Engine
Select Oracle.
Destination DB Engine
Select GaussDB(for MySQL) Primary/Standby Edition.
Network Type
The Public network is used as an example. Available options: Public network and VPN or Direct Connect
Destination DB Instance
The GaussDB(for MySQL) instance you have created.
Synchronization Instance Subnet
Select the subnet where the synchronization instance is located. You can also click View Subnet to go to the network console to view the subnet where the instance resides.
By default, the DRS instance and the destination DB instance are in the same subnet. You need to select the subnet where the DRS instance resides, and there are available IP addresses for the subnet. To ensure that the synchronization instance is successfully created, only subnets with DHCP enabled are displayed.
Synchronization Mode
Full+Incremental
This synchronization mode allows you to synchronize data in real time. After a full synchronization initializes the destination database, an incremental synchronization parses logs to ensure data consistency between the source and destination databases.
NOTE:If you select the Full+Incremental synchronization mode, data generated during the full synchronization will be synchronized to the destination database in real time, ensuring that both the source and destination databases remain accessible.
- On the Configure Source and Destination Databases page, wait until the synchronization instance is created. Then, specify source and destination database information and click Test Connection for both the source and destination databases to check whether they have been connected to the synchronization instance. After the connection tests are successful, select the check box before the agreement and click Next. Figure 3 Source database information
Table 3 Source database settings Parameter
Description
IP Address or Domain Name
The IP address or domain name of the source database.
NOTE:For a RAC cluster, use a Scan IP address to improve access performance.
Port
The port of the source database. Range: 1 - 65535
Database Service Name
Enter a database service name (Service Name/SID). The client can connect to the Oracle database through the database service name. For details about how to query the database service name, see the prompt on the GUI.
Database Username
The username for accessing the source database.
Database Password
The password for the database username.
SSL Connection
SSL encrypts the connections between the source and destination databases. If SSL is enabled, upload the SSL CA root certificate.
NOTE:- The maximum size of a single certificate file that can be uploaded is 500 KB.
- If the SSL certificate is not used, your data may be at risk.
The IP address, domain name, username, and password of the source database are encrypted and stored in DRS, and will be cleared after the task is deleted.
Figure 4 Destination database settings
Table 4 Destination database settings Parameter
Description
DB Instance Name
The RDS DB instance you selected when creating the synchronization task and cannot be changed.
Database Username
The username for accessing the destination database.
Database Password
The database username and password are encrypted and stored in the system, and will be cleared after the task is deleted. You can change the password if necessary. To change the password, perform the following operation after the task is created:
If the task is in the Starting, Full synchronization, Incremental synchronization, or Incremental synchronization failed status, in the Synchronization Information area on the Basic Information page, click Update Password next to the Destination Database Password field. In the displayed dialog box, change the password. This action only updates DRS with the changed password.
- On the Set Synchronization Task page, select the synchronization type and synchronization object, and click Next. Figure 5 Synchronization mode
Table 5 Synchronization mode and object Parameter
Description
Synchronization Mode
Allows you to synchronize table structures, data, or constraints.
- Data is selected by default.
- If Table structure is selected, the destination database cannot contain tables whose names are the same as the source tables to be synchronized.
- If Table structure is not selected, the destination database must have tables that match the source tables, and the table structure must be the same as the selected source table structures.
Synchronization Object
Select Tables or Import object file as required. If you want to import an object file:
- Click Download Template.
- Download the template and enter information about the objects to be imported.
- Click Select File. In the displayed dialog box, select the edited template.
- Click Upload. NOTE:
- Only Windows Microsoft Excel 97-2003 (*.xls), 2007, and later (*.xlsx) files can be imported. The downloaded compressed package provides the templates of the two versions.
- The file name can contain uppercase letters, lowercase letters, digits, hyphens (-), underscores (_), and parentheses.
- The object name in the template must be in the format of SchemaName.TableName, and cannot start or end with spaces or contain angle brackets (<>), periods (.), and double quotation marks (").
- Retain the uploaded file on your local server if later you want to modify and import the file again.
- For the task created using the file import mode, table-level synchronization is not supported after the task is started.
- The task in the configuration supports table-level synchronization and file import mode. Each time you switch to a new mode, the selected or imported database objects are cleared, and you need to select or import them again.
- On the Process Data page, filter the data to be synchronized and click Next. For details, see Processing Data.
- On the Check Task page, check the synchronization task.
- If any check fails, review the failure cause and rectify the fault. After the fault is rectified, click Check Again.
For details about how to handle check failures, see the Checking Whether the Source Database Is Connected section in the Data Replication Service User Guide.
- If all check items are successful, click Next. Figure 6 Task Check
You can proceed to the next step only when all check items are successful. If any alarms are generated, view and confirm the alarm details first before proceeding to the next step.
- If any check fails, review the failure cause and rectify the fault. After the fault is rectified, click Check Again.
- On the Confirm Task page, specify Start Time, confirm that the configured information is correct, select the check box before the agreement, and click Next.
- Set Start Time to Start upon task creation or Start at a specified time based on site requirements.
- After a synchronization task is started, the performance of the source and destination databases may be affected. You are advised to start a synchronization task during off-peak hours.
- After the task is submitted, you can view and manage it on the Data Synchronization Management page.
- You can view the status of the task that has been submitted. For details about the task status, see Task Status.
- You can click
in the upper-right corner to view the latest task status.
Last Article: Synchronization from Oracle to MRS Kafka
Next Article: Synchronization from MySQL to Kafka
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.