Database switching management method and device, computer device, and storage medium

By creating a second user object and a private synonym during the database switchover process, the problem of missing business logic modifications during the switchover between old and new databases is solved, achieving efficient and precise management of database switchover and ensuring the normal operation of the application.

CN115712610BActive Publication Date: 2026-07-17PING AN BANK CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
PING AN BANK CO LTD
Filing Date
2022-10-11
Publication Date
2026-07-17

AI Technical Summary

Technical Problem

During the switchover between old and new databases, existing technologies often require significant effort from staff to modify business logic, which is prone to oversights. This can lead to errors in data reading and writing after the switchover, and the inability to promptly detect any omissions in the modifications.

Method used

Create a second user object in the original database and create a private synonym. Use the private synonym to point to the source data of the first user object, control the application's access to the source data, and close the data management permissions of the first user object when receiving the business logic switchover completion information after the source data is synchronized to the target database. If an application sends an "unauthorized read" message, restore permissions and send a failure message.

Benefits of technology

It effectively exposes incomplete business logic modifications, avoids situations where applications cannot function properly, improves the efficiency and accuracy of database switching, and ensures proper verification and management of the database switching process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115712610B_ABST
    Figure CN115712610B_ABST
Patent Text Reader

Abstract

The application discloses a database switching management method and device, computer equipment and a storage medium, and relates to the field of data storage. The method comprises the following steps: creating a second user object in an original database, and creating a private synonym under the second user object, so that the private synonym points to source data corresponding to a first user object; controlling an application to access the source data according to the private synonym; when the source data is synchronized to a target database and business logic switching completion information is received, closing data management permission of the first user object; and if no right to read information is received, restoring the data management permission of the first user object, and sending database switching failure information to a terminal of a staff. Based on the method, during the database switching process, an application that has not completed business logic modification is exposed due to the closed data management permission, so that the situation that the business logic modification error can be known only in the later stage is avoided, and the database switching process can be reasonably verified and managed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data storage, and more particularly to a database switching management method, apparatus, computer equipment, and storage medium. Background Technology

[0002] In the fintech sector, in order to meet market demands and improve data controllability, more and more banks are choosing to migrate data stored in older databases to newer databases to complete the switch between the old and new databases.

[0003] Before switching between the old and new databases, the business logic of other applications that are currently using the old database needs to be modified to avoid situations where applications read and write data to both the new and old databases simultaneously after the switch, which could lead to data read / write errors.

[0004] However, modifying business logic is very time-consuming for staff, making it easy to overlook things. Furthermore, before the old database is decommissioned, even if the application's business logic is not fully modified, the application can still execute business logic by accessing the old database when it cannot access the new database, which will lead to application read and write errors after the switch. Summary of the Invention

[0005] In view of this, the present invention provides a database switching management method, apparatus, computer equipment and storage medium to improve the current situation where applications will have data reading and writing errors after database switching.

[0006] In a first aspect, embodiments of the present invention provide a database switching management method applied to a computer device, wherein the computer device is provided with an original database, a target database, and at least one application, and the original database is provided with a first user object, the method comprising:

[0007] Create a second user object in the original database;

[0008] Create a private synonym under the second user object, and make the private synonym point to the source data corresponding to the first user object;

[0009] Control each application to access the source data based on the private synonym;

[0010] When the source data is synchronized to the target database and the business logic switching completion information corresponding to the at least one application is received, the data management permission of the first user object is closed. The business logic switching information is generated by the staff's terminal and indicates that the at least one application has been adjusted to complete the business logic through the target database.

[0011] If the application receives a message indicating that it is not authorized to read data, the data management permissions of the first user object are restored, and a database switching failure message is sent to the staff's terminal.

[0012] Optionally, in one feasible embodiment of the present invention, the method further includes:

[0013] If no unauthorized read information is received from the application, a database switch success message is sent to the staff member's terminal.

[0014] Optionally, in one feasible embodiment of the present invention, the method further includes:

[0015] Identify the target application corresponding to the information that the user is not authorized to read;

[0016] Generate a business logic verification prompt message corresponding to the target application, and send the business logic verification prompt message to the staff member's terminal.

[0017] Optionally, in one feasible embodiment of the present invention, the method further includes:

[0018] In response to the adjustment completion message of the target application sent by the staff through the terminal, the data management permissions of the first user object are closed.

[0019] Optionally, in one feasible embodiment of the present invention, the data management permissions include one or more combinations of data addition, data deletion, data rewriting, and data query.

[0020] Optionally, in one feasible embodiment of the present invention, the original database is an Oracle database.

[0021] Secondly, embodiments of the present invention provide a database switching management device applied to a computer device, wherein the computer device is provided with an original database, a target database, and other applications, and the original database is provided with a first user object; the device includes:

[0022] An object creation module is used to create a second user object in the original database;

[0023] The synonym creation module is used to create private synonyms under the second user object and make the private synonyms point to the source data corresponding to the first user object;

[0024] The control module is used to control each application to access the source data based on the private synonym;

[0025] The shutdown module is used to close the data management permissions of the first user object when the source data is synchronized to the target database and the business logic switching completion information corresponding to the at least one application is received. The business logic switching information is generated by the staff's terminal and indicates that the at least one application has been adjusted to complete the business logic through the target database.

[0026] The first sending module is used to restore the data management permissions of the first user object and send a database switching failure message to the staff's terminal if it receives an unauthorized read information sent by the application.

[0027] Optionally, in one feasible embodiment of the present invention, the method further includes:

[0028] The second sending module is used to send a database switching success message to the staff's terminal if it does not receive the unauthorized read information sent by the application.

[0029] Thirdly, embodiments of the present invention provide a computer device, including a memory and a processor, wherein the memory stores a computer program, and the computer program, when run on the processor, executes a database switching management method as disclosed in any of the first aspects.

[0030] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program, which, when run on a processor, executes a database switching management method as disclosed in any of the first aspects.

[0031] In the database switching management method provided in this embodiment of the invention, the computer device first creates a second user object in the original database and creates a private synonym under the second user object. At the same time, the private synonym points to the source data corresponding to the first user object. Then, the application in the computer device can access the source data through the newly created second user object or through the previously created first user object. Next, the way each application accesses the source data is adjusted so that each application accesses the source data according to the private synonym / second user object. Then, the source data in the original database is synchronized to the target database. When the business logic switching information of the application triggered by the staff is received, the data management permission of the first user object is closed. If an application sends a message that it does not have permission to read, it indicates that the staff has failed to make the business logic of all applications fully dependent on the target database. Therefore, the data management permission of the first user object is restored so that each application can run normally at the current moment. At the same time, a database switching failure message is sent to the staff's terminal.

[0032] Based on this, the embodiments of the present invention enable applications that have not correctly / completely completed business logic modifications to be exposed during the database switching process due to the closure of the data management permissions of the first user object. This allows omissions in the business logic modification work by the staff to be revealed, avoiding the situation where the original database needs to be shut down later, causing the application to malfunction and only then will the error in the business logic modification be discovered. As a result, the database switching process can be reasonably verified and managed, improving the efficiency and accuracy of database switching. Attached Figure Description

[0033] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope of protection of the present invention. In the various drawings, similar components are numbered similarly.

[0034] Figure 1 A flowchart illustrating the first database switching management method provided in an embodiment of the present invention is shown;

[0035] Figure 2 A flowchart illustrating a second database switching management method provided in an embodiment of the present invention is shown.

[0036] Figure 3 A flowchart illustrating the third database switching management method provided in an embodiment of the present invention is shown.

[0037] Figure 4 A schematic diagram of the database switching management device provided in an embodiment of the present invention is shown. Detailed Implementation

[0038] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.

[0039] The components of the embodiments of the invention described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0040] In the following, the terms “comprising,” “having,” and their cognates, which may be used in various embodiments of the invention, are intended only to indicate a particular feature, number, step, operation, element, component, or combination thereof, and should not be construed as excluding, firstly, the presence of one or more other features, numbers, steps, operations, elements, components, or combinations thereof, or adding the possibility of one or more features, numbers, steps, operations, elements, components, or combinations thereof.

[0041] Furthermore, the terms "first," "second," and "third" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.

[0042] Unless otherwise specified, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of the invention pertain. Terms (such as those defined in commonly used dictionaries) shall be interpreted as having the same meaning as in their contextual meaning in the relevant technical field and shall not be interpreted as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of the invention.

[0043] Example 1

[0044] Reference Figure 1 The diagram illustrates a flowchart of a first database switching management method provided by an embodiment of the present invention. The database switching management method provided by the embodiment of the present invention is applied to a computer device, wherein the computer device is provided with an original database, a target database and at least one application, and the original database is provided with a first user object.

[0045] It should be noted that before the database switch, that is, before migrating the source data from the original database to the target database, each application executes its business logic using the source data from the original database. After the database switch, that is, after migrating the source data from the original database to the target database, each application executes its business logic using the source data from the target database.

[0046] It is understood that, in the embodiments of the present invention, the original database represents database software / application / program that needs to be deleted / disabled, the target database represents database software / application / program that will be put into use, and at least one application represents an application / program / software that uses data in the database to complete business logic.

[0047] It is also understood that the first user object (user) in this embodiment of the invention is used to manage the source data in the original database. Therefore, before the database switch, the application in the computer device in this embodiment of the invention will access / read / write / manage the data in the original database through the first user object.

[0048] It is easy to understand that whenever any database is put into use, a user object must be created in the database so that other applications can access, read, write, and manage the data in the database through the user object.

[0049] Furthermore, given the current environment, most fintech companies heavily rely on Oracle databases, using them to manage all types of data. However, the higher the cost of using Oracle databases, the more data a fintech company needs to manage over its longer operation, leading to even greater data management costs. Therefore, in one feasible embodiment of this invention, the original database is an Oracle database.

[0050] Based on this, the database switching management provided in this embodiment of the invention includes:

[0051] S110, Create a second user object in the original database.

[0052] In other words, in this embodiment of the invention, a new user object, namely a second user object, will be created in the original database to control various applications to access the source data in the original database through the second user object in subsequent processes.

[0053] It is understood that the timing of the computer device creating the second user object in the embodiments of the present invention can be set according to the actual situation. For example, in one feasible way, the computer device will execute the creation operation of the second user object based on the preset code / command / script when it receives the database switch start information sent by the staff through the terminal.

[0054] In another feasible approach, the computer device will execute the creation operation of a second user object based on the user creation command input by the staff.

[0055] S120, create a private synonym under the second user object, and make the private synonym point to the source data corresponding to the first user object.

[0056] It is understandable that when a private synonym (SYNONYM) is created and points to the source data corresponding to the first user object, managing the source data based on the private synonym can be regarded as managing the source data based on the first user object.

[0057] It is conceivable that when a private synonym points to the source data corresponding to the first user object, the private synonym will be regarded as an alias of the first user object.

[0058] It is also understandable that if there are multiple first user objects in the original database, the private synonym will point to the source data corresponding to each first user object.

[0059] It is easy to understand that, since data in a database is usually stored in the form of tables, in this embodiment of the invention, the private synonym will point to the table where the source data is stored.

[0060] Furthermore, it's conceivable that SQL (Structured Query Language) statements built using private synonyms can include the user object's name and owner, thus enhancing the security of the SQL statements. Consequently, compared to statements without private synonyms, SQL statements built using private synonyms are shorter and more concise.

[0061] S130, control each application to access the source data according to the private synonym.

[0062] In other words, in this embodiment of the invention, after the private synonym points to the source data / data to be migrated, the application in the control computer device can access the source data through the private synonym to perform corresponding business operations. That is, the connection with the original database is maintained through the second user object.

[0063] S140, when the source data is synchronized to the target database and the business logic switching completion information corresponding to the at least one application is received, the data management permission of the first user object is closed. The business logic switching information is generated by the staff's terminal, and the business logic switching information indicates that the at least one application has been adjusted to complete the business logic through the target database.

[0064] In other words, after the source data in the original database is synchronized to the target database, and the staff believes that the business logic modifications for each application have been completed and that the business logic of each application can be implemented based on the data in the target database, the staff executes a preset operation to send a business logic switchover completion message from the personal terminal to the computer device. When the computer device receives the business logic switchover completion message, it will disable the data management permissions of the first user object.

[0065] It is also understandable that the information indicating the completion of the business logic switch can be generated by staff when performing preset operations on computer equipment.

[0066] It should be noted that when the computer device in this embodiment of the invention receives the business logic switching completion information, it indicates that the staff believes that the business logic modification of each application has been completed.

[0067] It should also be noted that if an application's business logic has not been modified, meaning that an application's business logic still fully or partially depends on the source data in the original database, then the application will continue to read and write the source data in the original database to implement its business logic until the source data in the original database is deleted or until the original database is deactivated. Once the source data is deactivated, the application will not function properly.

[0068] In another scenario, some business logic in the application depends on the original database, while other business logic depends on the target database. This can result in the target database not being properly modified or written after the business logic is executed, making it impossible to carry out subsequent operations.

[0069] In response to this situation, in this embodiment of the invention, when the staff believes that the business logic of each application has been modified and thus triggers the business logic switching completion information, and the source data in the original database has been synchronized to the target database, the data management permission of the first user object is closed.

[0070] Understandably, if an application is reading or writing source data in the original database through a private synonym at the current moment after the data management permission of the first user object corresponding to the private synonym is closed, the application will be unable to perform read or write operations through the source data in the original database.

[0071] It is also understandable that if there are no applications that need to read or write source data in the original database through private synonyms at the current moment, that is, all business logic of each application normally depends on the target database, then after the data management permissions of the first user object are closed, the application will correctly implement the business logic through the source data in the target database.

[0072] S150, if the application sends an "unauthorized read" message, the data management permissions of the first user object are restored, and a database switching failure message is sent to the staff's terminal.

[0073] It is understandable that if, after the data management permissions of the first user object are closed, at least one application sends / generates information that it does not have permission to read, it means that the staff has not actually completed the business logic modification for each application, and the business logic of some applications still depends on the original database.

[0074] Therefore, when the computer device receives information that the user does not have permission to read, it will restore the data management permissions of the first user object to ensure that the application can function normally at the current moment. Simultaneously, the computer device will also send a database switch failure message to the staff's terminal, prompting them to modify the business logic of each application again.

[0075] It is also understandable that if no application sends / generates information that it does not have permission to read, it indicates that the business logic of each application has been modified normally.

[0076] Optionally, in one feasible embodiment of the present invention, the computer will send a database switching success message to the worker's terminal when no application sends / generates unauthorized read information. That is, if the unauthorized read information sent by the application is not received, the computer will send a database switching success message to the worker's terminal.

[0077] In another feasible approach provided by this embodiment of the invention, the computer device will not perform any operation when no application sends / generates information that it is not authorized to read. In other words, the computer device only executes the corresponding message notification when the application reports an error. If the staff's terminal does not receive the message notification, it indicates that the database switch was successful.

[0078] In the database switching management method provided in this embodiment of the invention, the computer device first creates a second user object in the original database and creates a private synonym under the second user object. At the same time, the private synonym points to the source data corresponding to the first user object. Then, the application in the computer device can access the source data through the newly created second user object or through the previously created first user object. Next, the way each application accesses the source data is adjusted so that each application accesses the source data according to the private synonym / second user object. Then, the source data in the original database is synchronized to the target database. When the business logic switching information of the application triggered by the staff is received, the data management permission of the first user object is closed. If an application sends a message that it does not have permission to read, it indicates that the staff has failed to make the business logic of all applications fully dependent on the target database. Therefore, the data management permission of the first user object is restored so that each application can run normally at the current moment. At the same time, a database switching failure message is sent to the staff's terminal.

[0079] Based on this, the embodiments of the present invention enable applications that have not correctly / completely completed business logic modifications to be exposed during the database switching process due to the closure of the data management permissions of the first user object. This allows omissions in the business logic modification work by the staff to be revealed, avoiding the situation where the original database needs to be shut down later, causing the application to malfunction and only then will the error in the business logic modification be discovered. As a result, the database switching process can be reasonably verified and managed, improving the efficiency and accuracy of database switching.

[0080] Optionally, to enable staff to adjust business logic more efficiently, in one feasible approach provided in this embodiment of the invention, please refer to... Figure 2The diagram illustrates a second database switching management method provided by an embodiment of the present invention. In this feasible mode, the method further includes:

[0081] S160, determine the target application corresponding to the unauthorized information;

[0082] S170, generate business logic verification prompt information corresponding to the target application, and send the business logic verification prompt information to the staff member's terminal.

[0083] In other words, the computer device will also determine the generator / sender of the unauthorized information, i.e., the target application, based on the received unauthorized information.

[0084] It is understandable that the method of determining the target application based on the unauthorized access information is something that can be set according to the actual situation. For example, in one feasible method, the computer device determines the target application based on the application identifier because the unauthorized access information generated / sent by the target application carries an application identifier.

[0085] In another feasible approach, since each application in the computer device will send messages based on a port, and the computer device will monitor the information transmission status of each port in real time, the computer device can determine the target application that does not have the right to read the information based on the information transmission status of each port.

[0086] Furthermore, after identifying the target application, the computer device will generate a business logic verification prompt message corresponding to the target application and send the business logic verification prompt message to the staff's terminal so that the staff can identify the application for which the business logic adjustment has not been completed.

[0087] Therefore, this embodiment of the invention avoids the situation where users need to check the business logic of all applications one by one after receiving database switching failure information, thereby improving the work efficiency of staff.

[0088] Optionally, in one feasible embodiment of the present invention, please refer to the following: Figure 3 The diagram illustrates a third database switching management method provided by an embodiment of the present invention. In this feasible mode, the method further includes:

[0089] S180, in response to the adjustment completion information of the target application sent by the staff through the terminal, the data management permission of the first user object is closed.

[0090] In other words, when staff determine that the business logic of the target application has been correctly adjusted, they can send an adjustment completion message to the computer device so that the computer device knows that the staff has completed the adjustment of the business logic of the target application.

[0091] When the computer device receives the adjustment completion information, it will again disable the data management permissions of the first user object to determine whether there are still cases where applications send information that they do not have the right to read.

[0092] Understandably, if an application sends unauthorized reading information, the computer device will determine the target application and generate and send business logic verification prompt information based on the newly received unauthorized reading information. That is, the computer device will execute steps S160 and S170 again.

[0093] Optionally, in one feasible embodiment of the present invention, the data management permissions include one or more combinations of data addition, data deletion, data rewriting, and data query.

[0094] It is understandable that different business logics require different data management permissions. For example, query business only requires data query / access permissions, while registration business requires data addition and / or data modification permissions.

[0095] Therefore, in one feasible method provided by the embodiments of the present invention, data management permissions for adding, deleting, rewriting and querying data will be disabled according to the scenario targeted by the business logic, thereby completing the database switching verification for different business scenarios.

[0096] For example, in query-based business scenarios, when executing S140, the computer device only disables the permission to add data. Similarly, in registration-based business scenarios, the computer device disables both the permission to add and modify data.

[0097] Based on this, the embodiments of the present invention enable staff to perform corresponding verifications for different business scenarios when switching databases, and then process them accordingly based on the verification results of different business scenarios.

[0098] Example 2

[0099] Corresponding to the database switching management method provided in Embodiment 1 of the present invention, Embodiment 2 of the present invention also provides a database switching management device 200, referring to... Figure 4 This diagram illustrates the structure of a database switching management device provided in an embodiment of the present invention. The database switching management device 200 provided in this embodiment is applied to a computer device, which includes an original database, a target database, and at least one application. The original database contains a first user object. The device includes:

[0100] Object creation module 210 is used to create a second user object in the original database;

[0101] The synonym creation module 220 is used to create private synonyms under the second user object and make the private synonyms point to the source data corresponding to the first user object;

[0102] Control module 230 is used to control each application to access the source data according to the private synonym;

[0103] The closing module 240 is used to close the data management permissions of the first user object when the source data is synchronized to the target database and the business logic switching completion information corresponding to the at least one application is received. The business logic switching information is generated by the staff's terminal and indicates that the at least one application has been adjusted to complete the business logic through the target database.

[0104] The first sending module 250 is used to restore the data management permissions of the first user object and send database switching failure information to the staff's terminal if it receives the unauthorized reading information sent by the application.

[0105] Optionally, in one feasible embodiment of the present invention, the method further includes:

[0106] The second sending module is used to send a database switching success message to the staff's terminal if it does not receive the unauthorized read information sent by the application.

[0107] Optionally, in one feasible embodiment of the present invention, the method further includes:

[0108] The determination module is used to determine the target application corresponding to the unauthorized information;

[0109] The generation module is used to generate business logic verification prompt information corresponding to the target application and send the business logic verification prompt information to the staff member's terminal.

[0110] Optionally, in one feasible embodiment of the present invention, the method further includes:

[0111] The response module is used to respond to the adjustment completion information of the target application sent by the staff through the terminal, and to close the data management permissions of the first user object.

[0112] Optionally, in one feasible embodiment of the present invention, the data management permissions include one or more combinations of data addition, data deletion, data rewriting, and data query.

[0113] Optionally, in one feasible embodiment of the present invention, the original database is an Oracle database.

[0114] The database switching management device 200 provided in Embodiment 2 of this application can implement all processes of the database switching management method corresponding to Embodiment 1 and achieve the same technical effect. To avoid repetition, it will not be described again here.

[0115] This invention also provides a computer device, including a memory and a processor. The memory stores a computer program, and the computer program executes a database switching management method as described in Embodiment 1 when it runs on the processor.

[0116] This invention also provides a computer-readable storage medium storing a computer program, which executes a database switching management method as described in Embodiment 1 when run on a processor.

[0117] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that, as an alternative implementation, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0118] In addition, the functional modules or units in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0119] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a smartphone, personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0120] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.

Claims

1. A database switching management method, characterized in that, A method applicable to a computer device, wherein the computer device is configured with an original database, a target database, and at least one application, and the original database contains a first user object, wherein before a database switch, the application accesses / reads / writes / manages data in the original database through the first user object, the method comprising: When a database switch start message is received from a staff member via a terminal, a new second user object is created in the original database based on a preset script, so as to control each application to access the source data in the original database through the second user object; A private synonym is created under the second user object, and the private synonym is made to point to the source data corresponding to the first user object. When the private synonym points to the source data corresponding to the first user object, the private synonym will be regarded as an alias of the first user object. Managing the source data based on the private synonym is regarded as managing the source data based on the first user object. Control each application to access the source data based on the private synonym; When the source data is synchronized to the target database and the business logic switching completion information corresponding to the at least one application is received, the data management permission of the first user object is closed. The business logic switching information is generated by the staff's terminal and indicates that the at least one application has been adjusted to complete the business logic through the target database. If the application receives a message indicating that the user does not have permission to read, the user's data management privileges are restored, and a database switching failure message is sent to the staff member's terminal. Based on the application identifier carried in the unauthorized read information or based on the information sending status of each port, the target application corresponding to the unauthorized read information is determined, and the target application is the generator of the unauthorized read information. Generate business logic verification prompt information corresponding to the target application, and send the business logic verification prompt information to the staff member's terminal; In response to the adjustment completion message of the target application sent by the staff through the terminal, the data management permission of the first user object is closed to determine whether there is still a situation where the application sends information that it does not have permission to read.

2. The database switching management method according to claim 1, characterized in that, Also includes: If no unauthorized read information is received from the application, a database switch success message is sent to the staff member's terminal.

3. The database switching management method according to claim 1, characterized in that, The data management permissions include one or more combinations of data addition, data deletion, data modification, and data query.

4. The database switching management method according to claim 1, characterized in that, The original database is an Oracle database.

5. A database switching management device, characterized in that, An apparatus for use in a computer device, wherein the computer device includes a raw database, a target database, and at least one application, and wherein a first user object is configured in the raw database, the apparatus comprising: The object creation module is used to create a new second user object in the original database based on a preset script when it receives a database switch start information sent by the staff through the terminal, so as to control each application to access the source data in the original database through the second user object; The synonym creation module is used to create private synonyms under the second user object and make the private synonyms point to the source data corresponding to the first user object. When the private synonyms point to the source data corresponding to the first user object, the private synonyms will be regarded as aliases of the first user object. The source data is managed based on the private synonyms, which is regarded as the source data is managed based on the first user object. The control module is used to control each application to access the source data based on the private synonym; The shutdown module is used to close the data management permissions of the first user object when the source data is synchronized to the target database and the business logic switching completion information corresponding to the at least one application is received. The business logic switching information is generated by the staff's terminal and indicates that the at least one application has been adjusted to complete the business logic through the target database. The first sending module is used to restore the data management permissions of the first user object and send database switching failure information to the staff's terminal if it receives the unauthorized reading information sent by the application. Based on the application identifier carried in the unauthorized read information or based on the information sending status of each port, the target application corresponding to the unauthorized read information is determined, and the target application is the generator of the unauthorized read information. Generate business logic verification prompt information corresponding to the target application, and send the business logic verification prompt information to the staff member's terminal; In response to the adjustment completion message of the target application sent by the staff through the terminal, the data management permission of the first user object is closed to determine whether there is still a situation where the application sends information that it does not have permission to read.

6. The database switching management device according to claim 5, characterized in that, Also includes: The second sending module is used to send a database switching success message to the staff's terminal if it does not receive the unauthorized read information sent by the application.

7. A computer device, characterized in that, It includes a memory and a processor, the memory storing a computer program that, when run on the processor, executes the database switching management method as described in any one of claims 1-4.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed on a processor, performs the database switching management method as described in any one of claims 1-4.