Database migration method, device, readable storage medium and computer equipment

By obtaining and configuring database version information, exporting and importing logs, the problem of incomplete database migration is solved and data integrity and migration efficiency are improved.

CN113626412BActive Publication Date: 2024-09-24徐世亮
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110928090.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-13
Publication Date
2024-09-24
Estimated Expiration
2041-08-13

AI Technical Summary

Technical Problem

In existing database migration methods, the integrity of the imported data cannot be determined when data is imported and exported, resulting in incomplete database migration.

Method used

Obtain the version information of the source database and the target database, obtain and configure user information, export and import structural information and data information, and record export and import logs. Compare the logs to determine whether there is unimported information, and if so, export it separately. and imported to ensure the integrity of data migration.

Benefits of technology

This ensures data integrity during database migration, avoids data loss and migration failures, and improves migration efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113626412B
    Figure CN113626412B
Patent Text Reader

Abstract

A database migration method, device, readable storage medium and computer equipment, the method comprising: obtaining version information of a source database and version information of a target database; when the version information of the source database is different from the version information of the target database, obtaining user information of each user in the source database and sending it to the target database; exporting the structural information and data information of the user in the source database and recording the export log; importing the structural information and data information of the user into the target database and recording the import log; comparing the export log and the import log to determine whether there is target structural information and target data information in the source database that has not been imported into the target database; if so, exporting the target structural information and target data information from the source database, and importing the exported target structural information and target data information into the target database. The present invention can efficiently and accurately complete the migration of the database.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of databases, and in particular to a database migration method, device, readable storage medium and computer equipment. Background Art

[0002] Database is a core component of computer software. Database is usually organized according to data structure and used to store and manage data. There are many types of databases, from the simplest table that stores various data to large database systems that can store massive data, which have been widely used in various aspects.

[0003] Database migration is also an extremely important part of IT system construction. Existing database migration generally uses some existing data extraction tools to achieve data migration, such as Kettle, Datastage, Informatica and other data processing software. In the current database migration method, when importing and exporting data, it is impossible to determine the integrity of the imported data, and there is usually an incomplete database data migration. Summary of the invention

[0004] In view of the above situation, it is necessary to provide a database migration method, apparatus, readable storage medium and computer equipment to address the problem of incomplete data migration during database migration in the prior art.

[0005] A database migration method, comprising:

[0006] Get the version information of the source database and the target database;

[0007] When the version information of the source database is different from the version information of the target database, obtaining user information of each user in the source database;

[0008] Sending the user information to the target database so that the target database performs user information configuration;

[0009] Exporting the structural information and data information of the user in the source database, and recording the export log;

[0010] Importing the user's structural information and data information into the target database, and recording an import log;

[0011] Comparing the export log with the import log to determine whether there is target structure information and target data information in the source database that have not been imported into the target database;

[0012] If so, the target structure information and the target data information are exported from the source database, and the exported target structure information and target data information are imported into the target database.

[0013] Furthermore, in the above database migration method, when the version information of the source database is the same as the version information of the target database, the method further includes:

[0014] Obtaining the storage path of the configuration file, the storage path of the data file, and the storage path of the log file of the target database;

[0015] Sending the configuration file of the source database to the storage path of the configuration file of the target database, and sharing the storage path of the data file and the storage path of the log file of the target database to the source database as a shared storage path;

[0016] The data files and log files of the source database are migrated online to the corresponding shared storage path. The target database is started through the configuration file of the source database and runs after reading the data files and log files in the shared storage path.

[0017] Furthermore, in the above database migration method, the step of exporting the structural information and data information of the user in the source database includes:

[0018] Creating a database client with the same version as the source database, wherein the database client includes a database logic export and import tool;

[0019] Export the structural information and data information of the user in the data source database by using the database logic export and import tool;

[0020] The step of importing the user's structural information and data information into the target database comprises:

[0021] The user's structural information and data information are imported into the target database through the database logic export and import tool.

[0022] Furthermore, in the above database migration method, the step of importing the exported target structure information and target data information into the target database comprises:

[0023] Exporting the exported structural information and data information of the user into a general database statement;

[0024] The general database statement is executed in the target database to enable the target database to rebuild corresponding information.

[0025] Furthermore, in the above database migration method, the steps of obtaining version information of the source database and user information of each user in the source database, and obtaining version information of the target database include:

[0026] The version information of the source database and the user information of each user in the source database are obtained through the database statement, and the version information of the target database is obtained.

[0027] The present invention also discloses a database migration device, comprising:

[0028] A first acquisition module is used to acquire version information of a source database and version information of a target database;

[0029] A second acquisition module, configured to acquire user information of each user in the source database when the version information of the source database is different from the version information of the target database;

[0030] A sending module, used for sending the user information to the target database, so that the target database performs user information configuration;

[0031] An export module, used to export the structural information and data information of the user in the source database and record the export log;

[0032] An import module, used to import the user's structural information and data information into the target database and record an import log;

[0033] A determination module, configured to compare the export log and the import log to determine whether there is target structure information and target data information in the source database that have not been imported into the target database;

[0034] The export module is also used to export the target structure information and the target data information from the source database;

[0035] The import module is also used to import the exported target structure information and target data information into the target database.

[0036] Furthermore, the above-mentioned database migration device further includes:

[0037] A second acquisition module is used to acquire the storage path of the configuration file, the storage path of the data file and the storage path of the log file of the target database;

[0038] A sending and sharing module, used to send the configuration file of the source database to the storage path of the configuration file of the target database, and share the storage path of the data file and the storage path of the log file of the target database to the source database as a shared storage path;

[0039] The migration module is used to migrate the data files and log files of the source database online to the corresponding shared storage path. The target database is started through the configuration file of the source database and runs after reading the data files and log files in the shared storage path.

[0040] Furthermore, in the above-mentioned database migration device, the step of exporting the structural information and data information of the user in the source database comprises:

[0041] Creating a database client with the same version as the source database, wherein the database client includes a database logic export and import tool;

[0042] Export the structural information and data information of the user in the data source database by using the database logic export and import tool;

[0043] The step of importing the user's structural information and data information into the target database comprises:

[0044] The user's structural information and data information are imported into the target database through the database logic export and import tool.

[0045] The present invention also discloses a computer device, including a memory and a processor, wherein the memory stores a program, and when the program is executed by the processor, any of the above-mentioned methods is implemented.

[0046] The present invention also discloses a computer-readable storage medium on which a program is stored. When the program is executed by a processor, any of the above-mentioned methods is implemented.

[0047] In the present invention, when different versions of databases are performing data migration, in order to detect whether the data migration between different versions of databases is complete, the export and import logs are recorded during the database migration process, and the comparison results of the import log and the export log are used to determine whether there is target structure information and target data information that have not been imported into the target database. If so, this part of information is exported from the source database separately and imported into the target database, thereby ensuring the integrity of the data migration. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 is a flowchart of a database migration method in a first embodiment of the present invention;

[0049] Figure 2 is a flowchart of a database migration method in a second embodiment of the present invention;

[0050] Figure 3 is a structural block diagram of a database migration device in a third embodiment of the present invention;

[0051] Figure 4 4 is a structural block diagram of a computer device in an embodiment of the present invention. DETAILED DESCRIPTION

[0052] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.

[0053] These and other aspects of the embodiments of the present invention will become clear with reference to the following description and drawings. In these descriptions and drawings, some specific implementations of the embodiments of the present invention are specifically disclosed to represent some ways of implementing the principles of the embodiments of the present invention, but it should be understood that the scope of the embodiments of the present invention is not limited thereto. On the contrary, the embodiments of the present invention include all changes, modifications and equivalents that fall within the spirit and connotation of the appended claims.

[0054] See also Figure 1 , which is a database migration method in the first embodiment of the present invention, includes steps S11 to S17.

[0055] Step S11, obtaining version information of the source database and version information of the target database.

[0056] Step S12: when the version information of the source database is different from the version information of the target database, obtaining user information of each user in the source database.

[0057] Step S13: sending the user information to the target database so that the target database performs user information configuration.

[0058] Databases are usually configured in servers to store data. In actual applications, database migration is required due to data backup or server replacement. The source database is the database of the data to be migrated, and the target database is the location object of the data migration.

[0059] This embodiment is applied to an intermediate server. When performing database migration, the intermediate server is connected to the source database and the target database through wireless communication. When receiving the database migration instruction, the intermediate server obtains the version information of the source database, the user information in the source database, and the version information of the target database through database statements. The source data stores user information of multiple users, and the user information includes all object information of the user's table, view, stored procedure, etc.

[0060] The data migration method between databases of different versions is different from the migration method between databases of the same version. The migration design logic export tool for databases of different versions can use physical migration for data migration between databases of the same version. When the version information of the source database is different from that of the target database, the obtained user information is sent to the target database. After receiving the user information, the target database performs information configuration.

[0061] Step S14: export the structural information and data information of the user in the source database, and record the export log.

[0062] Step S15, importing the user's structural information and data information into the target database, and recording an import log.

[0063] The data in the database is managed through the data structure of the table. The structural information is mainly the results of the table, such as how many columns there are, the information recorded in each column and the format used, the range definition of each column value, whether the table is automatically sorted according to a certain column, etc. The data information is basically the content of the table.

[0064] The intermediate server exports the structural information and data information of each user in the source database from the source data and records the export log. After the information in the source database is exported, it is imported into the target database and the import log is recorded.

[0065] The export and import logs are in text format. The intermediate server will record whether each step of the information export and import process is successful. If it fails, an error message will be output.

[0066] Step S16: Compare the export log and the import log to determine whether there is target structure information and target data information in the source database that has not been imported into the target database.

[0067] Step S17, when there is target structure information and target data information that have not been imported into the target database, export the target structure information and the target data information from the source database, and import the exported target structure information and target data information into the target database.

[0068] By comparing the export log and the import log, it can be determined whether there is target structure information and target data information that have not been imported into the target database. That is, the information recorded in the export log and the import log can be used to determine whether there is data that has failed to be imported. When there is target structure information and target data information that have not been imported into the target database, the target structure information and target data information are searched from the source database and exported. The exported information can be stored in the cache area of ​​the transit server. The transit server then imports the exported target structure information and target data information into the target database.

[0069] In this embodiment, when different versions of databases are performing data migration, in order to detect whether the data migration between different versions of databases is complete, the export and import logs are recorded during the database migration process, and it is determined whether there is target structure information and target data information that have not been imported into the target database based on the comparison results of the import log and the export log. If so, this part of information is exported from the source database separately and imported into the target database, thereby ensuring the integrity of the data migration.

[0070] See also Figure 2 , which is a database migration method in a second embodiment of the present invention, includes steps S21 to S30.

[0071] Step S21, obtaining version information of the source database and version information of the target database.

[0072] Step S22, determining whether the version of the source database is the same as the version of the target database, if not, executing step S23, if yes, executing step S28.

[0073] Step S23, obtaining user information of each user in the source database, and sending the user information to the target database, so that the target database performs user information configuration.

[0074] The database migration method in this embodiment is applied to an intermediate server, and the intermediate server can obtain version information of the source database and user information of each user in the source database through database statements, as well as version information of the target database.

[0075] Step S24, exporting the structural information and data information of the user in the source database, and recording an export log.

[0076] Step S25, importing the user's structural information and data information into the target database, and recording an import log.

[0077] Step S26: Compare the export log and the import log to determine whether there is target structure information and target data information in the source database that have not been imported into the target database.

[0078] Step S27, when there is target structure information and target data information that have not been imported into the target database, export the target structure information and the target data information from the source database, and import the exported target structure information and target data information into the target database.

[0079] Furthermore, the step of exporting the structural information and data information of the user in the source database includes:

[0080] Creating a database client with the same version as the source database, wherein the database client includes a database logic export and import tool;

[0081] The structural information and data information of the user in the data source database are exported through the database logic export and import tool.

[0082] The step of importing the user's structural information and data information into the target database comprises:

[0083] The user's structural information and data information are imported into the target database through the database logic export and import tool.

[0084] Further, the step of importing the exported target structure information and target data information into the target database includes:

[0085] Exporting the exported structural information and data information of the user into a general database statement;

[0086] The general database statement is executed in the target database to enable the target database to rebuild corresponding information.

[0087] In specific implementation, the transit server exports the data that has not been successfully exported or imported into text through database statements, and then imports it into the target database, and recreates the structural information of this part of the data.

[0088] Step S28, obtaining the storage path of the configuration file, the storage path of the data file and the storage path of the log file of the target database.

[0089] Step S29: Send the configuration file of the source database to the storage path of the configuration file of the target database, and share the storage path of the data file and the storage path of the log file of the target database with the source database as a shared storage path.

[0090] Step S30, the data files and log files of the source database are migrated online to the corresponding shared storage path, the target database is started through the configuration file of the source database, and runs after reading the data files and log files in the shared storage path.

[0091] For database migration of the same version, physical migration can be used, that is, ensuring that the database software installation path of the source database and the target database is the same. The database files include but are not limited to data files, control files, parameter files, and log files.

[0092] The transit server transfers the source database's data files, control files, parameter files and other database files to the target database through the network, keeps the file paths on both ends consistent, and starts the target database. The target database is started through the configuration file of the source database, and reads the data files and log files in the shared storage path and runs normally.

[0093] In this embodiment, when the source database and the target database have different versions, the transit server downloads and installs a database client with the same version as the source database, and the client includes a database logic export and import tool. After the database client is completed, the transit server exports the structural information and data information of each user of the source database through the database logic export tool. Then, the structural information and data information of each user is imported into the target database through the database logic import tool. Data is exported and imported through the database logic export and import tool to ensure the efficiency of data migration. At the same time, in order to ensure the integrity of data migration, by comparing the export log and the import log, it is determined whether there is target structural information and target data information in the source database that has not been imported into the target database. If so, this part of information is exported separately and imported into the target database. When the source database and the target database have the same version, physical migration is used to migrate data to ensure the integrity and efficiency of data migration.

[0094] See also Figure 3 , is a database migration device in a third embodiment of the present invention, comprising:

[0095] A first acquisition module 31 is used to acquire version information of a source database and version information of a target database;

[0096] A second acquisition module 32, configured to acquire user information of each user in the source database when the version information of the source database is different from the version information of the target database;

[0097] A sending module 33, used for sending the user information to the target database so that the target database performs user information configuration;

[0098] An export module 34 is used to export the structure information and data information of the user in the source database and record the export log;

[0099] An import module 35, used to import the user's structure information and data information into the target database and record an import log;

[0100] A determination module 36, configured to compare the export log and the import log to determine whether there is target structure information and target data information in the source database that have not been imported into the target database;

[0101] The export module 34 is also used to export the target structure information and the target data information from the source database;

[0102] The import module 35 is also used to import the exported target structure information and target data information into the target database.

[0103] Furthermore, the above-mentioned database migration device further includes:

[0104] A second acquisition module is used to acquire the storage path of the configuration file, the storage path of the data file and the storage path of the log file of the target database;

[0105] A sending and sharing module, used to send the configuration file of the source database to the storage path of the configuration file of the target database, and share the storage path of the data file and the storage path of the log file of the target database to the source database as a shared storage path;

[0106] The migration module is used to migrate the data files and log files of the source database online to the corresponding shared storage path. The target database is started through the configuration file of the source database and runs after reading the data files and log files in the shared storage path.

[0107] Furthermore, in the above-mentioned database migration device, the step of exporting the structural information and data information of the user in the source database comprises:

[0108] Creating a database client with the same version as the source database, wherein the database client includes a database logic export and import tool;

[0109] Export the structural information and data information of the user in the data source database by using the database logic export and import tool;

[0110] The step of importing the user's structural information and data information into the target database comprises:

[0111] The user's structural information and data information are imported into the target database through the database logic export and import tool.

[0112] The implementation principle and technical effects of the database migration device provided in the embodiment of the present invention are the same as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.

[0113] Another aspect of the present invention provides a computer device, see Figure 4, shown is a computer device in the fourth embodiment of the present invention, including a processor 10, a memory 20, and a computer program 30 stored in the memory and executable on the processor, and when the processor 10 executes the computer program 30, the database migration method as described above is implemented.

[0114] The computer device may be, but is not limited to, a computer, a server, or other computer devices. In some embodiments, the processor 10 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip, for running program codes stored in the memory 20 or processing data.

[0115] The memory 20 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 20 may be an internal storage unit of a computer device in some embodiments, such as a hard disk of the computer device. The memory 20 may also be an external storage device of a computer device in other embodiments, such as a plug-in hard disk equipped on the computer device, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Further, the memory 20 may also include both an internal storage unit of a computer device and an external storage device. The memory 20 may be used not only to store application software and various types of data installed in the computer device, but also to temporarily store data that has been output or is to be output.

[0116] Optionally, the computer device may also include a user interface, a network interface, a communication bus, etc. The user interface may include a display (Display), an input unit such as a keyboard (Keyboard), and the optional user interface may also include a standard wired interface and a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the computer device and to display a visual user interface. The network interface may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), which is generally used to establish a communication connection between the device and other electronic devices. The communication bus is used to realize the connection communication between these components.

[0117] It should be pointed out that Figure 4The structure shown does not constitute a limitation on the computer device. In other embodiments, the computer device may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0118] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the database migration method as described above is implemented.

[0119] Those skilled in the art will appreciate that the logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For purposes of this specification, a "computer-readable medium" may be any device that can contain, store, communicate, propagate, or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0120] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.

[0121] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or a combination thereof: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0122] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0123] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

Claims

1. A database migration method, characterized in that: include: Get the version information of the source database and the target database; When the version information of the source database is different from the version information of the target database, obtaining user information of each user in the source database; Sending the user information to the target database so that the target database performs user information configuration; Exporting the structural information and data information of the user in the source database, and recording the export log; Importing the user's structural information and data information into the target database, and recording an import log; Comparing the export log with the import log to determine whether there is target structure information and target data information in the source database that have not been imported into the target database; If so, exporting the target structure information and the target data information from the source database, and importing the exported target structure information and target data information into the target database; When the version information of the source database is the same as the version information of the target database, the method further includes: Obtaining the storage path of the configuration file, the storage path of the data file, and the storage path of the log file of the target database; Sending the configuration file of the source database to the storage path of the configuration file of the target database, and sharing the storage path of the data file and the storage path of the log file of the target database to the source database as a shared storage path; The data files and log files of the source database are migrated online to the corresponding shared storage path. The target database is started through the configuration file of the source database and runs after reading the data files and log files in the shared storage path.

2. The database migration method according to claim 1, characterized in that: The step of exporting the structural information and data information of the user in the source database comprises: Creating a database client with the same version as the source database, wherein the database client includes a database logic export and import tool; Exporting the structural information and data information of the user in the source database by using the database logic export and import tool; The step of importing the user's structural information and data information into the target database comprises: The user's structural information and data information are imported into the target database through the database logic export and import tool.

3. The database migration method according to claim 1, characterized in that: The step of importing the exported target structure information and target data information into the target database comprises: Exporting the exported structural information and data information of the user into a general database statement; The general database statement is executed in the target database to enable the target database to rebuild corresponding information.

4. The database migration method according to claim 1, characterized in that: The steps of obtaining the version information of the source database and the user information of each user in the source database, and obtaining the version information of the target database include: The version information of the source database and the user information of each user in the source database are obtained through the database statement, and the version information of the target database is obtained.

5. A database migration device, characterized in that: include: A first acquisition module is used to acquire version information of a source database and version information of a target database; A second acquisition module, configured to acquire user information of each user in the source database when the version information of the source database is different from the version information of the target database; A sending module, used for sending the user information to the target database, so that the target database performs user information configuration; An export module, used to export the structural information and data information of the user in the source database and record the export log; An import module, used to import the user's structural information and data information into the target database and record an import log; A determination module, configured to compare the export log and the import log to determine whether there is target structure information and target data information in the source database that have not been imported into the target database; The export module is also used to export the target structure information and the target data information from the source database; The import module is also used to import the exported target structure information and target data information into the target database; The second acquisition module is further used to, when the version information of the source database is the same as the version information of the target database, acquire the storage path of the configuration file, the storage path of the data file and the storage path of the log file of the target database; The database migration device also includes: A sending and sharing module, used to send the configuration file of the source database to the storage path of the configuration file of the target database, and share the storage path of the data file and the storage path of the log file of the target database to the source database as a shared storage path; The migration module is used to migrate the data files and log files of the source database online to the corresponding shared storage path. The target database is started through the configuration file of the source database and runs after reading the data files and log files in the shared storage path.

6. The database migration device according to claim 5, characterized in that: The step of exporting the structural information and data information of the user in the source database comprises: Creating a database client with the same version as the source database, wherein the database client includes a database logic export and import tool; Exporting the structural information and data information of the user in the source database by using the database logic export and import tool; The step of importing the user's structural information and data information into the target database comprises: The user's structural information and data information are imported into the target database through the database logic export and import tool.

7. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a program, and when the program is executed by the processor, the method according to any one of claims 1 to 4 is implemented.

8. A computer-readable storage medium having a program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.