Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ Data Replication Service/ FAQs/ Real-Time Synchronization/ How Do I Specify the Start Point for DRS Incremental Synchronization?

How Do I Specify the Start Point for DRS Incremental Synchronization?

Updated on 2024-11-30 GMT+08:00

MySQL as the Source

For a MySQL incremental synchronization task, you need to specify the start point on the Set Synchronization Task page. The source database logs of the task are obtained from the position after the start point (excluding the current start point).

Figure 1 Start Point

If the gtid_mode parameter of the database is set to on, a start point consists of three parts: file name (File), position (Position), and executed Global Transaction Identifiers Set (Executed_Gtid_Set). You can run the show master status command to obtain these values. If the source database version is MySQL 5.5, it is not supported. When setting Executed_Gtid_Set, you need to delete the newline characters.

For example, the start point about MySQL Community Edition is as follows:

Based on the obtained information, set Executed_Gtid_Set to c8cd8ff7-da6f-11ec-a945-00d861ef1161:1-3,f4f9537f-0c8b-11ec-a284-00d861ef116a:1-10820402.

Figure 2 Setting the start point

SQL Server as the Source

For a SQL Server incremental synchronization task, you need to specify the start point on the Set Synchronization Task page. The source database logs of the task are obtained from the position after the start point (excluding the current start point).

Figure 3 Start Point

Incremental synchronization of the SQL Server database is based on the CDC capability. The start point is the LSN of the SQL Server database. You can run select sys.fn_cdc_get_max_lsn(); to query the current point of the database.

For example, query the current LSN of the database.

Figure 4 Querying the LSN

According to the obtained information, the start point of the task is set as follows:

Figure 5 Setting the start point

DDS as the Source

For out-of-cloud synchronization from DDS to MongoDB and DDS to Kafka, you can specify a start point on the Set Synchronization Task page. The incremental logs of the source database are obtained from the start point (including the current start point). If you do not manually specify a start point, DRS automatically obtains the latest position of the source database.

Figure 6 Setting the start point

The start time of incremental synchronization. The value is in the format of timestamp:incre. timestamp is the Unix timestamp (unit: second), and incre is the command execution sequence in a second. A synchronization task obtains incremental logs of the source database from the start position (including the current start position).

  • For a replica set, run the db.getSiblingDB("local").oplog.rs.find({"ts":{$gte:new Timestamp(<second-level timestamp>,1)}},{"ts":1}).sort({$natural:1}).limit(1) command to query the source database oplog. The query result is in the format of { "ts" : Timestamp(<timestamp>, <inre>) }, which is converted into the format of timestamp:incre.
  • A cluster cannot query the oplog from mongos. timestamp can be converted into the Unix timestamp format based on the start time. The value of incre is 1.

For example, the source database is a DDS replica set, and the expected second-level timestamp for incremental synchronization is 1721382900 (2024-07-19T17:55:00+08:00). The following figure shows the query result in the source database. According to the obtained information, the start point of the task can be set to 1721382921:554.

Figure 7 Example of the oplog query result

Oracle as the Source

For an Oracle incremental synchronization task, you need to specify the start point on the Set Synchronization Task page. The source database logs of the task are obtained from the position after the start point.

Figure 8 Capture Start Point

The start point of incremental synchronization is the SCN of the source database.

You can run the select current_scn from v$database; command to obtain the current SCN of a database.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback