SQL Server database transaction log analysis DDL operation method, device, equipment and medium

By analyzing the incremental DDL operations in the transaction log file of the SQL Server database and performing corresponding operations in the target database, the problem of incomplete analysis of DDL operations and in real-time synchronization in the existing technology is solved, and the database is fast and accurate Synchronize with zero downtime.

CN118467644BActive Publication Date: 2024-11-05DISJIE (BEIJING) DATA MANAGEMENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410939963.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-15
Publication Date
2024-11-05
Estimated Expiration
2044-07-15

AI Technical Summary

Technical Problem

The prior art is difficult to effectively analyze and synchronize DDL operations in SQL Server databases, resulting in incomplete analysis, error-prone and inability to achieve real-time synchronization.

Method used

By exporting the table dictionary of the source database, listening and analyzing the incremental DDL operations in the transaction log file, generating the corresponding data file, and performing incremental DDL operations in the target database in real time or time to ensure data consistency.

Benefits of technology

It realizes rapid database synchronization, reduces manual errors, improves the accuracy and stability of data consistency, can achieve zero downtime synchronization, and simplifies the operation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118467644B_ABST
    Figure CN118467644B_ABST
Patent Text Reader

Abstract

The disclosed embodiment provides a SQL Server database transaction log analysis DDL operation method, device, equipment and medium, the method exports the table dictionary of all table data that need to be synchronized in the source database, generates a first data file; starts the log analysis process of the source database, monitors and analyzes whether there is an incremental DDL operation in the source database transaction log file, and if so, generates a second data file based on the incremental DDL operation; starts the target database loading process, loads the first data file into the target database, generates corresponding table data based on the first data file; loads the second data file into the target database in real time or regularly, and performs incremental DDL operations on the generated table data according to the second data file. Through the present invention, the efficiency of DDL operation analysis and synchronization can be improved, manual errors can be reduced, and real-time synchronization can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a method, device, equipment and medium for analyzing DDL operations of SQL Server database transaction logs. Background Art

[0002] SQL Server is a commonly used relational database management system. DDL (Data Definition Language) operations are used to create, modify, and delete objects such as tables, views, and indexes in the database. SQL Server is widely used in various enterprise-level applications. Various studies on SQL Server are also very active, among which database backup, protection, and active-active based on online transaction log analysis are an important direction. Database backup based on online transaction logs has various advantages, such as small impact on business and database performance. In order to fully implement database protection, analyzing DDL from online transaction logs is an important part. However, since the recording method of DDL in the log is relatively complex, parsing is difficult and error-prone, most products currently do not support DDL analysis.

[0003] Currently, the analysis and synchronization of DDL operations for SQL Server databases are mainly achieved through manual operations or the use of third-party tools. Manual operations require administrators to directly extract the table structure and then manually execute the corresponding DDL operations in the target database. However, manual operations are prone to errors and require administrators to have certain professional knowledge and experience. Other third-party tools on the market currently do not fully process DDL operations, and do not fully synchronize DDL operations. Some complex types cannot be fully parsed, and there are delays, so real-time synchronization is impossible and omissions are prone to occur. Summary of the invention

[0004] The present invention provides a method, apparatus, device and medium for analyzing DDL operations of SQL Server database transaction logs, aiming to improve the efficiency of analysis and synchronization of DDL operations, reduce manual errors and realize real-time synchronization.

[0005] The technical solution of the present disclosure is as follows:

[0006] In a first aspect, an embodiment of the present disclosure provides a method for analyzing a DDL operation of a SQL Server database transaction log, including:

[0007] Export the table dictionary of all table data that need to be synchronized in the source database to generate the first data file;

[0008] Start the log analysis process of the source database, monitor and analyze whether there is an incremental DDL operation in the transaction log file of the source database, and if so, generate a second data file based on the incremental DDL operation;

[0009] Starting a target-side database loading process, loading the first data file into the target-side database, and generating corresponding table data based on the first data file;

[0010] The second data file is loaded into the target database in real time or periodically, and an incremental DDL operation is performed on the generated table data according to the second data file.

[0011] In a possible implementation manner, in the method provided by the embodiment of the present invention, exporting a table dictionary of all table data that needs to be synchronized in the source database to generate a first data file includes:

[0012] By querying all the table data that needs to be synchronized in the source database, obtaining the table dictionary information of all the table data, and generating and exporting the table dictionary of all the table data;

[0013] Save the table dictionary of all table data as the first data file;

[0014] The table dictionary information includes the table name, table ID, all field names, and the data type corresponding to each field.

[0015] In a possible implementation, in the method provided by an embodiment of the present invention, a log analysis process of a source database is started, and whether there is an incremental DDL operation in a transaction log file of the source database is monitored and analyzed, and if so, a second data file is generated based on the incremental DDL operation, including:

[0016] Start the process for monitoring the transaction log file of the source database. If a new transaction log is detected, read the content of the newly written log file.

[0017] Parse the content in the transaction log file to identify whether there is an incremental DDL operation to create a table or modify the table structure, and save the incremental DDL operation as a second data file.

[0018] In a possible implementation manner, in the method provided by the embodiment of the present invention, if a new transaction log is monitored to be written, the newly written log file content is read, including:

[0019] When new log file content is written to the transaction log file, read the newly written log file content;

[0020] According to the content of the newly written log file, determine whether the transaction object corresponding to the content of the newly written log file is within the data synchronization range;

[0021] For database objects that exist in the transaction log but are not within the synchronization scope, the newly written log file content is ignored;

[0022] For database objects that exist in the transaction log and are within the synchronization scope, the incremental DDL operations corresponding to the newly written log file content are parsed into the second data file.

[0023] In a possible implementation, in the method provided by the embodiment of the present invention, starting a target-side database loading process, loading a first data file into the target-side database, and generating corresponding table data based on the first data file include:

[0024] Start the target database loading process and load the first data file of the table data to be synchronized into the target database;

[0025] According to the table dictionary information in the first data file, table data that is completely consistent with the source database is created in the target database.

[0026] In a possible implementation manner, in the method provided by the embodiment of the present invention, the second data file is loaded into the target database in real time or periodically, and the incremental DDL operation is performed on the generated table data according to the second data file, including:

[0027] Execute the log analysis process in a loop, monitor the transaction log changes of the source database, and generate a corresponding second data file for each transaction log change;

[0028] Loading the second data file into the target end database in real time or at a scheduled time;

[0029] The incremental DDL operation in the second data file is executed on the table data in a preset order.

[0030] In a possible implementation manner, in the method provided by an embodiment of the present invention, the preset order is the data size order of the currently received second data files, the file generation time order, or the preset importance order.

[0031] In a second aspect, an embodiment of the present disclosure further provides a SQL Server database transaction log analysis DDL operation device, including:

[0032] A first data file generation module is used to export a table dictionary of all table data that need to be synchronized in the source database to generate a first data file;

[0033] A second data file generation module is used to start the log analysis process of the source database, monitor and analyze whether there is an incremental DDL operation in the transaction log file of the source database, and if so, generate a second data file based on the incremental DDL operation;

[0034] A first data file loading module, used to start a target-side database loading process, load the first data file into the target-side database, and generate corresponding table data based on the first data file;

[0035] The incremental DDL operation execution module is used to load the second data file into the target end database in real time or periodically, and execute the incremental DDL operation on the generated table data according to the second data file.

[0036] In a third aspect, an embodiment of the present disclosure further provides an electronic device, including:

[0037] processor;

[0038] memory for storing processor executable instructions;

[0039] The processor is configured to execute instructions to implement the method of the first aspect.

[0040] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the method of the first aspect when executed by a processor.

[0041] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product, comprising a computer program / instructions, wherein the computer program / instructions implement the method of the first aspect when executed by a processor.

[0042] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:

[0043] In the embodiments of the present disclosure, by analyzing the incremental DDL operations of the database transaction log, the rapid synchronization of the database is achieved. Compared with the traditional full backup and recovery method, the present invention only needs to synchronize the incremental changes, which greatly reduces the time and bandwidth consumption required for synchronization; the present invention creates a table structure that is completely consistent with the source database in the target database, and by loading the incremental DDL operation, it ensures that the data of the target database is consistent with the data of the source database, which can avoid the complex process of manually creating the table structure and importing data, and improve the accuracy and stability of data consistency; after the log analysis process is started, the present invention cyclically executes the log analysis and DDL incremental synchronization operations, which can achieve real-time synchronization of database changes. Compared with the traditional backup and recovery method, the present invention does not need to shut down the database for maintenance, can achieve zero downtime synchronization, reduce the downtime of the system, and improve the availability of the system; the present invention simplifies the operation process of database synchronization by automatically analyzing and loading incremental DDL operations. There is no need to manually record and execute each DDL operation, which reduces the errors and risks of manual operations and improves the convenience and accuracy of operations.

[0044] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.

[0046] Figure 1 A flowchart of a SQL Server database transaction log analysis DDL operation method provided in an embodiment of the present disclosure;

[0047] Figure 2 A schematic diagram of a process of generating a first data file in step S101 of a method for extracting DDL operations from a SQL Server database transaction log analysis provided by an embodiment of the present disclosure;

[0048] Figure 3 A schematic diagram of a flow chart of generating a second data file in step S102 of a SQL Server database transaction log analysis DDL operation method provided in an embodiment of the present disclosure;

[0049] Figure 4 A flowchart of loading a first data file into a target database in step S103 of a SQL Server database transaction log analysis DDL operation method provided by an embodiment of the present disclosure;

[0050] Figure 5 A flowchart of a SQL Server database transaction log analysis DDL operation method provided by an embodiment of the present disclosure, in which step S104 loads a second data file into a target database in real time or periodically, and performs an incremental DDL operation on the generated table data according to the second data file;

[0051] Figure 6 A structural diagram of a SQL Server database transaction log analysis DDL operation device provided in an embodiment of the present disclosure;

[0052] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0053] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0054] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0055] Figure 1 A flowchart of a SQL Server database transaction log analysis DDL operation method provided in the first embodiment of the present disclosure is shown in FIG. Figure 1 As shown, the method may include the following steps:

[0056] S101, exporting a table dictionary of all table data that needs to be synchronized in a source database to generate a first data file.

[0057] The source database and target database involved in the present invention are SQL Server databases.

[0058] In a specific embodiment of the present invention, a connection is made to a source database, table data of the source database is queried, and table dictionary information of all tables to be synchronized in the source database is obtained from a system table. The table dictionary contains structural information of each table, including table name, table ID, all field names, and data type corresponding to each field. The exported table dictionary will be cached as a first data file.

[0059] S102, starting the log analysis process of the source database, monitoring and analyzing whether there is an incremental DDL operation in the transaction log file of the source database, and if so, generating a second data file based on the incremental DDL operation.

[0060] In this step, the log analysis process is started to monitor the changes in the transaction log file of the source database. When new data is written to the transaction log file, the newly written content will be read, and then the transaction log will be used to determine whether the transaction corresponding to the newly written content is within the synchronization range. Object information that is not within the synchronization range will be ignored, and the relevant DDL operations of objects within the synchronization range will be parsed into the second data file and cached locally for use in subsequent steps.

[0061] S103, starting a target-side database loading process, loading the first data file into the target-side database, and generating corresponding table data based on the first data file.

[0062] A target-side loading process is started, and the first data file of the table dictionary cache file exported in step S101 is loaded into the target-side database. By loading the first data file, a table structure completely consistent with the source-side database can be created in the target-side database for the table data content to be synchronized.

[0063] S104, loading the second data file into the target database in real time or periodically, and performing incremental DDL operations on the generated table data according to the second data file.

[0064] The second data file obtained in step S102 is obtained and loaded into the target database. Meanwhile, the table dictionary structure information involved in the DDL operation in the second data file is also saved for subsequent use and query.

[0065] Further, the log analysis process of step S102 is executed cyclically to monitor the changes of the transaction log file of the source database, and analyze the specific incremental DDL operation, and a second data file is generated correspondingly based on the incremental DDL operation obtained by each analysis. At the same time, the DDL incremental synchronization of step S104 is executed cyclically, and the second data file generated in the source database is transmitted to the target database in real time or regularly, and the incremental DDL operation is loaded into the target database according to the second data file, and the saved table dictionary structure information is updated.

[0066] like Figure 2 As shown, Figure 2 The specific process of generating the first data file in step S101 is shown, including:

[0067] S1011: query all table data that need to be synchronized in the source database, obtain table dictionary information of all table data, and generate and export table dictionaries of all table data.

[0068] The data in the database can be stored in the database in the form of tables under certain circumstances. When data needs to be migrated, it can also be migrated in the form of tables. Based on this, this embodiment queries and obtains the table dictionary information of all tables to be synchronized in the source database from the system table.

[0069] S1012: Save the table dictionary of all table data as a first data file.

[0070] The table dictionary exported in the previous step will be cached as the first data file. The table dictionary information includes the table name, table ID, all field names and the data type corresponding to each field.

[0071] like Figure 3 As shown, Figure 3 The specific process of generating the second data file in step S102 is shown, including:

[0072] S1021: Start a process for monitoring the transaction log file of the source database. If a new transaction log is detected, read the content of the newly written log file.

[0073] The table data involved in the first data file is used as the initial data. When the table data in the source database changes, the existing technology often needs to synchronize the changed data to the target database. This method will lead to data redundancy, or require additional program setting to merge and delete data, which increases the workload; and the changed data often cannot be separated from other related data. All data related to the changed data in the source database can only be transferred to the target database, which consumes a lot of data transmission time and causes duplicate data to appear in the target database.

[0074] Therefore, in an embodiment of the present invention, a process for monitoring the transaction log file of the source database is started. Specifically, if the process is an existing process in the source database, it is directly started, otherwise a new process for monitoring the transaction log file of the source database needs to be created.

[0075] S1022: Parse the content in the transaction log file, identify whether there is an incremental DDL operation to create a table or modify a table structure, and save the incremental DDL operation as a second data file.

[0076] Predefine incremental DDL operations, including but not limited to operations of creating, modifying, and deleting tables, views, and indexes in the database. Parse the content of the transaction log file to determine whether there are predefined incremental DDL operations. If so, identify the specific incremental DDL operations and save the incremental DDL operations as a second data file for subsequent use.

[0077] Further, when a new transaction log is monitored, the newly written log file content is read, including the following steps:

[0078] When new log file content is written to the transaction log file, read the newly written log file content;

[0079] According to the content of the newly written log file, determine whether the transaction object corresponding to the content of the newly written log file is within the data synchronization range;

[0080] For database objects that exist in the transaction log but are not within the synchronization scope, the newly written log file content is ignored;

[0081] For database objects that exist in the transaction log and are within the synchronization scope, the incremental DDL operations corresponding to the newly written log file content are parsed into the second data file.

[0082] like Figure 4 As shown, Figure 4 The specific process of loading the first data file into the target database in step S103 is shown, including:

[0083] S1031: Start the target-side database loading process and load the first data file of the table data to be synchronized into the target-side database.

[0084] Start the target database loading process, establish a data transmission channel between the source database and the target database, and transmit the first data file stored in the above step to the target database through the transmission channel for storage.

[0085] S1032: Create table data in the target database that is completely consistent with the source database according to the table dictionary information in the first data file.

[0086] After receiving the first data file, the target-end database parses the first data file and creates table data in the target-end database that is completely consistent with the source-end database according to the table dictionary information in the first data file.

[0087] like Figure 5 As shown, Figure 5 The specific implementation process of loading the second data file into the target database in real time or periodically in step S104 and performing the incremental DDL operation on the generated table data according to the second data file is shown, including:

[0088] S1041: Execute the log analysis process in a loop, monitor the transaction log changes of the source database, and generate a corresponding second data file for each transaction log change.

[0089] S1042: Load the second data file into the target database in real time or periodically.

[0090] S1043: Execute the incremental DDL operation in the second data file on the table data in a preset order, wherein the preset order is the data size order of the currently received second data files, the file generation time order, or the preset importance order.

[0091] Compared with the prior art, this technical solution mainly solves the following technical problems:

[0092] 1. The current method of analyzing DDL operations in SQL Server database transaction logs is incomplete and inaccurate. The present invention monitors changes in transaction log files and analyzes specific incremental DDL operations, thereby accurately capturing changes in the database.

[0093] 2. In the process of data migration, the existing method needs to manually create the table structure of the target database and manually perform DDL operations, which is inefficient and prone to errors. The present invention greatly improves the efficiency and accuracy of data migration by automatically loading the table dictionary cache file to the target database and creating a completely consistent table structure.

[0094] 3. In the process of database backup, the existing methods can only back up the data of the database, but cannot back up the structural information of the database. The present invention realizes the backup of the database structural information by loading the DDL operation into the backup database and saving the table dictionary structural information, thereby improving the comprehensiveness of data backup.

[0095] In summary, the present invention solves the problem of incomplete and inaccurate analysis of DDL operations in SQL Server database transaction logs by monitoring transaction logs, automatically loading table dictionary cache files, and saving DDL operations to a backup database, thereby improving the efficiency and accuracy of data migration and backup.

[0096] Based on the same inventive concept, the embodiment of the present disclosure also provides a SQL Server database transaction log analysis DDL operation device. Figure 6 As shown, the device 600 includes:

[0097] A first data file generating module 610 is used to export a table dictionary of all table data that need to be synchronized in the source database to generate a first data file;

[0098] The second data file generation module 620 is used to start the log analysis process of the source database, monitor and analyze whether there is an incremental DDL operation in the transaction log file of the source database, and if so, generate a second data file based on the incremental DDL operation;

[0099] A first data file loading module 630 is used to start a target-side database loading process, load the first data file into the target-side database, and generate corresponding table data based on the first data file;

[0100] The incremental DDL operation execution module 640 is used to load the second data file into the target database in real time or periodically, and perform incremental DDL operations on the generated table data according to the second data file.

[0101] The specific implementation method and technical effect of the device provided in the embodiment of the present disclosure are similar to those of the above-mentioned method embodiment, and will not be repeated here.

[0102] In addition, combined Figure 1-Figure 6 The SQL Server database transaction log analysis DDL operation method and device described in the embodiment of the present application can be implemented by an electronic device. Figure 7A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.

[0103] like Figure 7 As shown, the electronic device 1000 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1008 to a random access memory (RAM) 1003 to implement the battery capacity prediction method of the embodiment described in the present disclosure. In the RAM 1003, various programs and data required for the operation of the electronic device 1000 are also stored. The processing device 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.

[0104] Typically, the following devices may be connected to the I / O interface 1005: an input device 1006 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1007 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1008 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the electronic device 1000 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 The electronic device 1000 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0105] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart, thereby implementing the voice control method as described above. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 1009, or installed from the storage device 1008, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0106] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings.

[0107] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0108] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0109] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A SQL Server database transaction log analysis DDL operation method, characterized in that: include: Export table dictionary information of all table data that need to be synchronized in the source database to generate a first data file, wherein the table dictionary information includes a table name, a table ID, all field names, and a data type corresponding to each field; Start the log analysis process of the source database, perform monitoring and analysis in a loop to see whether there is an incremental DDL operation in the transaction log file of the source database, and if a new transaction log is detected, read the content of the newly written log file, and determine whether the transaction object corresponding to the newly written log file content is within the data synchronization range according to the content of the newly written log file, and for the database objects that exist in the transaction log and are within the synchronization range, parse the incremental DDL operation corresponding to the newly written log file content into the second data file; Starting a target-side database loading process, automatically loading the first data file into the target-side database, and generating corresponding table data based on the first data file; The log analysis process is executed cyclically, transaction log changes of the source database are monitored, a corresponding second data file is generated for each transaction log change, the second data file is automatically loaded into the target database in real time or periodically, and incremental DDL operations are performed on the generated table data according to the second data file.

2. The SQL Server database transaction log analysis DDL operation method according to claim 1, characterized in that: Export the table dictionary information of all table data that need to be synchronized in the source database, generate and export the table dictionary of all table data, including: By querying all table data that need to be synchronized in the source database, table dictionary information of all table data is obtained, and table dictionaries of all table data are generated and exported.

3. The SQL Server database transaction log analysis DDL operation method according to claim 1, characterized in that: Determine whether the transaction object corresponding to the newly written log file content is within the data synchronization range, and also include: For database objects that exist in the transaction log but are not within the synchronization scope, the newly written log file content is ignored.

4. The SQL Server database transaction log analysis DDL operation method according to claim 1, characterized in that: Starting a target-side database loading process, loading the first data file into the target-side database, and generating corresponding table data based on the first data file, including: Starting a target-side database loading process, loading a first data file representing table data to be synchronized in the source-side database into the target-side database; According to the table dictionary information in the first data file, table data that is completely consistent with the source database is created in the target database.

5. The SQL Server database transaction log analysis DDL operation method according to claim 1, characterized in that: Performing an incremental DDL operation on the generated table data according to the second data file includes: The incremental DDL operation in the second data file is executed on the table data in a preset order.

6. The SQL Server database transaction log analysis DDL operation method according to claim 5, characterized in that: The preset order is the data size order of the currently received second data files, the file generation time order or the preset importance order.

7. A SQL Server database transaction log analysis DDL operation device, characterized in that: include: A first data file generation module, used to export table dictionary information of all table data that need to be synchronized in the source database, and generate a first data file, wherein the table dictionary information includes a table name, a table ID, all field names, and a data type corresponding to each field; The second data file generation module is used to start the log analysis process of the source database, cyclically monitor and analyze whether there is an incremental DDL operation in the transaction log file of the source database, and if a new transaction log is monitored, read the newly written log file content, and judge whether the transaction object corresponding to the newly written log file content is within the data synchronization range according to the newly written log file content, and for the database objects that exist in the transaction log and are within the synchronization range, parse the incremental DDL operation corresponding to the newly written log file content into the second data file; A first data file loading module, used to start a target-side database loading process, automatically load the first data file into the target-side database, and generate corresponding table data based on the first data file; The incremental DDL operation execution module is used to cyclically execute the log analysis process, monitor the transaction log changes of the source database, generate a corresponding second data file for each transaction log change, automatically load the second data file into the target database in real time or periodically, and perform incremental DDL operations on the generated table data according to the second data file.

8. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: The computer-readable storage medium stores computer-executable instructions; after the computer-executable instructions are executed by a processor, the method according to any one of claims 1 to 6 can be implemented.