Database migration method and device, electronic medium and equipment
By employing target-compatible component-driven and business-feature-driven database migration methods, this approach solves the code modification problem caused by differences in database architecture in existing technologies. It achieves efficient and reliable database migration, ensuring business continuity and data consistency, and improving migration efficiency.
Patent Information
- Application Number
- CN202511541651.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-27
- Publication Date
- 2026-02-06
AI Technical Summary
Existing technologies require extensive modifications to application code during database migration, leading to a high probability of code errors, potential functional abnormalities and data loss, and reduced migration efficiency.
By configuring the target-compatible driver component, unified access to the source and target databases is achieved. The database synchronization method is determined based on the business characteristics of the source database SQL requests. A multi-level distribution strategy and a memory buffer strategy are used for data synchronization. The source database is paused after the target database is running stably.
It eliminates the need to modify application code, significantly reduces the probability of code errors, ensures business continuity and data consistency, enables a smooth transition, improves database migration efficiency, and provides reliable technical support for business system upgrades and domestic database substitution.
Smart Images

Figure CN121478741A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of database, and particularly relates to a database migration method and device, an electronic medium and equipment. BACKGROUND
[0002] Database migration refers to a process of migrating data from a source database (such as an Oracle database) to a target database (such as a domestic database), covering data synchronization, application adaptation, system switching and other key links, and providing technical support for business system upgrade and database localization replacement. In a multi-database heterogeneous environment, database migration needs to guarantee business continuity and data consistency, and is an important technical scenario for information system iteration.
[0003] In the related art, a database migration method usually needs to modify a large amount of application code to adapt to the SQL (Structured Query Language) syntax, functional characteristics and connection mode of the target database. Since there are differences between the source database and the target database in terms of underlying architecture, syntax rules and the like, the application code modification involves multiple dimensions, which not only increases the probability of code errors, but also may cause functional abnormalities, data loss and other problems in the migrated application program, thereby reducing the efficiency of database migration. SUMMARY
[0004] Embodiments of the present disclosure provide a database migration method, device, electronic medium and equipment to address some of the deficiencies in the background art.
[0005] In a first aspect, embodiments of the present disclosure provide a database migration method, comprising: configuring a target compatible driver component into a source database and a target database, and accessing the source database and the target database through the target compatible driver component; determining a database synchronization mode based on a business feature of a structured query language request corresponding to the source database, wherein the business feature is used to indicate a business requirement; synchronizing data to the source database and the target database through the database synchronization mode, and simultaneously executing a structured query language request through the source database and the target database; in a case where the target database is stably running, determining that data migration of the target database is successful, and suspending use of the source database.
[0006] In an embodiment of the first aspect, the determining of the database synchronization mode based on the business feature of the structured query language request corresponding to the source database comprises: In a case where it is determined based on the service feature that the service real-time requirement is large, a multi-level distribution strategy is used as the database synchronization manner; wherein the multi-level distribution strategy is used for hierarchical synchronization of structured query language requests with different delay requirements. In a case where it is determined based on the service feature that the service data volume is large, a memory buffer strategy is used as the database synchronization manner; wherein the memory buffer strategy is used for setting a memory queue to save structured query language requests.
[0007] In an embodiment of the first aspect, the data synchronization to the source database and the target database through the database synchronization manner comprises: In a case where it is determined that the database synchronization manner is the multi-level distribution strategy, a delay requirement of the structured query language request is determined; Based on the delay requirement, a priority of the structured query language request is determined; The data synchronization to the source database and the target database is performed based on the priority.
[0008] In an embodiment of the first aspect, the data synchronization to the source database and the target database through the database synchronization manner comprises: In a case where it is determined that the database synchronization manner is the memory buffer strategy, a buffer queue is set; In the process of the data synchronization to the source database and the target database, the structured query language request is stored in the buffer queue.
[0009] In an embodiment of the first aspect, the execution of the structured query language request through the source database and the target database simultaneously comprises: A risk degree of the structured query language request is determined; In a case where the risk degree is less than a preset risk degree threshold, the structured query language request is executed through the target database; In a case where the risk degree is greater than or equal to the preset risk degree threshold, the structured query language request is executed through the source database.
[0010] In an embodiment of the first aspect, the method further comprises: The performance of the target database is monitored to obtain service execution stability of the target database; In a case where it is determined based on the service execution stability that the target database is unstable, the source database is switched to execute the structured query language request.
[0011] In an embodiment of the first aspect, the determination that the target database is stably running is performed by: determining data consistency of the target database and the source database; determining that the target database is stably running when the data consistency is greater than a preset consistency threshold.
[0012] In an embodiment of the first aspect, while the source database and the target database simultaneously execute structured query language requests, the method further comprises: determining request information of the structured query language requests; wherein the request information comprises request quantity and request frequency; expanding the number of connections of the connection layer corresponding to the target database when the request information meets a preset connection condition; reducing the number of connections of the connection layer corresponding to the target database when the request information does not meet the preset connection condition.
[0013] In an embodiment of the first aspect, while the source database and the target database simultaneously execute structured query language requests, the method further comprises: obtaining business information corresponding to the target database; wherein the business information comprises at least one of the following: business scenario, structured query language request, and query type of the structured query language request; configuring a data caching strategy based on the business information; performing a search in a local cache space of the target database when a data query instruction is received; performing a search in a platform corresponding to the target database when no result is found in the local cache space of the target database.
[0014] In a second aspect, the embodiments of the present disclosure provide a database migration apparatus, comprising: a configuration module configured to configure a target compatible driver component into a source database and a target database, and access the source database and the target database through the target compatible driver component; a determination module configured to determine a database synchronization mode based on business characteristics of structured query language requests corresponding to the source database; wherein the business characteristics are used to indicate business requirements; a synchronization module configured to synchronize data to the source database and the target database through the database synchronization mode, and simultaneously execute structured query language requests through the source database and the target database. A migration module is configured to determine that data migration of the target database is successful and suspend use of the source database when the target database is stably running.
[0015] In a third aspect, an electronic device is provided, comprising a processor, a memory and a bus, the memory storing machine readable instructions executable by the processor, and the processor and the memory communicate through the bus when the electronic device is running, and the machine readable instructions are executed by the processor to perform the steps of the first aspect or any possible implementation manner of the first aspect.
[0016] In a fourth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program, and the computer program is executed by a processor to perform the steps of the first aspect or any possible implementation manner of the first aspect.
[0017] In a fifth aspect, a computer program product is provided, comprising a computer program, and the computer program is executed by a processor to perform the steps of the method of the above aspects.
[0018] As will be described in detail below, a database migration method, device, electronic medium and equipment according to embodiments of the present disclosure. Through the configuration and application of the target compatible driver component, unified access to the source database and the target database can be achieved without a large number of modifications to the application code, effectively avoiding the multi-dimensional code modification problem caused by the differences in the underlying architecture and syntax rules of the source and target databases in the traditional migration method, significantly reducing the code error probability, and reducing the risk of functional abnormalities and data loss of the application program after migration from the root.
[0019] Based on the business characteristics of the source database SQL request, the database synchronization mode is accurately determined, different business needs can be targeted matched, the pertinence and efficiency of data synchronization are guaranteed, and the double-track operation mode of simultaneously executing the SQL request of the source and target databases is matched, ensuring the business continuity and data consistency during the migration process, and avoiding the problem of data synchronization confusion in a heterogeneous environment. Finally, the source database is suspended after the target database is stably running, a smooth transition is realized, and the overall efficiency of database migration is greatly improved, providing more reliable and efficient technical support for business system upgrade and database localization replacement. BRIEF DESCRIPTION OF DRAWINGS
[0020] Figure 1 A flowchart of a database migration method according to embodiments of the present disclosure is provided. Figure 2 A schematic diagram of a database migration device according to embodiments of the present disclosure is provided. Figure 3A schematic diagram of an electronic device is provided for embodiments of the present disclosure. DETAILED DESCRIPTION
[0021] The present disclosure will be further described in conjunction with the drawings and embodiments. It can be understood that the specific embodiments described herein are merely illustrative of the present disclosure and are not a limitation thereof. In addition, it should be noted that only the parts related to the present disclosure are shown in the drawings for the convenience of description, rather than all the structures.
[0022] In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, and to fully understand and implement the implementation process of the present disclosure how to apply technical means to solve technical problems and achieve corresponding technical effects, the technical solutions in the embodiments of the present disclosure will be described clearly and completely in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments. The embodiments of the present disclosure and various features in the embodiments can be combined with each other without conflict, and the technical solutions formed thereby are all within the protection scope of the present disclosure. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative labor should be within the protection scope of the present disclosure.
[0023] It should be noted that the terms "first", "second", and the like in the specification and claims of the present disclosure and the above-described drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0024] It should be noted that the steps shown in the flowchart of the drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in an order different from that described herein.
[0025] It should be noted that: similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.
[0026] The term "and / or", used in the present document, only describes an association relationship, which means that there can be three relationships, for example, A and / or B can represent the following three cases: A exists alone, A and B exist together, and B exists alone. In addition, the term "at least one" in the present document means any combination of at least two of any one or more of a plurality, for example, at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0027] The term "and / or", used in the present document, only describes an association relationship, which means that there can be three relationships, for example, A and / or B can represent the following three cases: A exists alone, A and B exist together, and B exists alone. In addition, the term "at least one" in the present document means any combination of at least two of any one or more of a plurality, for example, at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0028] It is found through research that database migration refers to the process of migrating data from a source database (such as an Oracle database) to a target database (such as a domestic database), covering data synchronization, application adaptation, system switching and other key links, and providing technical support for business system upgrade and database localization replacement. In a multi-database heterogeneous environment, database migration needs to ensure business continuity and data consistency, which is an important technical scenario for information system iteration.
[0029] In related technologies, the database migration method usually needs to modify a large amount of application code to adapt to the SQL (Structured Query Language) syntax, functional characteristics and connection mode of the target database. Since there are differences in the underlying architecture, syntax rules and other aspects between the source database and the target database. Application code modification involves multiple dimensions, not only increases the probability of code errors, but also may cause problems such as functional abnormalities and data loss in the migrated application program, reducing the efficiency of database migration.
[0030] Based on the above research, the present disclosure provides a database migration method, which realizes unified access to the source database and the target database without a large amount of modification of the application program code through the configuration and application of the target compatible driver component, effectively avoiding the multi-dimensional code modification problem caused by the differences in the underlying architecture and syntax rules of the source and target databases in the traditional migration method, significantly reducing the probability of code errors, and reducing the risk of functional abnormalities and data loss in the migrated application program from the root.
[0031] The business feature of the source database SQL request is accurately determined to determine the database synchronization mode, different business requirements are targeted matched, the data synchronization is guaranteed to be targeted and efficient, the double-track operation mode of the source database and the target database is executed simultaneously, the business continuity and data consistency in the migration process are ensured, the problem of data synchronization confusion in the heterogeneous environment is avoided, and finally the source database is suspended after the target database is stably operated, the smooth transition is realized, the overall efficiency of the database migration is greatly improved, and more reliable and efficient technical support is provided for the business system upgrade and the database localization replacement.
[0032] Referring to Figure 1 As shown in the flowchart of the database migration method provided by the embodiment of the present disclosure, the method comprises steps S101-S104, wherein: S101, configure a target compatible driver component into a source database and a target database, and access the source database and the target database through the target compatible driver component.
[0033] In the embodiment of the present disclosure, the target database and the source database can be accessed through SK-JDBC (Java Database Connectivity Driver) and SK-OCI (Oracle Call Interface Driver) drives. The SK-JDBC drive and the SK-OCI drive are target compatible driver components.
[0034] The development languages supported by the SK-JDBC drive and the SK-OCI drive include but are not limited to JAVA, C / C++, Python, Lua, SQLPlus, SQLldr, and PLSQL. Therefore, the SK-JDBC drive and the SK-OCI drive can access different types of target databases without changing any code.
[0035] Here, the target database is a domestic database, and the source database is an Oracle database.
[0036] Here, the target compatible driver component can set an intelligent conversion rule engine to realize SQL syntax conversion. The rules of the intelligent conversion rule engine include at least one of the following: multi-level rule matching, rule optimization based on pattern matching, rule caching and hot loading.
[0037] The multi-level rule matching divides the conversion rules into different levels, such as keyword, function, data type, etc., and creates independent rule modules for each level, and loads and matches as needed.
[0038] Among them, the rule optimization based on pattern matching is to use pattern recognition techniques (such as regular expressions and template recognition) to quickly identify the part of the statement that needs to be converted, especially for complex sentence structures. For example, regular expressions can be used to efficiently detect structures similar to "SELECT X.CATEGORY" and locate the keyword "CATEGORY".
[0039] Among them, rule caching and hot loading is to cache frequently used rules to memory, reducing disk IO consumption and accelerating matching speed. When updating rules, support hot loading new rules to avoid service interruption.
[0040] The above intelligent conversion rule engine improves the efficiency of rule matching, reduces multiple search and processing time, and improves the response speed of conversion.
[0041] Here, during the SQL conversion process, automatic calibration and preprocessing can be used to ensure the accuracy of the syntax, thereby improving the accuracy of SQL conversion.
[0042] Here, the SQL parser can be used to parse the SQL statement into a syntax tree, and the key nodes can be converted through the tree structure to ensure the accuracy of the syntax. For example, for a function call like "SUBSTR(NAME, 1, 3)", the parser can automatically identify the function name, parameters, and only replace the function name.
[0043] Here, before SQL conversion, the original SQL statement can be pre-checked to automatically detect whether there are syntax errors, and ensure that the statement structure meets the conversion conditions. In the case of pre-checking that the original SQL statement does not meet the standard SQL syntax, a one-to-one replacement process can be automatically added to prevent conversion errors.
[0044] In the above embodiment, the tree parsing can accurately locate the conversion position and avoid mischanges, and the syntax pre-check can reduce the occurrence rate of conversion errors, ensuring the accuracy of the conversion.
[0045] Here, machine learning and dynamic rule library can be introduced to gradually improve and optimize the conversion rules, so as to adapt to various SQL statements more intelligently.
[0046] Among them, based on historical SQL conversion data, machine learning models (such as decision tree or NLP-based classification models) can be used to predict and optimize conversion rules, reducing manual configuration work. For example, through machine learning models, predict which SQL statements belong to a specific rule type (such as keywords, functions) and automatically classify them.
[0047] Here, a dynamic rule library can be designed to automatically update and add new rules based on changes in SQL conversion requirements (such as the appearance of new keywords or functions). During the SQL conversion process, if an unrecognized structure is detected, the rule library is automatically notified for updating, reducing the burden of manual rule addition. Dynamic updating of the rule library and machine learning optimization can gradually improve the rule system, reducing the need for manual intervention and improving the intelligent level of conversion.
[0048] Here, the rule-based strategy conversion process can be implemented as follows: Keyword conversion: Scan the keywords in the SQL statement and replace them with the corresponding keywords of the target database. For example, the original SQL: SELECT X.CATEGORY AS CATEGORY FROM X; is converted to SELECT X.CATEG AS CATEG FROM X after conversion, assuming the keyword of the target database is CATEG.
[0049] Function conversion: Identify function calls in the SQL statement and replace them with equivalent functions supported by the target database. For example, the original SQL: SELECT SUBSTR(NAME, 1, 3) FROM EMPLOYEE; is converted to SELECT SUBSTRING(NAME, 1, 3) FROM EMPLOYEE after conversion, assuming the target database uses the SUBSTRING function.
[0050] Data type conversion: Detect the data types used in the SQL statement and convert them to equivalent data types supported by the target database. For example, the original SQL: CREATE TABLE TEST (ID NUMBER); is converted to CREATE TABLE TEST (ID INTEGER) after conversion, assuming the target database does not support the NUMBER type and uses the INTEGER type.
[0051] NOLOGGING syntax conversion: Identify and convert the NOLOGGING syntax in the SQL statement to adapt to the log management strategy of the target database. For example, the original SQL: ALTER TABLE EMPLOYEE NOLOGGING; is converted to ALTER TABLE EMPLOYEE WITHOUT LOGGING after conversion, assuming the target database uses WITHOUT LOGGING.
[0052] Here, for the characteristic SQL that cannot be processed by the regularization strategy, one-to-one replacement processing can be performed. First, identify the irregular characteristic SQL, identify the SQL statement that needs one-to-one replacement through the pre-defined characteristic SQL pattern library. Among them, the characteristic SQL includes complex queries or customized functions specific to the database. Then, establish a characteristic SQL mapping table, establish a mapping table of the original SQL and the target SQL for one-to-one replacement.
[0053] For example, the original SQL: SELECT FROM DUAL; The target SQL: Assuming that the target database does not have a DUAL table, replace it with SELECT 1.
[0054] Here, the one-to-one replacement operation can be performed in the following way: First, scan the SQL statement and match the characteristic SQL pattern. Second, find the corresponding target SQL in the mapping table. Finally, replace the characteristic part in the original SQL with the target SQL.
[0055] For example, the original SQL: SELECT SYSDATE FROM DUAL; The target SQL: Assuming that the target database uses the CURRENT_DATE function and does not have a DUAL table, it is converted to SELECT CURRENT_DATE.
[0056] Here, the target compatible driver component can adapt the database metadata to ensure that the returned database name is consistent with Oracle. Uniform driver name to maintain compatibility with Oracle. Convert SCHEMA information to be consistent with Oracle.
[0057] Here, the target compatible driver component can also adapt the result set metadata, convert datetime to OracleDate or Time Stamp to maintain consistency. Convert LOB-related types to types consistent with Oracle. Ensure that the field length and precision are consistent with Oracle.
[0058] Here, the target compatible driver component can also adapt the execution mode, use the returning syntax for write-back in domestic databases. Prepare Statement pre-fetch metadata: Implement a special execution process for pre-fetching metadata to ensure consistency with the execution mode of Oracle.
[0059] S102, determine the database synchronization mode based on the business characteristics of the corresponding structured query language request of the source database; wherein the business characteristics are used to indicate business requirements.
[0060] In embodiments of the present disclosure, the SQL request (i.e., structured query language request) of each service and its input parameters, i.e., the service characteristics of each service, can be recorded by the DB Service (database service).
[0061] After that, the recorded service characteristics can be asynchronously passed to the DW Service (data warehouse service) through the Kafka queue. Here, the DW Service performs the corresponding SQL operation on the target domestic database after receiving the message in the Kafka queue.
[0062] S103, data synchronization is performed to the source database and the target database through the database synchronization mode, and the structured query language request is executed through the source database and the target database at the same time.
[0063] In embodiments of the present disclosure, after determining the database synchronization mode, the data can be converted into a format and type supported by the target database. After that, the converted data file is written into the standby library of the target database through the database synchronization mode, so as to perform data synchronization.
[0064] Here, the strategy of "initial full synchronization + subsequent incremental synchronization" can be adopted, and the parallel migration mechanism can be combined to improve the efficiency of data synchronization.
[0065] Among them, full migration needs to transmit all the data of the source database to the target database at one time, which has a huge data volume and takes a long time, and may cause business stagnation. During the migration period, the updated data of the source database cannot be synchronized to the target database in time, affecting the consistency of data and the continuity of business.
[0066] Here, first, initial full synchronization can be performed, and full data synchronization is performed during the low peak period of business (such as night or holiday), so that all the data of the source database is migrated to the target database at one time, laying a foundation.
[0067] Secondly, subsequent incremental synchronization can be performed, and the data change capture (CDC, Change Data Capture) technology is used to capture the incremental changes (newly added, updated, and deleted data) of the source database in real time, and synchronize these changes to the target database in real time, to ensure the consistency of data on both sides.
[0068] After that, incremental data conversion and real-time synchronization can be performed. Here, data conversion is performed according to the requirements of the target database, and the captured incremental data is converted in terms of data type and format.
[0069] Here, real-time synchronization involves writing the transformed incremental data to the target database promptly, maintaining data consistency and timeliness. Through initial full synchronization and subsequent incremental synchronization, prolonged business interruptions are avoided. This ensures data consistency by synchronizing incremental data in real time, guaranteeing that the source and target databases remain in sync. It also reduces system load by avoiding network and system stress caused by transmitting large amounts of data at once.
[0070] Here, data can be processed in parallel using multiple threads or processes, and parallel data migration can be achieved through sharding parallel strategies. These sharding parallel strategies include: sharding by table and sharding by data range.
[0071] Table-based sharding involves assigning different tables to different migration threads, with each thread responsible for synchronizing a specific table. This approach is suitable for databases containing a large number of small to medium-sized tables.
[0072] Sharding by data range involves sharding based on primary key range, time range, or other fields, assigning different data shards to different threads for processing. This is suitable for scenarios with a few large tables and a massive amount of data.
[0073] Here, during the data synchronization process, system resources can be monitored in real time, such as the usage of CPU, memory, disk I / O and network bandwidth, to avoid resource overload.
[0074] Here, during data synchronization, the degree of parallelism can be dynamically adjusted. The number of parallel threads can be dynamically adjusted based on system resource usage to ensure stable system operation. This achieves load balancing, preventing some threads from becoming overloaded while others remain idle by allocating tasks appropriately.
[0075] S104. If the target database is running stably, confirm that the data migration of the target database was successful, and then suspend the use of the source database.
[0076] In the embodiments of this disclosure, after the data is transferred to the target database, the target database can run together with the source database. That is, the target database is used as a backup database (standby database), and the source database is used as the primary database (primary database) and runs in parallel.
[0077] Afterwards, business function tests can be performed on the target database while it is running. Once the target database is confirmed to be running, it can be used as the master database, and the source database can be taken offline, i.e., the source database can be suspended.
[0078] In the embodiments of this disclosure, firstly, a target-compatible driver component is configured in both the source and target databases, and access to both databases is achieved through the target-compatible driver component; secondly, a database synchronization method is determined based on the business characteristics of the structured query language request corresponding to the source database, wherein the business characteristics are used to indicate business requirements; thirdly, data synchronization is performed between the source and target databases using the database synchronization method, and structured query language requests are executed simultaneously in both the source and target databases; finally, if the target database is running stably, the data migration to the target database is determined to be successful, and the use of the source database is suspended.
[0079] In the above implementation, by configuring and applying the target compatibility driver component, unified access to the source and target databases can be achieved without extensive modifications to the application code. This effectively avoids the multi-dimensional code modification problems caused by differences in the underlying architecture and syntax rules of the source and target databases in traditional migration methods, significantly reducing the probability of code errors and fundamentally reducing the risk of functional abnormalities and data loss in the migrated application.
[0080] By accurately determining the database synchronization method based on the business characteristics of the source database's SQL requests, it can tailor the approach to different business needs, ensuring the targeted and efficient nature of data synchronization. Combined with a dual-track operation mode that executes SQL requests simultaneously in both the source and target databases, it ensures business continuity and data consistency during the migration process, avoiding the data synchronization chaos that can occur in heterogeneous environments. Finally, after the target database is running stably, the source database is temporarily deactivated, achieving a smooth transition and significantly improving the overall efficiency of database migration. This provides more reliable and efficient technical support for business system upgrades and the localization of databases.
[0081] In one optional implementation, the database synchronization method is determined based on the business characteristics of the structured query language request corresponding to the source database, specifically including the following steps: First, based on the business characteristics to determine the real-time requirements of the business, a multi-level distribution strategy is adopted as the database synchronization method; the multi-level distribution strategy performs hierarchical synchronization of structured query language requests with different latency requirements. Then, when the business data volume is large based on business characteristics, a memory buffering strategy is used as the database synchronization method; the memory buffering strategy involves setting up a memory queue to store structured query language requests.
[0082] In the embodiments of this disclosure, when the real-time requirements of a business are determined based on business characteristics, it is necessary to ensure that SQL requests with high real-time requirements are processed first.
[0083] Here, a multi-level distribution strategy can be designed to distribute messages with different latency requirements to different Kafka topics or partitions, and the above method can be identified as the multi-level distribution strategy.
[0084] Here, when the memory buffering strategy is a database synchronization method, a memory-level buffer queue can be added on the Kafka Producer side to store structured query language requests.
[0085] In one optional implementation, data synchronization is performed between the source and target databases via database synchronization, specifically including the following steps: First, given that the database synchronization method is determined to be a multi-level distribution strategy, the latency requirements for Structured Query Language requests are determined. Secondly, based on the delay requirement, the priority of Structured Query Language requests is determined; Finally, data synchronization is performed between the source and target databases based on priority.
[0086] In the embodiments of this disclosure, the latency requirement refers to the real-time requirement of SQL requests. Here, SQL requests are categorized into high-real-time SQL requests, low-real-time SQL requests, and non-real-time SQL requests.
[0087] Multiple partitions can be configured for high-priority topics, distributing high-real-time SQL requests across multiple partitions for processing. This allows each Consumer to process high-priority messages in parallel, further reducing latency.
[0088] Here, you can set up high-priority channels and low-priority channels. The high-priority channel is for SQL requests with high real-time requirements (such as adding, deleting, and modifying core business data). A separate high-priority Kafka topic is set up for these requests to ensure that these messages are not mixed with ordinary messages and to avoid delays due to queuing.
[0089] SQL operations with high real-time requirements (such as adding, deleting, and modifying core business data) are set to a separate high-priority Kafka topic to ensure that these messages are not mixed with ordinary messages and to avoid delays due to queuing.
[0090] Here, the low-priority channel is the normal channel. Non-real-time or low-real-time SQL requests can be placed in the normal-priority channel to avoid affecting the transmission of critical real-time data.
[0091] In one optional implementation, data synchronization is performed between the source and target databases via database synchronization, specifically including the following steps: First, assuming the database synchronization method is determined to be a memory buffering strategy, set up a buffer queue; Then, during the data synchronization process between the source and target databases, the Structured Query Language requests are stored in a buffer queue.
[0092] In embodiments of this disclosure, the buffer queue is a low-latency memory queue (such as ZeroMQ, Redis Pub / Sub).
[0093] First, the SQL requests to be sent can be placed in a buffer queue. Then, they can be immediately transmitted to the target database, improving message response speed.
[0094] In this process, the Kafka Producer retrieves messages from the memory queue and then asynchronously writes them to Kafka to ensure message persistence.
[0095] Here, a limited history of messages is retained in the buffer queue. If a message is interrupted during transmission or if Kafka latency is too high, it can be automatically retried in the memory queue to improve the reliability of data synchronization.
[0096] In the above implementation, transaction-level heterogeneous transformation dual-write achieves asynchronous operation through Kafka queues, suitable for business scenarios with high real-time requirements; data-level heterogeneous transformation synchronization directly manipulates data files, suitable for the need for large-scale data synchronization. Both can ensure data consistency, but transaction-level heterogeneous transformation dual-write is more suitable for handling complex transaction operations, while data-level heterogeneous transformation synchronization is more suitable for handling large-scale data synchronization. Transaction-level heterogeneous transformation dual-write requires recording and transforming SQL operations at the business logic level, which is more difficult to implement; data-level heterogeneous transformation synchronization directly manipulates data files, which is relatively simpler. Combining these two methods can ensure efficient data synchronization and consistency in different business scenarios, meeting the data synchronization needs of different businesses.
[0097] In an optional implementation, a Structured Query Language request is executed simultaneously through both the source and target databases, specifically including the following steps: First, determine the risk level of the Structured Query Language request; Secondly, if the risk level is less than the preset risk level threshold, a structured query language request is executed through the target database; Finally, if the risk level is greater than or equal to a preset risk level threshold, a structured query language request is executed through the source database.
[0098] In embodiments of this disclosure, a target-compatible driver component can be used to switch from the original OJDBC / OCI driver to the unified access platform without re-enabling it.
[0099] Here, the bypass mode and the intermediate layer mode can be used to enable the source database and the target database to execute Structured Query Language requests simultaneously.
[0100] In the initial stage, the unified access platform is in bypass mode, meaning that the application connects to both the source database and the unified access platform simultaneously to test its stability.
[0101] Subsequently, we gradually switched to the middleware mode, with the unified access platform serving as the application's sole data access point, completely replacing the source database's OJDBC / OCI driver.
[0102] Among them, structured query language requests with a risk level less than a preset risk level threshold can be identified as low-risk requests.
[0103] Here, a traffic splitting strategy can be set up to process some read requests and low-risk write requests (i.e., low-risk requests) through the middle layer, while the remaining requests (i.e., structured query language requests with a risk level greater than or equal to a preset risk level threshold) continue to be sent to the source database for processing through a bypass mode.
[0104] In an optional implementation, the following steps are also included: First, performance monitoring is performed on the target database to determine the stability of its business operations. Then, if the target database is determined to be unstable based on the stability of business execution, the request is switched to the source database to execute the Structured Query Language request.
[0105] In the embodiments of this disclosure, during the processing of structured query language requests, the response time, error rate, and load of the intermediate layer can be closely monitored to ensure that the platform can stably take over some business requests.
[0106] Here, abnormal scenarios can be simulated periodically to verify the speed and effectiveness of reverting to bypass mode, ensuring that the system can be immediately restored to its initial state in case of any problems.
[0107] Here, all traffic can be routed to the middle layer, completing the full traffic switch from bypass mode to middle layer mode, and the unified access platform officially becomes the application's only data access entry point.
[0108] This allows all data access requests from the application to be routed to a unified access platform, with the middleware layer handling the forwarding and processing of these requests. The bypass mode remains active here, enabling rapid activation should problems occur.
[0109] Here, stability verification is completed after the full switch to ensure the stability of business execution during the switch process; if the target database is determined to be unstable based on the stability of business execution, it can be quickly rolled back to bypass mode.
[0110] After a full switchover of the middleware layer, stress testing can be conducted to ensure the unified access platform can operate stably under high load. An emergency switchover plan is also prepared, using automated scripts to pre-configure a fallback mechanism to ensure a rapid switchback to bypass mode if necessary.
[0111] In the above implementation, no restart is required during the switchover process, avoiding service interruption. If a problem occurs in the middleware layer, it can quickly fall back to bypass mode, ensuring service continuity. This shortens the application's downtime during the switchover process.
[0112] Here, incremental data synchronization (CDC, Change Data Capture) technology can be used to reduce the frequency of full synchronization, synchronizing only incremental data and reducing the data synchronization load. On Oracle databases, data changes are captured through redo logs, synchronizing only newly added, updated, and deleted data. Lightweight synchronization protocols (such as Kafka, MQ, etc.) are used to asynchronously transmit incremental data to the domestic database, avoiding the load on the system caused by real-time synchronization. When there is a large amount of incremental data, batch transmission is used instead of transmitting data row by row, reducing I / O and network overhead. This reduces the frequency of full synchronization, significantly lowers resource consumption, and ensures data consistency.
[0113] Here, the synchronization frequency and traffic are adjusted according to the business load. The synchronization frequency is reduced during peak business periods and increased during off-peak periods. During off-peak periods (such as nighttime or non-working hours), the synchronization frequency is increased for data synchronization, and decreased during peak periods. The traffic of synchronized data is controlled at the network layer, such as by setting rate limiting parameters during peak periods to prevent excessive bandwidth consumption. Data is synchronized in multiple batches to reduce the pressure of a single synchronization. The goal is to reduce the system resource consumption of synchronization operations without affecting business traffic.
[0114] Ensure data consistency between the primary and standby databases to prevent data loss. Enable rapid failover (i.e., bypass failover) in the event of a primary or standby database failure, guaranteeing high availability of services.
[0115] By implementing a two-stage approach of seamless bypass and master-slave failover, a smooth transition and high availability of applications and services are ensured during the migration from Oracle to a domestic database. This not only improves stability and robustness but also reduces the risks and costs associated with the migration process.
[0116] In one optional implementation, the stable operation of the target database is determined by the following method: First, ensure data consistency between the target database and the source database; Then, if the data consistency is greater than the preset consistency threshold, the target database is determined to be running stably.
[0117] In embodiments of this disclosure, the data consistency between the target database and the source database can be determined to ensure that the target database can become the master database and replace the source database.
[0118] Here, dual-write tests can be performed, which involves writing SQL requests to both the source and target databases simultaneously. Simulated failure verification can also be performed, demonstrating that in the event of a failure, the target database can seamlessly switch back to the source database.
[0119] Among them, the full-lifecycle SQL collection in pure bypass mode solves the problem of not being able to perform full-scale business function and SQL testing during the testing phase. It achieves minimal meta-intrusion on the application, collecting business SQL throughout its entire lifecycle. The collected SQL is then replayed in the target database to evaluate the target database's performance and compatibility.
[0120] Here, when the target database and the source database are running in parallel, you can first switch to the intermediate layer mode, and then switch to the intermediate layer mode when the target database is online.
[0121] Afterwards, a full data mirroring process can be used to achieve a complete data mirroring from the source database to the target database. The target database is periodically repaired to ensure data consistency between the target and source databases and to correct any data discrepancies. During parallel operation, a fault-free rollback mechanism is maintained to ensure stability.
[0122] When performing a master-slave switch between the target and source databases, a hot-swap approach can be used. This involves leveraging the master-slave hot-swap functionality of a unified access platform, designating the target database as the master and the source database as the slave. During the switchover process, dual writes to both the target and source databases continue to ensure data consistency.
[0123] Here, in the event of a failure that cannot be repaired in a short time on the unified access platform and the target database, a rapid and seamless switch can be achieved without human intervention, ensuring the stable operation of the target database.
[0124] In an optional implementation, while simultaneously executing the Structured Query Language request through both the source and target databases, the following steps are also included: First, determine the request information for the Structured Query Language request; the request information includes the number of requests and the request frequency. Secondly, if the requested information meets the preset connection conditions, the number of connections in the connection layer corresponding to the target database is increased. Finally, if the requested information does not meet the preset connection conditions, reduce the number of connections in the connection layer corresponding to the target database.
[0125] In the embodiments of this disclosure, a unified access platform can be used for database connections, leveraging its global connection pooling function to reduce the number of direct database connections. Request information from the target database is continuously monitored, and data such as request peaks and request volume trends are collected.
[0126] In this system, applications do not connect directly to the database; instead, they access it through a global connection pool provided by the unified access platform. The unified access platform manages all application connection requests, allocating and managing connections through the global connection pool.
[0127] Here, the preset connection condition is the connection pool utilization rate; meeting the preset connection condition means that the connection pool utilization rate exceeds a preset utilization rate threshold. Those skilled in the art can set the preset utilization rate threshold based on actual needs, which will not be elaborated upon here.
[0128] Here, connection requirements during high-concurrency requests can be recorded, and request models for different time periods can be established. The ratio of the current active connections to the maximum number of connections (i.e., self-healing utilization) can be calculated to understand the connection pool usage in real time. The connection pool utilization is compared with a set threshold to determine whether scaling up or down is necessary.
[0129] Subsequently, when the connection pool utilization exceeds the set upper limit threshold (e.g., 90%) (i.e., the request information meets the preset connection conditions), the connection pool expansion process is triggered to increase the number of available connections.
[0130] When the connection pool utilization rate falls below a set lower threshold (e.g., 30%) (i.e., the request information does not meet the preset connection conditions), the connection pool scaling-down process is triggered to release unnecessary connections. Through statistical analysis of request volume and response speed, a self-healing utilization parameter is set to ensure that the adjusted number of connections can meet request demands without excessively consuming resources.
[0131] Subsequently, when utilization exceeds the upper limit threshold: increase the maximum number of connections in the connection pool based on the growth in application request volume. Increase connections gradually as needed: for example, increase the number of connections by 10%-20% each time until application requests are met or the maximum configurable number of connections in the connection pool is reached. Continue to monitor utilization after adding connections to avoid over-expansion and resource waste.
[0132] When utilization falls below the lower threshold: Gradually reduce the number of connections in the connection pool to release occupied resources. Reduce connections gradually as needed: Reduce the number of connections by 10%-20% each time to avoid reducing too many connections at once and impacting response speed. Automatically scale down during off-peak periods: Automatically adjust the connection pool to its minimum size during periods of low application load to reduce resource consumption by idle connections.
[0133] Here, the response status of each connection can be continuously monitored, and connections that are unresponsive for extended periods or have timed out are automatically replaced. When the number of faulty connections exceeds a set threshold, a rapid expansion process is triggered to add new connections, ensuring connection availability under high concurrency conditions.
[0134] Automation and self-healing adjustment: Configuring automated scripts and health check mechanisms enables the connection pool to have self-healing capabilities. When system load changes or connection anomalies occur, the number of connections is automatically adjusted without manual intervention. When the number of connections reaches or approaches the upper limit threshold, an early warning notification is triggered, and administrators can manually intervene or automatically implement scaling strategies as needed.
[0135] In an optional implementation, while simultaneously executing Structured Query Language requests through both the source and target databases, the method further includes: Obtain the business information corresponding to the target database; wherein, the business information includes at least one of the following: business scenario, structured query language request, and query type of structured query language request; Configure data caching strategies based on business information; Upon receiving a data query instruction, a search is performed in the local cache space of the target database; If no results are found in the local cache of the target database, a search is performed on the platform corresponding to the target database.
[0136] In the embodiments of this disclosure, data access performance can be improved through data caching strategies, the IO path for querying hot data can be shortened, and the overall transaction performance can be improved.
[0137] Here, a two-level caching strategy can be used to further reduce the database's I / O load. This two-level caching strategy includes process-level caching and global caching.
[0138] Process-level caching is implemented at the application layer to cache frequently used data and reduce the number of database accesses. Global caching is implemented on a unified access platform.
[0139] Here, caching strategies can be flexibly specified based on different business scenarios and SQL execution conditions. Create cache configuration files (such as YAML or JSON format) or maintain a cache strategy configuration table in the database, setting different cache rules according to business modules, SQL statements, and query types (such as SELECT, JOIN, etc.). Automatic cache strategy matching: When the application executes an SQL query, the configured cache rules are automatically matched based on the SQL statement. Based on the matched rules, it is determined whether caching should be performed, and the cache level, duration, and refresh strategy.
[0140] Then, a two-level cache sharing mechanism can be implemented at the application layer and the unified access platform layer to optimize the data access path. Furthermore, through the caching mechanism, direct I / O access to the database can be reduced, thereby improving the efficiency of data reading.
[0141] For example, in a common 8:2 transaction scenario, shortening the I / O path for querying frequently accessed data improves overall transaction performance. Given that domestic databases generally perform worse than Oracle, shortening the I / O path results in an average performance improvement of 1.99% for overall transactions.
[0142] The above implementation effectively addresses the performance and resource utilization differences of domestic databases through optimizations in connection convergence and caching efficiency. This solution not only improves the resource utilization of domestic databases but also significantly enhances the overall performance and stability of the system, ensuring business continuity and efficiency during migration.
[0143] Based on the same inventive concept, this disclosure also provides a database migration device corresponding to the database migration method. Since the principle of the device in this disclosure for solving the problem is similar to that of the database migration method described above, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0144] Reference Figure 2 The diagram shown is a schematic of a database migration device provided in an embodiment of this disclosure. The device includes: a data configuration module 21, a determination module 22, a synchronization module 23, and a migration module 24; wherein: Configuration module 21 is used to configure the target compatible driver component into the source database and the target database, and to access the source database and the target database through the target compatible driver component; The determining module 22 is used to determine the database synchronization method based on the business characteristics of the structured query language request corresponding to the source database; wherein, the business characteristics are used to indicate business requirements; Synchronization module 23 is used to synchronize data with the source database and the target database through the database synchronization method, and to execute structured query language requests simultaneously through the source database and the target database; Migration module 24 is used to determine that the data migration of the target database is successful and to suspend the use of the source database when the target database is running stably.
[0145] This disclosure embodiment enables unified access to the source and target databases without extensive modifications to the application code through the configuration and application of the target compatible driver component. This effectively avoids the multi-dimensional code modification problems caused by differences in the underlying architecture and syntax rules of the source and target databases in traditional migration methods, significantly reducing the probability of code errors and fundamentally reducing the risk of functional abnormalities and data loss in the application after migration.
[0146] By accurately determining the database synchronization method based on the business characteristics of the source database's SQL requests, it can tailor the approach to different business needs, ensuring the targeted and efficient nature of data synchronization. Combined with a dual-track operation mode that executes SQL requests simultaneously in both the source and target databases, it ensures business continuity and data consistency during the migration process, avoiding the data synchronization chaos that can occur in heterogeneous environments. Finally, after the target database is running stably, the source database is temporarily deactivated, achieving a smooth transition and significantly improving the overall efficiency of database migration. This provides more reliable and efficient technical support for business system upgrades and the localization of databases.
[0147] The processing flow of each module in the device and the interaction flow between each module can be referred to the relevant descriptions in the above method embodiments, and will not be detailed here.
[0148] Corresponding to Figure 1 The present disclosure also provides an electronic device 300 for detecting the operational status of computing centers, such as... Figure 3 The diagram shown is a structural schematic of an electronic device 300 provided in an embodiment of this disclosure, including: The system includes a processor 31, a memory 32, and a bus 33. The memory 32 stores execution instructions and includes main memory 321 and external memory 322. The main memory 321, also called internal memory, temporarily stores the computational data in the processor 31, as well as data exchanged with external memory such as a hard disk. The processor 31 exchanges data with the external memory 322 through the main memory 321. When the electronic device 300 is running, the processor 31 communicates with the memory 32 through the bus 33, causing the processor 31 to execute the following instructions: Configure the target-compatible driver component into the source database and the target database, and access the source database and the target database through the target-compatible driver component; Based on the business characteristics of the structured query language request corresponding to the source database, the database synchronization method is determined; wherein, the business characteristics are used to indicate business requirements; Data is synchronized to the source database and the target database using the database synchronization method, and a structured query language request is executed simultaneously through the source database and the target database. If the target database is running stably, the data migration of the target database is determined to be successful, and the use of the source database is suspended.
[0149] The basic principles of this disclosure have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this disclosure are merely examples and not limitations, and should not be considered as essential features of each embodiment of this disclosure. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the scope of this disclosure to the necessity of employing the aforementioned specific details for implementation.
[0150] The block diagrams of devices, apparatuses, devices, and systems disclosed herein are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.
[0151] Additionally, as used herein, the "or" used in a list of items beginning with "at least one" indicates a separate list, such that a list of, for example, "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not imply that the described example is preferred or better than other examples.
[0152] It should also be noted that in the systems and methods of this disclosure, the components or steps can be decomposed and / or recombined. These decompositions and / or recombinations should be considered as equivalent solutions to this disclosure.
[0153] Various changes, substitutions, and modifications can be made to the technology described herein without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims of this disclosure is not limited to the specific aspects of the processes, machines, manufactures, events, means, methods, and actions described above. Currently existing or later-developed processes, machines, manufactures, events, means, methods, or actions that perform substantially the same function or achieve substantially the same result as the corresponding aspects described herein can be utilized. Therefore, the appended claims include such processes, machines, manufactures, events, means, methods, or actions within their scope.
[0154] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of this disclosure. Therefore, this disclosure is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein.
[0155] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this disclosure to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations therein.
Claims
1. A database migration method, characterized in that, include: Configure the target-compatible driver component into the source database and the target database, and access the source database and the target database through the target-compatible driver component; Based on the business characteristics of the structured query language request corresponding to the source database, the database synchronization method is determined; wherein, the business characteristics are used to indicate business requirements; Data is synchronized to the source database and the target database using the database synchronization method, and a structured query language request is executed simultaneously through the source database and the target database. If the target database is running stably, the data migration of the target database is determined to be successful, and the use of the source database is suspended.
2. The method according to claim 1, characterized in that, The process of determining the database synchronization method based on the business characteristics of the structured query language request corresponding to the source database includes: When the real-time requirements of the business are determined based on the aforementioned business characteristics, a multi-level distribution strategy is adopted as the database synchronization method; wherein, the multi-level distribution strategy performs hierarchical synchronization of Structured Query Language requests with different latency requirements. When the business data volume is large based on the aforementioned business characteristics, a memory buffering strategy is adopted as the synchronization method for the database; wherein, the memory buffering strategy is to set up a memory queue to store structured query language requests.
3. The method according to claim 2, characterized in that, The process of synchronizing data with the source database and the target database using the database synchronization method includes: Given that the database synchronization method is determined to be the multi-level distribution strategy, the latency requirement for the Structured Query Language request is determined. Based on the aforementioned latency requirements, the priority of the Structured Query Language request is determined; Data synchronization is performed between the source database and the target database based on the stated priority.
4. The method according to claim 2, characterized in that, The process of synchronizing data with the source database and the target database using the database synchronization method includes: If the database synchronization method is determined to be a memory buffering strategy, a buffer queue is set up. During the data synchronization process between the source database and the target database, the structured query language request is stored in the buffer queue.
5. The method according to claim 1, characterized in that, The step of simultaneously executing a structured query language request through the source database and the target database includes: Determine the risk level of the structured query language request; If the risk level is less than a preset risk level threshold, the structured query language request is executed through the target database; If the risk level is greater than or equal to a preset risk level threshold, the structured query language request is executed through the source database.
6. The method according to claim 5, characterized in that, The method further includes: The performance of the target database is monitored to determine the stability of its business execution. If the target database is determined to be unstable based on the stability of the business execution, the system switches to the source database to execute the structured query language request.
7. The method according to claim 1, characterized in that, The stable operation of the target database is determined by the following methods: Determine the data consistency between the target database and the source database; If the data consistency is greater than a preset consistency threshold, the target database is determined to be operating stably.
8. The method according to claim 1, characterized in that, While simultaneously executing a Structured Query Language request through both the source database and the target database, the method further includes: Determine the request information for the Structured Query Language request; wherein the request information includes the number of requests and the request frequency; If the request information meets the preset connection conditions, the number of connections in the connection layer corresponding to the target database is increased. If the requested information does not meet the preset connection conditions, the number of connections in the connection layer corresponding to the target database is reduced.
9. The method according to claim 1, characterized in that, While simultaneously executing a Structured Query Language request through both the source database and the target database, the method further includes: Obtain the business information corresponding to the target database; wherein, the business information includes at least one of the following: business scenario, structured query language request, and query type of structured query language request; Configure a data caching strategy based on the aforementioned business information; Upon receiving a data query instruction, a search is performed in the local cache space of the target database; If no result is found in the local cache space of the target database, a search is performed on the platform corresponding to the target database.
10. A database migration device, characterized in that, include: A configuration module is used to configure the target compatible driver component into the source database and the target database, and to access the source database and the target database through the target compatible driver component; The determination module is used to determine the database synchronization method based on the business characteristics of the structured query language request corresponding to the source database; wherein, the business characteristics are used to indicate business requirements; The synchronization module is used to synchronize data with the source database and the target database through the database synchronization method, and to execute structured query language requests simultaneously through the source database and the target database. The migration module is used to determine that the data migration of the target database is successful and to suspend the use of the source database, provided that the target database is running stably.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the database migration method according to any one of claims 1 to 9.
12. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the database migration method according to any one of claims 1 to 9.
13. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the database migration method according to any one of claims 1 to 9.
