Help Center> Data Replication Service> User Guide> Real-Time Synchronization> Synchronization from Oracle to MRS Kafka

Synchronization from Oracle to MRS Kafka

This section uses Oracle to MRS Kafka synchronization 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.
  • For details about real-time synchronization, see Real-Time Synchronization.
  • For details about constraints on DRS usage, see Before You Start.

Procedure

  1. On the Data Synchronization Management page, click Create Synchronization Task.
  2. 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 MRS Kafka.

    Network Type

    The Public network is used as an example. Available options: Public network and VPN or Direct Connect

    Destination DB Instance

    MRS Kafka instance

    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

    Incremental

    Through log parsing, incremental data generated on the source database is synchronized to the destination database in real time.

    During synchronization, the source database continues to provide services for external systems with zero downtime.

  3. 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 information

    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.

    Table 4 Destination database information

    Parameter

    Description

    DB Instance Name

    The RDS DB instance you selected when creating the synchronization task and cannot be changed.

    Kerberos Domain Name

    The domain name used in the /etc/hosts file of the master node in the cluster.

    Account

    The username for accessing the destination instance.

    krb5.conf

    The certificate that corresponds to the account. Switch to the MRS console, go to the details page of the target cluster, and click the link for cluster management to switch to MRS Manager. On MRS Manager, choose System > Manage User. On the displayed page, obtain the certificate of user admin or a machine-machine account from the Operation column. Do not use the certificate of a man-machine account.

    user.keytab

    The authentication methods of the MRS Kafka destination database can be Kerberos and non-Kerberos authentication. Table 4 uses Kerberos authentication as an example.

  4. On the Set Synchronization Task page, select the data synchronization type, conflict policy, and synchronization object, and then click Next.

    Figure 4 Synchronization mode
    Table 5 Synchronization mode and object

    Parameter

    Description

    Topic

    Select the topic to be synchronized to the destination database.

    Synchronization Object

    Available options: tables

  5. 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 5 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.

  6. 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.

  7. 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.