CN111708753A - Method, device and equipment for evaluating database migration and computer storage medium - Google Patents

Method, device and equipment for evaluating database migration and computer storage medium Download PDF

Info

Publication number
CN111708753A
CN111708753A CN202010420491.0A CN202010420491A CN111708753A CN 111708753 A CN111708753 A CN 111708753A CN 202010420491 A CN202010420491 A CN 202010420491A CN 111708753 A CN111708753 A CN 111708753A
Authority
CN
China
Prior art keywords
database
program information
program
compatible
migration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010420491.0A
Other languages
Chinese (zh)
Inventor
蒋琪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202010420491.0A priority Critical patent/CN111708753A/en
Publication of CN111708753A publication Critical patent/CN111708753A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/214Database migration support
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/219Managing data history or versioning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses an evaluation method, an evaluation device, evaluation equipment and a computer storage medium for database migration, and relates to the field of cloud computing, wherein the method comprises the following steps: the method comprises the steps of determining whether first program information to be migrated is compatible with a second database or not according to a pre-established program resolver, converting the first program information under the condition that the first program information is incompatible with the second database to obtain a conversion result, and outputting a database migration evaluation report according to the conversion result, so that data migration of the database can be effectively evaluated, and a user can be helped to rapidly finish data migration of the heterogeneous database.

Description

Method, device and equipment for evaluating database migration and computer storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for evaluating database migration, and a computer storage medium.
Background
With the continuous development of database technology, more and more open-source relational databases and self-research relational databases are widely applied so as to better adapt application for customized tuning and development.
At present, when a new database is used for providing services for a business system, a corresponding business system needs to be developed for the new database, which is difficult for users and tends to waste a large amount of manpower and financial resources. Therefore, in order to save cost such as manpower and financial resources, users usually transfer data and programs in the original database to a new database.
In practical application, because different types of databases have different formats and storage modes of stored data, and different calling modes and representation modes of stored program information, in the process of migrating the data and program information from an original database to a new database, the data and program information are lost or unavailable, so that the service system cannot be normally provided with services, and therefore, the database migration needs to be evaluated before the database migration.
Based on this, how to evaluate the database migration becomes an urgent problem to be solved.
Disclosure of Invention
It is an object of the present invention to provide a new technical solution for the evaluation of database migration.
According to a first aspect of the present invention, there is provided an evaluation method for database migration, including:
acquiring first program information in a first database;
determining whether the first program information is compatible with a second database according to a pre-established program resolver;
under the condition that the first program information is incompatible with the second database, converting the first program information to obtain a conversion result;
and outputting a database migration evaluation report according to the conversion result.
Optionally, the program parser includes: program syntax rules of the second database;
determining whether the first program information is compatible with a second database according to a pre-established program parser, comprising:
determining whether the grammar of the program statement in the first program information is matched with the program grammar rule according to the program grammar rule of the second database;
determining that the first program information is compatible with the second database in the case that the syntax of the program statement in the first program information matches the program syntax rule;
and in the case that the syntax of the program statement in the first program information does not match the program syntax rule, determining that the first program information is not compatible with a second database.
Optionally, when the first program information is incompatible with the second database, converting the first program information includes:
converting the first program information which is not compatible with a second database into second program information which is compatible with the second database according to a preset conversion rule, wherein the preset conversion rule is matched with the compatible rule of the second database;
the method further comprises the following steps:
determining whether the total times of conversion by using the preset conversion rule reaches a preset time threshold value;
under the condition that the total times do not reach a preset time threshold value, judging whether the second program information is compatible with the second database through the program analyzer;
and outputting a manual conversion suggestion for guiding an operator to convert under the condition that the total times exceed a preset times threshold value.
Optionally, outputting a database migration evaluation report according to the conversion result, including:
and under the condition that the second program information is compatible with the second database, outputting a first database migration evaluation report according to the first program and the second program information.
Optionally, the method further includes:
under the condition that the second program information is still incompatible with the second database, converting the second program information according to a preset conversion rule;
and judging whether the second program information is compatible with the second database through the program analyzer until the total times reach a preset time threshold.
Optionally, outputting a database migration evaluation report according to the conversion result, including:
and outputting a second database migration evaluation report according to the first program information and the manual conversion suggestion under the condition that the total times exceed the preset times threshold.
Optionally, the acquiring the first program information in the first database includes:
and acquiring the stored process information, function information and/or trigger information corresponding to all the service terminals of the target user through the data extraction statement.
According to a second aspect of the present invention, there is provided an evaluation apparatus for database migration, comprising:
the acquisition module is used for acquiring first program information in a first database;
the determining module is used for determining whether the first program information is compatible with a second database according to a pre-established program resolver;
the conversion module is used for converting the first program information under the condition that the first program information is incompatible with the second database to obtain a conversion result;
and the output module is used for outputting a database migration evaluation report according to the conversion result.
According to a third aspect of the present invention, there is provided an evaluation apparatus for database migration, comprising: a processor and a memory;
the memory is for storing executable instructions for controlling the processor to perform the method according to any one of the first aspects.
According to a fourth aspect of the present invention, there is provided a computer storage medium storing computer instructions which, when executed by a processor, implement the method of any one of the first aspects.
In this embodiment, for first program information to be migrated, whether the first program information is compatible with a second database is determined according to a pre-established program parser, and when the first program information is incompatible with the second database, the first program information is converted to obtain a conversion result, and a database migration evaluation report is output according to the conversion result. By the method, the data migration of the database can be effectively evaluated, a user can be helped to quickly finish the data migration of the heterogeneous database, the database migration time is saved, and the database service is timely recovered.
Other features of the present invention and advantages thereof will become apparent from the following detailed description of exemplary embodiments thereof, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description, serve to explain the principles of the invention.
Fig. 1 is a block diagram of a hardware configuration of an evaluation device for database migration according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method for evaluating database migration according to an embodiment of the present invention;
FIG. 3 is a flow chart of another method for evaluating database migration according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of an evaluation apparatus for database migration according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of another evaluation device for database migration according to an embodiment of the present invention.
Detailed Description
Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
< hardware configuration >
Fig. 1 is a block diagram of a hardware configuration of an evaluation device for database migration according to an embodiment of the present invention.
The evaluation device 1000 for database migration may be a virtual machine or a physical machine. The evaluation device 1000 for database migration may include a processor 1100, a memory 1200, an interface device 1300, a communication device 1400, a display device 1500, an input device 1600, a speaker 1700, a microphone 1800, and the like. The processor 1100 may be a central processing unit CPU, a microprocessor MCU, or the like. The memory 1200 includes, for example, a ROM (read only memory), a RAM (random access memory), a nonvolatile memory such as a hard disk, and the like. The interface device 1300 includes, for example, a USB interface, a headphone interface, and the like. Communication device 1400 is capable of wired or wireless communication, for example. The display device 1500 is, for example, a liquid crystal display panel, a touch panel, or the like. The input device 1600 may include, for example, a touch screen, a keyboard, and the like. A user can input/output voice information through the speaker 1700 and the microphone 1800.
As applied to this embodiment, the memory 1200 is used to store computer program instructions for controlling the processor 1100 to operate to perform an evaluation method according to any embodiment of the present invention. The skilled person can design the instructions according to the disclosed solution. How the instructions control the operation of the processor 1100 is well known in the art and will not be described in detail herein.
Although a plurality of devices are shown in fig. 1 for the evaluation apparatus 1000 for database migration, the present invention may only relate to some of the devices, for example, the evaluation apparatus 1000 for database migration only relates to the memory 1200 and the processor 1100.
In the above description, the skilled person will be able to design instructions in accordance with the disclosed solution. How the instructions control the operation of the processor is well known in the art and will not be described in detail herein.
In practical applications, due to different types of databases, formats and storage manners of stored data may be different, and stored program information may also be different in a calling manner and a presentation manner. In the process of migrating data and program information from an original database to a new database, the data and program information are lost or unavailable, so that the service cannot be normally provided for a business system, and therefore, the database migration needs to be evaluated before the database migration. Further, the fundamental reason why the service system cannot be normally provided with services due to the loss or unavailability of data and program information is that the program information in the original database cannot be successfully called and executed by the new database, i.e., cannot be compatible with the new database. In order to improve the efficiency of database migration and the efficient utilization of database migration, the invention provides an evaluation method of database migration, which can perform migration evaluation before database migration, and ensure the compatibility of a migration database.
< method examples >
An embodiment of the present invention provides an evaluation method for database migration, as shown in fig. 2, including the following steps:
s201: first program information is obtained in a first database.
The program information may be, for example, a program for implementing data processing in a database, for example, a function "drop database dbmame" for deleting a database in an Oracle database is a program information.
In order to better distinguish the original data and the new database described in the embodiment of the present invention, the embodiment of the present invention defines the original database as the first database and the program information in the first database as the first program information.
In the embodiment of the invention, the first database can be accessed or logged in through the database connection interface, and the first program information in the first database corresponding to the user is extracted through the extraction statement provided by the first database, namely the first program information is obtained. The access or login of the first database can be safely accessed in a user name and password mode, so that the data/program information of the user corresponding to the user name in the first database can be accessed.
S202: and determining whether the first program information is compatible with a second database according to a pre-established program resolver.
If the first program information is incompatible with the second database, the data and the program information may be lost or unavailable, so that the migrated database cannot provide data services to the outside.
In an embodiment of the present invention, a program parser may be pre-established, and the program parser may be configured to compare the first program information with the second database for compatibility, for example, to compare whether syntax rules of the first program information are consistent with the second database, and/or to compare whether a calling manner or a calling interface of the first program information are consistent with or compatible with the second database, and/or to compare whether a function naming rule of the first program information is consistent with or compatible with the second database, and/or to compare whether a program language of the first program information is a supported program language of the second database, and so on. Thereby determining whether the first program information is compatible with a second database.
It should be noted that, in order to better distinguish the original data from the new database, the embodiment of the present invention defines the new database as the second database.
S203: and under the condition that the first program information is not compatible with the second database, converting the first program information to obtain a conversion result.
Therefore, in the embodiment of the present invention, the first program information is converted to obtain a conversion result, so as to further determine whether the conversion result satisfies the compatibility rule of the second database.
It should be noted that the compatibility rules describe in detail syntax structure, syntax logic, function, call interface, call method, field naming or definition, data storage format, etc. of each program information in the database, that is, the compatibility rules specify what program information can be compatible with the second database, and the expression manner of the program information in the second database.
Further, the first program information may be converted according to the compatibility rule of the second database. For example, the first database is version 2.0 of the database a, the default coding sorting mode is unicode _000_ ci when installing WordPress, and if the second database is version 3.0 of the data block a and does not support unicode _000_ ci, the second database cannot be compatible during migration, so that WordPress installed in the first database cannot be imported into the second database. Furthermore, in order to be compatible with the second database, after the installation data corresponding to the WordPress is determined, the coding sorting mode of the installation data is converted into the coding sorting mode supported by the second database, so that the conversion of the first program information is realized. For another example, if the data storage manner of the first database is incompatible with the data storage manner of the second database, the data storage manner of the migration data of the first database is converted into the data storage manner of the second database, so that the data storage manner of the second database is compatible. The above are two implementation manners exemplified for better understanding of the conversion of step S203, and do not limit the implementation manner of step S203, and the conversion process is not exemplified here for the sake of brevity.
S204: and outputting a database migration evaluation report according to the conversion result.
In practical applications, in order to enable a user to know in detail how first program information in a first database is compatible with a second database, a database migration evaluation report may be output, where the database migration evaluation report describes in detail how the first program information is compatible with the second database, for example, names and numbers of first program information that can be directly compatible with the second database, names and numbers of converted first program information, and which first program information cannot be converted, and further needs to be converted manually, and so on.
By the method, whether the first program information is compatible with a second database or not is determined through a pre-established program analyzer aiming at the first program information to be migrated, the first program information is converted to meet the compatibility rule of the second database under the condition that the first program information is incompatible with the second database, and a database migration evaluation report is output according to the conversion result, so that the data migration of the database can be effectively evaluated, and a user can be helped to rapidly finish the data migration of the heterogeneous database.
In one embodiment, since some program information used for implementing the same function has substantial differences in syntax structure or program structure between different databases, e.g., functions within the program information are completely different, and the program information having substantial differences is incompatible with another database, in the embodiment of the present invention, determining whether the first program information is compatible with the second database depends mainly on whether second program information corresponding to the first program information exists in the second database, i.e., whether the second program information has substantial differences in syntax structure or program structure from the first program information, and if the second program information corresponding to the first program information exists, it indicates that the first program information is compatible with the second database, and if the second program information corresponding to the first program information does not exist, it is indicated that the second program information is not compatible with the second database.
To this end, an embodiment of the present invention provides an implementation manner for determining whether the first program information is compatible with the second database according to a pre-established program parser, and the implementation manner is as follows:
determining whether the grammar of the program statement in the first program information is matched with the program grammar rule according to the program grammar rule of the second database; determining that the first program information is compatible with the second database in the case that the syntax of the program statement in the first program information matches the program syntax rule; and in the case that the syntax of the program statement in the first program information does not match the program syntax rule, determining that the first program information is not compatible with a second database.
It should be noted that, the program syntax rule of the second database used in the embodiment of the present invention is pre-configured in the program parser, and the program syntax rule describes in detail the syntax structure, syntax logic, function, call interface, call mode, and the Like of the program information in the second database, for example, the program syntax rule of the Like statement function in the Access database is Like '101', and the program syntax rule of the Like statement function in the Oracle database is Like '101', it is obvious that the program syntax rules of the Like statement functions in different databases are not matched, and the Like syntax rules cannot be compatible when the Like statement function in the Access database is directly migrated to the Oracle database.
In the above embodiment, it can be determined by the respective program syntax rules of the first database and the second database which second program information corresponding to each first program information in the first database is in the second database, and which first program information can be compatible with the second database and which first program cannot be compatible with the second database can be effectively and accurately analyzed.
In an embodiment, although some of the first program information is not matched with the corresponding second program information in the second database, that is, is not compatible with the second database, the first program information that is not compatible with the second database may be converted into program information that is compatible with the second database by using a preset conversion rule provided in an embodiment of the present invention, that is, the converted program information corresponds to the first program information, which is as follows:
converting the first program information which is not compatible with a second database into second program information which is compatible with the second database according to a preset conversion rule, wherein the preset conversion rule is matched with the compatible rule of the second database; determining whether the total times of conversion by using the preset conversion rule reaches a preset time threshold value; under the condition that the total times do not reach a preset time threshold value, judging whether the second program information is compatible with the second database through the program analyzer; and outputting a manual conversion suggestion for guiding an operator to convert under the condition that the total times exceed a preset times threshold value.
It should be noted that the preset conversion rule used in the embodiment of the present invention includes a correspondence rule between first program information and preset program information, where the preset program information refers to program information that satisfies a second database compatibility rule, and is preset according to the second database compatibility rule, for example, if it is assumed that a function of a Like statement in an Access database is converted into a function of a Like statement in an Oracle database, the first program information in the preset conversion rule refers to a function of a Like statement in the Access database, the preset program information refers to a function of a Like statement in an Oracle database, and the function of a Like statement in the Access database Like 101 is converted into a function of a Like statement in an Oracle database Like 101' by the preset conversion rule.
Since there may be a case that the second program information converted from the first program information by the preset conversion rule is still incompatible with the second database, and the program information still incompatible with the second database after conversion cannot be regarded as data for evaluating database migration, after the first program information is converted, it is necessary to determine whether the converted second program information is compatible with the second database by using the program parser.
And under the condition that the second program information is still incompatible with the second database, converting the second program information according to a preset conversion rule, and further judging whether the second program information is compatible with the second database through the program analyzer until the converted second program information is compatible with the second database.
However, in practical applications, there may be a case where the first program information is always still incompatible with the second database by how many times the first program information is converted through a preset conversion rule, and for such a case, in order to improve accuracy and efficiency of converting the program information, in an embodiment of the present invention, a time threshold is preset, where the time threshold indicates a maximum conversion time, and as long as a total number of conversions does not reach the preset time threshold, the first program information may be continuously converted, that is, in a case where the second program information is still incompatible with the second database, the second program information may be converted according to the preset conversion rule, and the program parser determines whether the second program information is compatible with the second database until the total number reaches the preset time threshold.
Further, there may be a case where the second database is incompatible even if the number of times of conversion reaches the threshold value during the conversion of the first program information by the preset conversion rule, and for this case, in a case where the total number of times exceeds the preset number threshold value, a manual conversion suggestion is output for guiding an operator to perform the conversion.
According to the embodiment, the first program information incompatible with the second database can be effectively and accurately converted into the second program information compatible with the second database, and the efficiency and the accuracy of program information conversion are improved.
In one embodiment, in order to improve the accuracy and comprehensiveness of the evaluation of the database migration, the converted second program information may be regarded as data for evaluating the database migration, and therefore, in the case that the second program information is compatible with the second database, the embodiment of the present invention outputs a first database migration evaluation report according to the first program and the second program information.
It should be noted that the first database migration evaluation report describes which first program information is directly compatible with the second database, which first program information is compatible with the second database through conversion, and which first program information is incompatible with the second database through conversion.
According to the embodiment, the output first database migration evaluation report can express the compatibility condition of the first program information compatible with the second database in a multi-dimensional manner, so that the accuracy and comprehensiveness of the database migration evaluation are improved, and a user is helped to quickly finish the data migration of the heterogeneous database.
In one embodiment, similarly, in order to improve the accuracy and comprehensiveness of the database migration evaluation, in the case that the total number exceeds the preset number threshold, the embodiment of the present invention outputs a second database migration evaluation report according to the first program information and the manual conversion suggestion.
It should be noted that the manual transformation suggestion is used to provide reference information for manual transformation, and a human can transform the program information obtained by the last transformation through the manual transformation suggestion, so that the program information after manual transformation can be compatible with the second database.
It should be further noted that the output second database migration evaluation report describes which first program information is directly compatible with the second database, which first program information cannot be converted into a manual conversion suggestion for the first program information that cannot be converted, which is compatible with the second database, through a preset conversion rule.
In the embodiment of the present invention, the database migration may be evaluated according to the output first database migration evaluation report and the output second database migration evaluation report, and after the user finishes viewing the database migration report, the user may execute the migration of the first program information, and then migrate the data in the first database.
According to the embodiment, the output second database migration evaluation report can express the compatibility condition of the first program information compatible with the second database in a multi-dimensional manner, so that the accuracy and comprehensiveness of the database migration evaluation are improved, and a user is helped to quickly finish the data migration of the heterogeneous database.
In an embodiment, the embodiment of the present invention specifically provides three specific programs corresponding to all service terminals of the target user, that is, stored process information, function information, and trigger information, included in the first program information, and may obtain the stored process information, function information, and/or trigger information corresponding to all service terminals of the target user through a data extraction statement.
In the foregoing embodiment, the first program information in the embodiment of the present invention may include three specific programs, for example, stored procedure information, function information, and trigger information.
In one embodiment, the program information is composed of a structured query language.
The above embodiments, the embodiments of the present invention clearly show the configuration of the first program information.
In one embodiment, in order to show the embodiment of the present invention in more detail, the embodiment of the present invention is described in detail below with reference to fig. 3.
S301: first program information is obtained in a first database.
S302: and judging whether the first program information is compatible with a second database or not according to a pre-established program analyzer, if so, executing step S306, and if not, executing step S303.
S303: and converting the first program information which is not compatible with the second database into second program information which is compatible with the second database according to a preset conversion rule.
It should be noted that the preset conversion rule matches with the compatible rule of the second database.
S304: and judging whether the total conversion times by using the preset conversion rule reaches a preset time threshold value, if so, executing the step S305, and if not, executing the step S302 again.
S305: manual conversion recommendations are output for guiding the operator to make the conversion.
S306: and outputting a first database migration evaluation report according to the first program information and the second program information.
S307: and outputting a second database migration evaluation report according to the first program information and the manual conversion suggestion.
S308: and outputting a total database migration evaluation report according to the first database migration evaluation report and the second database migration evaluation report.
By the method, the data migration of the database can be effectively evaluated, and a user can be helped to quickly finish the data migration of the heterogeneous database. And through a pre-established program analyzer, a preset conversion rule and the like, program information of a database to be migrated (such as a first database) can be automatically analyzed and evaluated, so that the migration evaluation efficiency of the database is improved, and the migration efficiency of the database is further improved based on a database migration evaluation report.
< apparatus embodiment >
As shown in fig. 4, the present embodiment further provides an evaluation apparatus for database migration, including:
an obtaining module 401, configured to obtain first program information in a first database;
a determining module 402, configured to determine whether the first program information is compatible with a second database according to a pre-established program parser;
a conversion module 403, configured to, in a case that the first program information is incompatible with the second database, convert the first program information to obtain a conversion result;
and an output module 404, configured to output a database migration evaluation report according to the conversion result.
The program parser comprises: program syntax rules of the second database;
the determining module 402 is specifically configured to determine, according to a program syntax rule of the second database, whether syntax of a program statement in the first program information matches the program syntax rule; determining that the first program information is compatible with the second database in the case that the syntax of the program statement in the first program information matches the program syntax rule; and in the case that the syntax of the program statement in the first program information does not match the program syntax rule, determining that the first program information is not compatible with a second database.
The conversion module 403 is specifically configured to convert the first program information incompatible with the second database into second program information compatible with the second database according to a preset conversion rule, where the preset conversion rule is matched with a compatible rule of the second database;
the device further comprises:
a determining module 405, configured to determine whether a total number of times of conversion performed using the preset conversion rule reaches a preset number threshold; under the condition that the total times do not reach a preset time threshold value, judging whether the second program information is compatible with the second database through the program analyzer; and outputting a manual conversion suggestion for guiding an operator to convert under the condition that the total times exceed a preset times threshold value.
The output module 404 is specifically configured to, if the second program information is compatible with the second database, output a first database migration evaluation report according to the first program and the second program information.
When the determining module 405 determines that the second program information is still incompatible with the second database, the converting module 403 converts the second program information according to a preset conversion rule; and judging whether the second program information is compatible with the second database through the program analyzer until the total times reach a preset time threshold.
The output module 404 is specifically configured to, when the total number of times exceeds the preset number of times threshold, output a second database migration evaluation report according to the first program information and the manual conversion suggestion.
The obtaining module 401 is specifically configured to obtain, through the data extraction statement, stored process information, function information, and/or trigger information corresponding to all servers of the target user.
< apparatus embodiment >
As shown in fig. 5, the evaluation apparatus for database migration includes the evaluation device for database migration in the above device embodiment.
Alternatively, the evaluation device for database migration includes a memory 501 and a processor 502. Wherein the memory is configured to store executable instructions for controlling the processor to perform the method according to any of the above method embodiments.
< computer storage Medium >
The invention also provides a computer storage medium storing computer instructions which, when executed by a processor, implement a method as in any one of the above method embodiments.
The present invention may be a system, method and/or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied therewith for causing a processor to implement various aspects of the present invention.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations of the present invention may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, aspects of the present invention are implemented by personalizing an electronic circuit, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA), with state information of computer-readable program instructions, which can execute the computer-readable program instructions.
Aspects of the present invention are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, by software, and by a combination of software and hardware are equivalent.
Having described embodiments of the present invention, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terms used herein were chosen in order to best explain the principles of the embodiments, the practical application, or technical improvements to the techniques in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the invention is defined by the appended claims.

Claims (10)

1. An evaluation method for database migration, comprising:
acquiring first program information in a first database;
determining whether the first program information is compatible with a second database according to a pre-established program resolver;
under the condition that the first program information is incompatible with the second database, converting the first program information to obtain a conversion result;
and outputting a database migration evaluation report according to the conversion result.
2. The method of claim 1, wherein the program parser comprises: program syntax rules of the second database;
determining whether the first program information is compatible with a second database according to a pre-established program parser, comprising:
determining whether the grammar of the program statement in the first program information is matched with the program grammar rule according to the program grammar rule of the second database;
determining that the first program information is compatible with the second database in the case that the syntax of the program statement in the first program information matches the program syntax rule;
and in the case that the syntax of the program statement in the first program information does not match the program syntax rule, determining that the first program information is not compatible with a second database.
3. The method of claim 1, wherein converting the first program information when the first program information is incompatible with the second database comprises:
converting the first program information which is not compatible with a second database into second program information which is compatible with the second database according to a preset conversion rule, wherein the preset conversion rule is matched with the compatible rule of the second database;
the method further comprises the following steps:
determining whether the total times of conversion by using the preset conversion rule reaches a preset time threshold value;
under the condition that the total times do not reach a preset time threshold value, judging whether the second program information is compatible with the second database through the program analyzer;
and outputting a manual conversion suggestion for guiding an operator to convert under the condition that the total times exceed a preset times threshold value.
4. The method of claim 3, wherein outputting a database migration evaluation report based on the conversion result comprises:
and under the condition that the second program information is compatible with the second database, outputting a first database migration evaluation report according to the first program and the second program information.
5. The method of claim 3, further comprising:
under the condition that the second program information is still incompatible with the second database, converting the second program information according to a preset conversion rule;
and judging whether the second program information is compatible with the second database through the program analyzer until the total times reach a preset time threshold.
6. The method of claim 3, wherein outputting a database migration evaluation report based on the conversion result comprises:
and outputting a second database migration evaluation report according to the first program information and the manual conversion suggestion under the condition that the total times exceed the preset times threshold.
7. The method of any of claims 1-6, wherein said obtaining first program information in a first database comprises:
and acquiring the stored process information, function information and/or trigger information corresponding to all the service terminals of the target user through the data extraction statement.
8. An apparatus for evaluating database migration, comprising:
the acquisition module is used for acquiring first program information in a first database;
the determining module is used for determining whether the first program information is compatible with a second database according to a pre-established program resolver;
the conversion module is used for converting the first program information under the condition that the first program information is incompatible with the second database to obtain a conversion result;
and the output module is used for outputting a database migration evaluation report according to the conversion result.
9. An evaluation device for database migration, comprising: a processor and a memory;
the memory is to store executable instructions to control the processor to perform the method of any one of claims 1-7.
10. A computer storage medium, characterized in that the storage medium stores computer instructions which, when executed by a processor, implement the method according to any one of claims 1-7.
CN202010420491.0A 2020-05-18 2020-05-18 Method, device and equipment for evaluating database migration and computer storage medium Pending CN111708753A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010420491.0A CN111708753A (en) 2020-05-18 2020-05-18 Method, device and equipment for evaluating database migration and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010420491.0A CN111708753A (en) 2020-05-18 2020-05-18 Method, device and equipment for evaluating database migration and computer storage medium

Publications (1)

Publication Number Publication Date
CN111708753A true CN111708753A (en) 2020-09-25

Family

ID=72537984

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010420491.0A Pending CN111708753A (en) 2020-05-18 2020-05-18 Method, device and equipment for evaluating database migration and computer storage medium

Country Status (1)

Country Link
CN (1) CN111708753A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112800034A (en) * 2021-03-23 2021-05-14 杭州沃趣科技股份有限公司 Database replacement method, device, medium and equipment based on grammar compatible conversion
CN113448944A (en) * 2021-06-30 2021-09-28 未鲲(上海)科技服务有限公司 Data evaluation method and device for database, computer equipment and storage medium
CN115408370A (en) * 2022-10-26 2022-11-29 本原数据(北京)信息技术有限公司 Database migration evaluation method and system, computer device and storage medium
CN116107993A (en) * 2022-12-26 2023-05-12 北京万里开源软件有限公司 Data migration evaluation method and system in MySQL protocol database

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102147747A (en) * 2010-02-09 2011-08-10 埃森哲环球服务有限公司 Enhanced upgrade path
CN102508929A (en) * 2011-12-01 2012-06-20 浪潮(北京)电子信息产业有限公司 System, device and method for realizing data migration of heterogeneous database
US20150082290A1 (en) * 2012-04-18 2015-03-19 Gizmox Transposition Ltd. Code migration systems and methods
CN106339384A (en) * 2015-07-07 2017-01-18 小米科技有限责任公司 Conversion method and device for storage procedures
CN106446166A (en) * 2016-09-23 2017-02-22 郑州云海信息技术有限公司 Method and device for migrating data from DB2 database to K-DB database
CN106934045A (en) * 2017-03-16 2017-07-07 郑州云海信息技术有限公司 A kind of system and method for database migration assessment
CN107122355A (en) * 2016-02-24 2017-09-01 阿里巴巴集团控股有限公司 Data mover system and method
CN107122361A (en) * 2016-02-24 2017-09-01 阿里巴巴集团控股有限公司 Data mover system and method
CN108629035A (en) * 2018-05-10 2018-10-09 福建星瑞格软件有限公司 A kind of heterogeneous database application moving method based on JDBC agencies
CN109376142A (en) * 2018-09-03 2019-02-22 中国平安人寿保险股份有限公司 Data migration method and terminal device
CN110494849A (en) * 2017-03-31 2019-11-22 甲骨文国际公司 For determining the successful system and method for cross-platform migration
US20200012582A1 (en) * 2018-07-05 2020-01-09 Accenture Global Solutions Limited Code assessment platform
CN110704398A (en) * 2019-09-30 2020-01-17 深圳前海环融联易信息科技服务有限公司 Database migration method and device from MySQL to Oracle and computer equipment
CN111061757A (en) * 2019-12-19 2020-04-24 用友网络科技股份有限公司 Database language conversion method and device, electronic equipment and storage medium
CN111143330A (en) * 2019-12-27 2020-05-12 湖南亚信软件有限公司 Method and device for realizing multi-mode database analysis engine

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102147747A (en) * 2010-02-09 2011-08-10 埃森哲环球服务有限公司 Enhanced upgrade path
CN102508929A (en) * 2011-12-01 2012-06-20 浪潮(北京)电子信息产业有限公司 System, device and method for realizing data migration of heterogeneous database
US20150082290A1 (en) * 2012-04-18 2015-03-19 Gizmox Transposition Ltd. Code migration systems and methods
CN106339384A (en) * 2015-07-07 2017-01-18 小米科技有限责任公司 Conversion method and device for storage procedures
CN107122355A (en) * 2016-02-24 2017-09-01 阿里巴巴集团控股有限公司 Data mover system and method
CN107122361A (en) * 2016-02-24 2017-09-01 阿里巴巴集团控股有限公司 Data mover system and method
CN106446166A (en) * 2016-09-23 2017-02-22 郑州云海信息技术有限公司 Method and device for migrating data from DB2 database to K-DB database
CN106934045A (en) * 2017-03-16 2017-07-07 郑州云海信息技术有限公司 A kind of system and method for database migration assessment
CN110494849A (en) * 2017-03-31 2019-11-22 甲骨文国际公司 For determining the successful system and method for cross-platform migration
CN108629035A (en) * 2018-05-10 2018-10-09 福建星瑞格软件有限公司 A kind of heterogeneous database application moving method based on JDBC agencies
US20200012582A1 (en) * 2018-07-05 2020-01-09 Accenture Global Solutions Limited Code assessment platform
CN109376142A (en) * 2018-09-03 2019-02-22 中国平安人寿保险股份有限公司 Data migration method and terminal device
CN110704398A (en) * 2019-09-30 2020-01-17 深圳前海环融联易信息科技服务有限公司 Database migration method and device from MySQL to Oracle and computer equipment
CN111061757A (en) * 2019-12-19 2020-04-24 用友网络科技股份有限公司 Database language conversion method and device, electronic equipment and storage medium
CN111143330A (en) * 2019-12-27 2020-05-12 湖南亚信软件有限公司 Method and device for realizing multi-mode database analysis engine

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112800034A (en) * 2021-03-23 2021-05-14 杭州沃趣科技股份有限公司 Database replacement method, device, medium and equipment based on grammar compatible conversion
CN113448944A (en) * 2021-06-30 2021-09-28 未鲲(上海)科技服务有限公司 Data evaluation method and device for database, computer equipment and storage medium
CN113448944B (en) * 2021-06-30 2022-03-18 未鲲(上海)科技服务有限公司 Data evaluation method and device for database, computer equipment and storage medium
CN115408370A (en) * 2022-10-26 2022-11-29 本原数据(北京)信息技术有限公司 Database migration evaluation method and system, computer device and storage medium
CN115408370B (en) * 2022-10-26 2023-03-14 本原数据(北京)信息技术有限公司 Database migration evaluation method and system, computer device and storage medium
CN116107993A (en) * 2022-12-26 2023-05-12 北京万里开源软件有限公司 Data migration evaluation method and system in MySQL protocol database
CN116107993B (en) * 2022-12-26 2023-08-29 北京万里开源软件有限公司 Data migration evaluation method and system in MySQL protocol database

Similar Documents

Publication Publication Date Title
CN111708753A (en) Method, device and equipment for evaluating database migration and computer storage medium
US20150371159A1 (en) Generating Business Rule Model
US11934287B2 (en) Method, electronic device and computer program product for processing data
CN113139390A (en) Language conversion method and device applied to code character strings
CN108959294B (en) Method and device for accessing search engine
US10599689B2 (en) Identifying parameter values in log entries
US10705824B2 (en) Intention-based command optimization
CN113055410A (en) Cloud resource management method, device, equipment and system and readable storage medium
CN110580156A (en) Page processing method and device and electronic equipment
US11966562B2 (en) Generating natural languages interface from graphic user interfaces
CN111151008B (en) Verification method and device for game operation data, configuration background and medium
CN114090514A (en) Log retrieval method and device for distributed system
CN114021133A (en) Code processing method and device, electronic equipment and storage medium
CN113779018A (en) Data processing method and device
CN110765097A (en) Data processing method and device, computer storage medium and electronic equipment
CN113900895B (en) Information processing method, information processing apparatus, storage medium, and electronic device
CN117235052B (en) Database statement processing method and device
CN116560665B (en) Method and device for generating and processing data and credit card marketing rule engine system
CN111782183B (en) Method and device for judging component dependency, electronic device and medium
CN114116683B (en) Multi-language processing method and device for computing platform and readable storage medium
WO2024102121A1 (en) System and method for auto filling form fields based on natural language processing
CN116166532A (en) Isolation method, device, equipment and storage medium of business data
CN117573130A (en) Code processing method, device, electronic equipment and storage medium
CN116126502A (en) Expression processing method and device, computer storage medium and electronic equipment
CN117439748A (en) Network attack detection method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination