Database monitoring method and device, electronic equipment and storage medium

By automatically querying the disaster recovery status of Oracle or SQL Server databases in the database monitoring system, the problem of inefficiency in database operation and maintenance is solved, and disaster recovery problems are discovered in a timely manner, improving system security and user experience.

CN120336079APending Publication Date: 2025-07-18SYM TECH (GUANGDONG) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510254520.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-05
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

When a database operation and maintenance engineer checks the backup or disaster recovery status of a large number of database instances, they need to execute SQL statements one by one, resulting in inefficiency and inability to detect disaster recovery problems in a timely manner, affecting system availability and stability.

Method used

By displaying the target disaster recovery database in the new task interface, establishing disaster recovery inspection tasks, using SQL statements to query the delay or synchronous health status of the Oracle or SQL Server database, automatically obtaining the disaster recovery results, and displaying the results on the task result view page to generate a patrol report.

Benefits of technology

It realizes automated database monitoring, improves work efficiency, reduces operation and maintenance time, improves system security and stability, and allows users to timely detect and deal with disaster recovery problems, improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120336079A_ABST
    Figure CN120336079A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a database monitoring method and device, electronic equipment and a storage medium, and belongs to the technical field of databases. The method comprises the steps that in response to a first instruction, a target disaster recovery database is displayed on a newly-added task interface, and a disaster recovery check task is established according to the target disaster recovery database; if the target disaster recovery database type comprises an Oracle database, querying disaster recovery application delay of the target disaster recovery database by adopting an SQL statement, and obtaining a disaster recovery result according to the disaster recovery application delay; if the target disaster recovery database type comprises an SQL Server database, querying the target disaster recovery database by adopting an SQL statement to obtain a disaster recovery result; and in response to the second instruction, displaying the target disaster recovery database and the disaster recovery result on the task result viewing page. According to the embodiment of the invention, the database can be automatically monitored, the disaster tolerance problem of the database can be found in time, the operation and maintenance time is shortened, the system safety and stability are improved, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of database technology, and in particular, to a database monitoring method and device, an electronic device, and a storage medium. Background Art

[0002] In the related art, when a database operation and maintenance engineer checks the database backup or disaster recovery status, they need to execute SQL statements for each database instance one by one to obtain the status of the database backup. When the number of database instances is large, this process will consume a lot of time, resulting in a significant reduction in work efficiency. In addition, if a failure occurs during the database backup or disaster recovery process, engineers often cannot be informed in a timely manner, so they cannot quickly take measures to solve the problem and restore the normal operation of the database. This not only affects the availability and stability of the system, but also increases the time cost of troubleshooting. Summary of the Invention

[0003] The main purpose of the embodiments of this application is to propose a database monitoring method and device, an electronic device, and a storage medium, aiming to automatically monitor the database and timely discover database disaster recovery problems.

[0004] To achieve the above object, on the one hand, an embodiment of this application proposes a database monitoring method, and the method includes the following steps:

[0005] In response to a first instruction, display a target disaster recovery database on the new task interface, and establish a disaster recovery check task based on the target disaster recovery database;

[0006] If the target disaster recovery database type includes an Oracle database, query the disaster recovery application delay of the target disaster recovery database using SQL statements through the disaster recovery check task, and obtain a disaster recovery result based on the disaster recovery application delay;

[0007] If the target disaster recovery database type includes a SQL Server database, query the target disaster recovery database using SQL statements through the disaster recovery check task to obtain a disaster recovery result;

[0008] In response to a second instruction, display the target disaster recovery database and the disaster recovery result on the task result viewing page.

[0009] In some embodiments, the method further includes:

[0010] Obtain the disaster recovery method of the target disaster recovery database through the disaster recovery check task.

[0011] In some embodiments, if the target disaster recovery database type includes an Oracle database, the disaster recovery application latency of the target disaster recovery database is queried using SQL statements through the disaster recovery check task, and the disaster recovery result is obtained based on the disaster recovery application latency, including:

[0012] If the target disaster recovery database type includes an Oracle database and the disaster recovery method corresponding to the target disaster recovery database includes data protection, the disaster recovery application latency of the target disaster recovery database is queried using SQL statements through the disaster recovery check task;

[0013] Obtain the disaster recovery latency threshold of the target disaster recovery database;

[0014] If the disaster recovery application latency is greater than the disaster recovery latency threshold, determine the disaster recovery result of the target disaster recovery database as disaster recovery failure; otherwise, determine the disaster recovery result of the target disaster recovery database as disaster recovery success.

[0015] In some embodiments, if the target disaster recovery database type includes a SQL Server database, the target disaster recovery database is queried using SQL statements through the disaster recovery check task to obtain a disaster recovery result, including:

[0016] If the target disaster recovery database type includes a SQL Server database and the disaster recovery method corresponding to the target disaster recovery database includes an online availability group, the synchronization health status of the target disaster recovery database is queried using SQL statements through the disaster recovery check task;

[0017] If the synchronization health status is healthy, determine the disaster recovery result of the target disaster recovery database as disaster recovery success.

[0018] In some embodiments, if the target disaster recovery database type includes a SQL Server database, the target disaster recovery database is queried using SQL statements through the disaster recovery check task to obtain a disaster recovery result, including:

[0019] If the target disaster recovery database type includes a SQL Server database and the disaster recovery method corresponding to the target disaster recovery database includes database mirroring, the synchronization status of the target disaster recovery database is queried using SQL statements through the disaster recovery check task;

[0020] Obtain the preset disaster recovery failure value of the target disaster recovery database;

[0021] If the synchronization status of the target disaster recovery database does not include the preset disaster recovery failure value, determine the disaster recovery result of the target disaster recovery database as disaster recovery success.

[0022] In some embodiments, the method further includes:

[0023] In response to a third instruction, display a target backup database on the new task interface, and establish a backup check task based on the target backup database, where the target backup database includes a target backup database type;

[0024] Use an SQL statement to query the backup status of the target backup database through the backup check task, and obtain a backup result based on the backup status;

[0025] In response to a fourth instruction, display the target backup database and the backup result on the task result viewing page;

[0026] If the target backup database type includes a SQL Server database and the backup result includes a successful backup, retrieve the backup detail data of the target backup database with a successful backup;

[0027] In response to a fifth instruction, display the backup detail data on the task result viewing page.

[0028] In some embodiments, the method further includes:

[0029] Generate database disaster recovery check data according to the disaster recovery check task and the disaster recovery result;

[0030] Generate database backup check data according to the backup check task and the backup result;

[0031] Generate an inspection report through the inspection report task according to the database disaster recovery check data and the database backup check data;

[0032] In response to a fifth instruction, display the inspection report on the inspection report viewing page.

[0033] To achieve the above object, another aspect of the embodiments of the present application provides a database monitoring device, and the device includes:

[0034] A task establishment module, configured to display a target disaster recovery database on the new task interface in response to a first instruction, and establish a disaster recovery check task based on the target disaster recovery database;

[0035] A first database check module, configured to, if the target disaster recovery database type includes an Oracle database, query the disaster recovery application latency of the target disaster recovery database through the disaster recovery check task using an SQL statement, and obtain a disaster recovery result based on the disaster recovery application latency;

[0036] A second database check module, configured to query the target disaster recovery database using SQL statements through the disaster recovery check task to obtain a disaster recovery result if the target disaster recovery database type includes a SQL Server database;

[0037] A result display module, configured to display the target disaster recovery database and the disaster recovery result on a task result viewing page in response to a second instruction.

[0038] To achieve the above object, another aspect of the embodiments of the present application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the foregoing method is implemented.

[0039] To achieve the above object, another aspect of the embodiments of the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the foregoing method is implemented.

[0040] The embodiments of the present application at least include the following beneficial effects: The present application provides a database monitoring method and apparatus, an electronic device, and a storage medium. This solution displays a target disaster recovery database on a new task interface in response to a first instruction, and establishes a disaster recovery check task according to the target disaster recovery database, which is conducive to database monitoring, reduces manual operations, improves work efficiency, and enhances the user experience; if the target disaster recovery database type includes an Oracle database, the disaster recovery application delay of the target disaster recovery database is queried using SQL statements through the disaster recovery check task, and a disaster recovery result is obtained based on the disaster recovery application delay; if the target disaster recovery database type includes a SQL Server database, the target disaster recovery database is queried using SQL statements through the disaster recovery check task to obtain a disaster recovery result, realizing automated database monitoring, which is conducive to timely discovering database disaster recovery problems, reducing operation and maintenance time, and enhancing system security and stability; in response to a second instruction, the target disaster recovery database and the disaster recovery result are displayed on a task result viewing page, which is conducive to users clearly and intuitively viewing the database monitoring result, timely discovering database disaster recovery problems, and enhancing the user experience. Description of the Drawings

[0041] Figure 1 is a flowchart of the database monitoring method provided by the embodiments of the present application;

[0042] Figure 2 is a flowchart of the database backup check step of the database monitoring method provided by the embodiments of the present application;

[0043] Figure 3 is a flowchart of the step of generating an inspection report of the database monitoring method provided by the embodiments of the present application;

[0044] Figure 4 Yes Figure 1 is the flowchart of step S103 in

[0045] Figure 5 is a specific implementation flowchart when the database monitoring method provided by the embodiment of the present application is applied to a database monitoring system;

[0046] Figure 6 is a schematic diagram of the new database interface provided by the embodiment of the present application;

[0047] Figure 7 is a schematic diagram of the new task interface provided by the embodiment of the present application;

[0048] Figure 8 is a schematic diagram of the task result viewing page provided by the embodiment of the present application;

[0049] Figure 9 is a schematic diagram of the database information viewing page provided by the embodiment of the present application;

[0050] Figure 10 is a schematic diagram of the notification configuration interface provided by the embodiment of the present application;

[0051] Figure 11 is a schematic diagram of the inspection report viewing page provided by the embodiment of the present application;

[0052] Figure 12 is a schematic diagram of the backup failure email notification provided by the embodiment of the present application;

[0053] Figure 13 is a schematic diagram of the structure of the database monitoring device provided by the embodiment of the present application;

[0054] Figure 14 is a schematic diagram of the hardware structure of the electronic device provided by the embodiment of the present application. Detailed implementation manner

[0055] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application. When the following description involves the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the embodiments of the present application. They are only examples of devices and methods consistent with some aspects of the embodiments of the present application detailed in the appended claims.

[0056] It can be understood that the terms "first", "second", etc. used in this application may be used herein to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of this application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if", "when" as used herein may be interpreted as "when...", "while...", or "in response to determining".

[0057] The terms "at least one", "multiple", "each", "any one", etc. used in this application, "at least one" includes one, two, or more than two, "multiple" includes two or more than two, "each" refers to each of the corresponding multiple, and "any one" refers to any one of the multiple.

[0058] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0059] Before elaborating on the embodiments of this application in detail, some of the nouns and terms involved in the embodiments of this application are first described, and the nouns and terms involved in the embodiments of this application are applicable to the following explanations.

[0060] 1) Data Guard: A disaster recovery method for Oracle databases, providing physical and logical replication functions, supporting primary-standby mode and multi-primary mode.

[0061] 2) Always On Availability Groups: A disaster recovery method for SQL Server data, providing high availability and disaster recovery functions, supporting multi-node clusters.

[0062] 3) Database Mirroring: A disaster recovery method for SQL Server data, providing high availability and disaster recovery functions.

[0063] In the related art, when a database operation and maintenance engineer checks the database backup or disaster recovery status, it is necessary to execute SQL statements one by one for each database instance to obtain the status of the database backup. When the number of database instances is huge, this process will consume a large amount of time, resulting in a significant reduction in work efficiency. In addition, if a failure occurs during the database backup or disaster recovery process, engineers often cannot be informed in time, so they cannot quickly take measures to solve the problem and restore the normal operation of the database. This not only affects the availability and stability of the system, but also increases the time cost of troubleshooting.

[0064] In view of this, a database monitoring method, device, equipment and medium are provided in the embodiments of the present application. This solution displays a target disaster recovery database on the new task interface in response to a first instruction, and establishes a disaster recovery check task based on the target disaster recovery database, which is beneficial to database monitoring, reduces manual operations, improves work efficiency, and enhances the user experience. If the type of the target disaster recovery database includes an Oracle database, the disaster recovery application delay of the target disaster recovery database is queried by using an SQL statement through the disaster recovery check task, and the disaster recovery result is obtained according to the disaster recovery application delay. If the type of the target disaster recovery database includes a SQL Server database, the target disaster recovery database is queried by using an SQL statement through the disaster recovery check task to obtain the disaster recovery result, realizing automated database monitoring, which is beneficial to timely discovering database disaster recovery problems, reducing operation and maintenance time, and enhancing system security and stability. In response to a second instruction, the target disaster recovery database and the disaster recovery result are displayed on the task result viewing page, which is beneficial for users to clearly and intuitively view the database monitoring results, timely discover database disaster recovery problems, and enhance the user experience.

[0065] The database monitoring method provided in the embodiments of the present application relates to the technical field of databases. The database monitoring method provided in the embodiments of the present application can be applied to a terminal, a server, or software running on a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, a vehicle-mounted terminal, etc., but is not limited thereto; the server side can be configured as an independent physical server, or can be configured as a server cluster or a distributed system composed of multiple physical servers, or can be configured as a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network; the software can be an application implementing the database monitoring method, etc., but is not limited to the above forms.

[0066] This application can be used in numerous general-purpose or special-purpose computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and so on. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This application can also be practiced in a distributed computing environment where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0067] It should be noted that in each specific embodiment of this application, when it comes to relevant processing based on data related to the user's identity or characteristics, such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first. Moreover, the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when this application embodiment needs to obtain the user's sensitive personal information, it will obtain the user's separate permission or separate consent through methods such as pop-up windows or jumping to a confirmation page. After clearly obtaining the user's separate permission or separate consent, the necessary user-related data for the normal operation of this application embodiment will be obtained.

[0068] Figure 1 It is an optional flowchart of the database monitoring method provided by the embodiment of this application. Figure 1 The method in [description] can include but is not limited to steps S101 to S104.

[0069] Step S101, in response to the first instruction, display the target disaster recovery database on the new task interface and establish a disaster recovery check task based on the target disaster recovery database.

[0070] Specifically, the first instruction is triggered when the user selects, clicks, or double-clicks the confirmation control on the new task interface and the task type is a disaster recovery task, and is used to display the task information input by the user and establish a disaster recovery check task based on the disaster recovery task information. The disaster recovery task information includes the target disaster recovery database and the task type.

[0071] In some embodiments, the disaster recovery task information further includes the task scheduling type and the execution time. Among them, the task type of the disaster recovery task information is a disaster recovery task. The task scheduling type is used to control the task execution cycle, and the execution time is used to determine the specific execution time of the task during the execution cycle.

[0072] Exemplarily, the task scheduling type is executed daily, and the execution time is 8:00:00.

[0073] The present application does not specifically limit the target disaster recovery database, and it can be flexibly selected according to actual monitoring needs. Exemplarily, the target disaster recovery database may include multiple databases or only a single database.

[0074] Optionally, in response to the third instruction, the target backup database is displayed on the new task interface, and a backup check task is established based on the target backup database.

[0075] Among them, the third instruction is triggered when the user selects, clicks, or double-clicks the confirmation control on the new task interface and the task type is a backup task, and is used to display the task information input by the user and establish a disaster recovery check task based on the backup task information. The disaster recovery task information includes the target backup database and the task type.

[0076] It can be understood that the backup task information also includes the task scheduling type and the execution time. Among them, the task type of the backup task information is a backup task.

[0077] Optionally, the disaster recovery method of the target disaster recovery database is obtained through the disaster recovery check task.

[0078] In this embodiment, in response to the first instruction, the target disaster recovery database is displayed on the new task interface, and a disaster recovery check task is established based on the target disaster recovery database, which is beneficial for database monitoring, prepares for subsequent automated database disaster recovery checks, reduces manual operations, is beneficial for improving work efficiency, and enhances the user experience.

[0079] Step S102, if the target disaster recovery database type includes an Oracle database, the disaster recovery application delay of the target disaster recovery database is queried by using an SQL statement through the disaster recovery check task, and the disaster recovery result is obtained according to the disaster recovery application delay.

[0080] Among them, the disaster recovery delay threshold corresponds to the target disaster recovery database one by one.

[0081] Optionally, the disaster recovery delay threshold of the target disaster recovery database is obtained.

[0082] In some embodiments, if the disaster recovery application delay is greater than the disaster recovery delay threshold, the disaster recovery result of the target disaster recovery database is determined to be a disaster recovery failure, otherwise the disaster recovery result of the target disaster recovery database is determined to be a disaster recovery success.

[0083] It can be understood that when the target disaster recovery database includes multiple databases, each target disaster recovery database corresponds to a separate disaster recovery result. When judging the threshold of a single target disaster recovery database, only the disaster recovery result corresponding to the single target disaster recovery database is determined as disaster recovery success or failure.

[0084] Optionally, determine the disaster recovery method of the target disaster recovery database.

[0085] Furthermore, if the target disaster recovery database type includes an Oracle database, and the disaster recovery method corresponding to the target disaster recovery database includes data protection, then the disaster recovery application delay of the target disaster recovery database is queried using SQL statements through a disaster recovery check task; obtain the disaster recovery delay threshold of the target disaster recovery database; if the disaster recovery application delay is greater than the disaster recovery delay threshold, then determine the disaster recovery result of the target disaster recovery database as disaster recovery failure, otherwise determine the disaster recovery result of the target disaster recovery database as disaster recovery success.

[0086] This application does not make specific limitations on the disaster recovery delay threshold, and it can be flexibly selected according to actual monitoring needs. Exemplarily, the disaster recovery delay threshold can be set in advance, or it can be input by the user when obtaining.

[0087] In this embodiment, if the target disaster recovery database type includes an Oracle database, then the disaster recovery application delay of the target disaster recovery database is queried using SQL statements through a disaster recovery check task, and the disaster recovery result is obtained according to the disaster recovery application delay, realizing automated database monitoring, which is beneficial to timely discovering database disaster recovery problems, reducing operation and maintenance time, and improving system security and stability.

[0088] Step S103, if the target disaster recovery database type includes a SQL Server database, then query the target disaster recovery database using SQL statements through a disaster recovery check task to obtain the disaster recovery result.

[0089] In some embodiments, the SQL Server database corresponds to two disaster recovery methods, including online availability groups and database mirroring.

[0090] Optionally, if the target disaster recovery database type includes a SQL Server database, and the disaster recovery method corresponding to the target disaster recovery database includes an online availability group, then query the synchronization health status of the target disaster recovery database using SQL statements through a disaster recovery check task; if the synchronization health status is healthy, then determine the disaster recovery result of the target disaster recovery database as disaster recovery success.

[0091] Among them, if the target disaster recovery database is multiple databases and the synchronization health statuses are all healthy, then determine the disaster recovery result of the target disaster recovery database as disaster recovery success.

[0092] Optionally, if the target disaster recovery database type includes a SQL Server database and the disaster recovery method corresponding to the target disaster recovery database includes database mirroring, the synchronization status of the target disaster recovery database is queried using SQL statements through a disaster recovery check task; the preset disaster recovery failure value of the target disaster recovery database is obtained; if the synchronization status of the target disaster recovery database does not include the preset disaster recovery failure value, the disaster recovery result of the target disaster recovery database is determined to be successful disaster recovery.

[0093] In this embodiment, if the target disaster recovery database type includes a SQL Server database, the target disaster recovery database is queried using SQL statements through a disaster recovery check task to obtain a disaster recovery result, realizing automated database monitoring, which is beneficial to timely discovering database disaster recovery problems, reducing operation and maintenance time, and improving system security and stability.

[0094] Step S104, in response to the second instruction, display the target disaster recovery database and the disaster recovery result on the task result viewing page.

[0095] Specifically, the second instruction is triggered after obtaining the disaster recovery result and is used to display the target disaster recovery database and the disaster recovery result on the task result viewing page.

[0096] It can be understood that if the target disaster recovery database includes multiple databases, each target disaster recovery database and its corresponding disaster recovery result are displayed on the task result viewing page.

[0097] In step S104 of some embodiments, database disaster recovery check data is generated based on the disaster recovery check task and the disaster recovery result; database backup check data is generated based on the backup check task and the backup result; a patrol inspection report is generated by the patrol inspection report task based on the database disaster recovery check data and the database backup check data; in response to the fifth instruction, the patrol inspection report is displayed on the patrol inspection report viewing page.

[0098] In this embodiment, in response to the second instruction, displaying the target disaster recovery database and the disaster recovery result on the task result viewing page is beneficial for users to clearly and intuitively view the database monitoring result, is beneficial to timely discovering database disaster recovery problems, and improves the user experience.

[0099] Steps S101 to S104 illustrated in the embodiments of the present application, by responding to the first instruction, display the target disaster recovery database on the new task interface, and establish a disaster recovery check task according to the target disaster recovery database, which is conducive to database monitoring, reduces manual operations, is conducive to improving work efficiency, and enhances the user experience; if the type of the target disaster recovery database includes an Oracle database, then the disaster recovery application delay of the target disaster recovery database is queried by using SQL statements through the disaster recovery check task, and the disaster recovery result is obtained according to the disaster recovery application delay; if the type of the target disaster recovery database includes a SQL Server database, then the target disaster recovery database is queried by using SQL statements through the disaster recovery check task to obtain the disaster recovery result, realizing automated database monitoring, which is conducive to timely discovering database disaster recovery problems, reducing the operation and maintenance time, and enhancing the system security and stability; in response to the second instruction, the target disaster recovery database and the disaster recovery result are displayed on the task result viewing page, which is conducive to the user clearly and intuitively viewing the database monitoring result, timely discovering database disaster recovery problems, and enhancing the user experience.

[0100] Please refer to Figure 2 , in some embodiments, the database monitoring method provided by the embodiments of the present application further includes a database backup check step, and the database backup check step may include but is not limited to steps S201 to S205:

[0101] Step S201, in response to the third instruction, display the target backup database on the new task interface, and establish a backup check task according to the target backup database.

[0102] Specifically, the third instruction is triggered when the user selects, clicks or double-clicks the confirmation control on the new task interface and the task type is a backup task, and is used to display the task information input by the user and establish a disaster recovery check task according to the backup task information, and the disaster recovery task information includes the target backup database and the task type.

[0103] In step S201 of some embodiments, the present application does not make specific limitations on the target backup database, and it can be flexibly selected in combination with actual monitoring needs. Exemplarily, the target backup database may include multiple databases or only a single database.

[0104] Step S202, query the backup status of the target backup database by using SQL statements through the backup check task, and obtain the backup result according to the backup status.

[0105] In step S202 of some embodiments, for the backup check, both the Oracle database and the SQL Server database query the backup status. If the value of the backup status field is "FAILED", the backup result is determined to be backup failure, otherwise it is backup success.

[0106] Step S203: In response to the fourth instruction, display the target backup database and the backup result on the task result viewing page.

[0107] Specifically, the fourth instruction is triggered after obtaining the backup result and is used to display the target backup database and the backup result on the task result viewing page.

[0108] Step S204: If the target backup database type includes a SQL Server database and the backup result includes backup success, retrieve the backup detail data of the target backup database with backup success.

[0109] Specifically, the backup detail data includes the backup database name, backup start time, backup end time, backup output device name, backup size, backup name, and backup type.

[0110] Optionally, if the target backup database type includes a SQL Server database and the backup result includes backup success, retrieve the backup database name, backup start time, backup end time, backup output device name, backup size, backup name, and backup type of the target backup database with backup success.

[0111] Step S205: In response to the fifth instruction, display the backup detail data on the task result viewing page.

[0112] Specifically, the fifth instruction is triggered when the target backup database type includes a SQL Server database, the backup result includes backup success, and the backup detail data is not empty, and is used to display the backup detail data on the task result viewing page.

[0113] In some embodiments, if the backup detail data is not empty, in response to the fifth instruction, display the backup detail data on the task result viewing page.

[0114] It can be understood that if any of the conditions that the target backup database type does not include a SQL Server database, the backup results are all backup failures, or the backup detail data is empty is satisfied, the fifth instruction is not triggered and the backup detail data is not displayed.

[0115] Please refer to Figure 3 , in some embodiments, the database monitoring method provided by the embodiments of the present application further includes a step of generating an inspection report, and the step of generating an inspection report may include but is not limited to steps S301 to S304:

[0116] Step S301: Generate database disaster recovery inspection data according to the disaster recovery inspection task and the disaster recovery result.

[0117] In step S301 of some embodiments, the inspection report task includes the inspection time and also includes the inspected database.

[0118] Further, obtain the disaster recovery inspection tasks and disaster recovery results of the inspection database, and generate database disaster recovery inspection data based on the disaster recovery inspection tasks and disaster recovery results.

[0119] Step S302, generate database backup inspection data according to the backup inspection tasks and backup results.

[0120] In step S301 of some embodiments, obtain the backup inspection tasks and backup results of the inspection database, and generate database backup inspection data according to the backup inspection tasks and backup results.

[0121] Optionally, if the backup detail data exists, generate database disaster recovery inspection data according to the disaster recovery inspection tasks, disaster recovery results and backup detail data.

[0122] Step S303, generate an inspection report according to the database disaster recovery inspection data and the database backup inspection data through the inspection report task.

[0123] Specifically, the inspection report task includes the inspection time, and the database inspection data includes the database disaster recovery inspection data and the database backup inspection data.

[0124] In step S303 of some embodiments, obtain historical database inspection data or perform database inspection in real time. The database inspection includes, but is not limited to, disaster recovery inspection, backup inspection, usage inspection and performance inspection.

[0125] It can be understood that the inspection contents of Oracle database inspection data and SQL Server database inspection data are not exactly the same.

[0126] Further, generate an inspection report according to the database disaster recovery inspection data and the database backup inspection data through the inspection report task. Among them, the inspection report supports data query.

[0127] Step S304, in response to the fifth instruction, display the inspection report on the inspection report viewing page.

[0128] Specifically, the fifth instruction is triggered when the inspection report viewing page is opened or refreshed, and is used to display the inspection report on the inspection report viewing page.

[0129] Please refer to Figure 4 , in some embodiments, step S103 may include, but is not limited to, steps S401 to S408:

[0130] Step S401, if the target disaster recovery database type includes an Oracle database and the disaster recovery method corresponding to the target disaster recovery database includes data protection, then use an SQL statement to query the disaster recovery application latency of the target disaster recovery database through a disaster recovery check task.

[0131] Among them, the disaster recovery method of data protection provides physical and logical replication functions and supports the primary-standby mode and the multi-primary mode.

[0132] In step S401 of some embodiments, use an SQL statement to query the disaster recovery application latency of the target disaster recovery database through a disaster recovery check task.

[0133] Step S402, obtain the disaster recovery latency threshold of the target disaster recovery database.

[0134] In step S402 of some embodiments, the disaster recovery latency threshold can be set in advance or determined by the user during the disaster recovery status check.

[0135] Step S403, determine whether the disaster recovery application latency is greater than the disaster recovery latency threshold. If so, determine the disaster recovery result of the target disaster recovery database as disaster recovery failure; otherwise, determine the disaster recovery result of the target disaster recovery database as disaster recovery success.

[0136] In step S403 of some embodiments, if the disaster recovery application latency includes multiple values, if there is a disaster recovery application latency greater than the disaster recovery latency threshold, determine the disaster recovery result of the target disaster recovery database as disaster recovery failure. Only when each disaster recovery application latency is less than or equal to the disaster recovery latency threshold, determine the disaster recovery result of the target disaster recovery database as disaster recovery success.

[0137] Step S404, if the target disaster recovery database type includes a SQL Server database and the disaster recovery method corresponding to the target disaster recovery database includes database mirroring, then use an SQL statement to query the synchronization status of the target disaster recovery database through a disaster recovery check task.

[0138] Specifically, database mirroring provides high availability and disaster recovery functions.

[0139] Step S405, obtain the preset disaster recovery failure value of the target disaster recovery database.

[0140] Among them, the preset disaster recovery failure value can be single or multiple, and is not limited thereto.

[0141] Exemplarily, the preset disaster recovery failure values of the target disaster recovery database are 0, 1, 3, and 5.

[0142] Step S406: Determine whether the synchronization status of the target disaster recovery database includes a preset disaster recovery failure value. If so, determine the disaster recovery result of the target disaster recovery database as disaster recovery failure; otherwise, determine the disaster recovery result of the target disaster recovery database as disaster recovery success.

[0143] In step S406 of some embodiments, if the value of the synchronization status field of the target disaster recovery database is 0, 1, 3, or 5, it indicates that the disaster recovery of this database fails; otherwise, the disaster recovery of the database is successful.

[0144] Step S407: If the target disaster recovery database type includes a SQL Server database and the disaster recovery method corresponding to the target disaster recovery database includes an online availability group, query the synchronization health status of the target disaster recovery database using SQL statements through a disaster recovery check task.

[0145] Specifically, the online availability group provides high availability and disaster recovery functions and supports multi-node clusters.

[0146] In step S407 of some embodiments, use SQL statements to query the synchronization health status of each piece of data in the target disaster recovery database.

[0147] Step S408: Determine whether the synchronization health status is all healthy. If so, determine the disaster recovery result of the target disaster recovery database as disaster recovery success; otherwise, determine the disaster recovery result of the target disaster recovery database as disaster recovery failure.

[0148] In step S408 of some embodiments, determine whether the synchronization health status is all healthy through a preset health standard value.

[0149] Exemplarily, as long as the value of the synchronization health status field of any one piece of data in the target disaster recovery database is not "HEALTHY", it indicates that the disaster recovery of this database fails; otherwise, the disaster recovery of the database is successful.

[0150] Taking the database monitoring system as an example, Figure 5 is a specific implementation flowchart when the database monitoring method provided by the embodiments of the present application is applied to a database monitoring system. Figure 5 The method in

[0151] Step 1: Add a database.

[0152] Among them, add the database to be monitored to the system, including information such as JDBC connection information and database type.

[0153] It can be understood that adding the database to be backed up or disaster recovery monitored to the system ensures that all key databases are included in the monitoring scope.

[0154] Exemplarily, add databases (Oracle, SQL Server) that need to monitor the backup status to the system, including information such as IP address, database instance, login user name, and login password. The backup period of the database starts at the whole hour every hour, such as 08:00 and 09:00. Add databases (Oracle, SQL Server) that need to monitor the disaster recovery status to the system, including information such as IP address, database instance, login user name, and login password. The disaster recovery latency time for the Oracle database is 5 minutes.

[0155] Exemplarily, the schematic diagram of the new database interface is as Figure 6 shown. Among them, the confirmation button is the confirmation control for the new database interface.

[0156] Step 2, create a new backup and disaster recovery inspection task.

[0157] In some embodiments, set the execution period of the inspection task according to the period of database backup and disaster recovery, so as to obtain the backup and disaster recovery results in a timely manner after the database backup and disaster recovery are completed.

[0158] Exemplarily, create a new backup inspection task in the task management, select the database added just now as the monitoring object, and set the task execution period to start at the tenth minute of every hour, such as 08:10 and 09:10. Create a new disaster recovery inspection task in the task management, select the database added just now as the monitoring object, and set the task execution period to start at the whole hour of every hour, such as 08:00 and 09:00.

[0159] Exemplarily, the schematic diagram of the new task interface is as Figure 7 shown. Among them, the confirmation button is the confirmation control for the new task interface.

[0160] Optionally, the inspection task includes task name, task type, task scheduling type, and execution time.

[0161] Among them, the database deployment methods supported by backup and disaster recovery monitoring are shown in Table 1.

[0162] Table 1

[0163]

[0164] Step 3, the task service executes the inspection task.

[0165] Among them, the task service will execute the inspection task according to the period set by the inspection task.

[0166] In some embodiments, according to the cycle of database backup or disaster recovery, corresponding cycle check tasks are added to the system. These tasks will be started after the database backup or disaster recovery is completed to ensure timely acquisition of the latest backup or disaster recovery status.

[0167] Among them, when the backup task time arrives, the system automatically executes the backup check task, performs a backup status query on each selected database (i.e., the target backup database) and returns the query result. When the disaster recovery task time arrives, the system automatically executes the disaster recovery check task, performs a disaster recovery status query on each selected database and returns the query result.

[0168] Optionally, the system connects to the database via JDBC, and then executes SQL statements to query the backup and disaster recovery status of the database.

[0169] Step 4, the system obtains and analyzes the check results to judge the backup and disaster recovery status.

[0170] Optionally, the system automatically judges the backup or disaster recovery status according to the data returned by the check task. The judgment results will be saved in the database for subsequent query and analysis.

[0171] Exemplarily, the database backup status query and status judgment rule table is shown in Table 2.

[0172] Table 2

[0173]

[0174] Specifically, after the disaster recovery task is executed, the obtained query results are analyzed. According to the judgment rules in the database disaster recovery status query and status judgment rule table, it is judged whether the disaster recovery of the database is successful. All check results will be recorded and stored in the database for subsequent query and statistics.

[0175] Exemplarily, the database disaster recovery status query and status judgment rule table is shown in Table 3.

[0176] Table 3

[0177]

[0178] Specifically, after the backup task is executed, the obtained query results are analyzed. According to the judgment rules in the database backup status query and status judgment rule table, it is judged whether the backup of the database is successful. All check results will be recorded and stored in the database for subsequent query and statistics.

[0179] In some embodiments, the system queries the database backup and disaster recovery status by executing SQL statements, and judges the database backup and disaster recovery status according to the corresponding rules.

[0180] Step 5, save the backup disaster recovery inspection results.

[0181] Step 6, view the inspection results.

[0182] Exemplarily, the schematic diagram of the task result viewing page is as Figure 8 shown.

[0183] Step 7, database inspection results.

[0184] Optionally, display the database inspection results on the database information viewing page.

[0185] Exemplarily, the schematic diagram of the database information viewing page is as Figure 9 shown.

[0186] Step 8, send weekly and monthly report notifications.

[0187] In some embodiments, in response to a notification configuration instruction, display and set the notification method on the notification configuration interface. The notification configuration instruction is triggered when the user clicks and selects the confirmation control on the notification configuration interface.

[0188] Exemplarily, the schematic diagram of the notification configuration interface is as Figure 10 shown. Among them, the confirmation button is the confirmation control on the new task interface. In addition, the notification channels include email, group robot, SMS, etc.

[0189] Step 9, generate an inspection report.

[0190] In some embodiments, the system regularly generates weekly or monthly reports, summarizes the inspection results and sends them to the operation and maintenance engineers or other relevant personnel so that they can comprehensively understand the health status of the database.

[0191] Among them, the system generates a detailed database inspection report according to the results of the database inspection. The inspection report not only includes the status of backup and disaster recovery, but also covers other important indicators, which can evaluate the running status of the database.

[0192] In some embodiments, generating an inspection report includes the following steps:

[0193] a. Data preparation: Add the database to be inspected in the system.

[0194] b. Create an inspection report task: Create an inspection report task in the system, select the database to be inspected, and set information such as the inspection personnel.

[0195] c. Set the time: Set the inspection time.

[0196] d. Database inspection: The system will automatically perform database inspection (important data such as backup disaster recovery status, database configuration, tablespace, control file, log file, data file, etc.).

[0197] e. Automatically generate inspection reports: The system generates inspection report parameters from the database inspection data for generating inspection report documents and for page query use.

[0198] Optionally, generate inspection reports from the database inspection data, where the database inspection data includes Oracle database inspection data and SQL Server database inspection data, and the database inspection data includes database anomalies and database anomaly handling suggestions.

[0199] Exemplarily, generate Oracle database inspection data from the Oracle database inspection parameter list, and the Oracle database inspection parameter list is shown in Table 4.

[0200] Table 4

[0201]

[0202] Among them, the Oracle database inspection includes backup and disaster recovery situation inspection, database version inspection, RAC database configuration inspection, control file configuration inspection, tablespace and data file inspection, database instance hit rate inspection, and slow SQL statement inspection. The Oracle database inspection data includes database anomalies and database anomaly handling suggestions.

[0203] Exemplarily, generate SQL Server database inspection data from the SQL Server database inspection parameter list, and the SQL Server database inspection parameter list is shown in Table 5.

[0204] Table 5

[0205]

[0206] Among them, the SQL Server database inspection includes backup and disaster recovery situation inspection, database version inspection, database CPU usage inspection, cluster information inspection, and slow SQL statement inspection.

[0207] Exemplarily, the schematic diagram of the inspection report viewing page is as Figure 11 shown.

[0208] Step 11, if the backup and disaster recovery fails, immediately send a notification.

[0209] It can be understood that to avoid frequent notifications, database notifications for failure situations that occur repeatedly within a short period will not be sent.

[0210] Among them, the notification channels are email, group robot, and SMS.

[0211] Specifically, when a failure occurs during the backup or disaster recovery process, the system will immediately notify the operation and maintenance engineers through multiple channels (such as emails, group robots, text messages, etc.) to ensure that problems can be discovered and handled in a timely manner.

[0212] Exemplarily, the schematic diagram of the backup failure email notification is as Figure 12 shown. Among them, the backup failure notification includes the name, IP address, database vendor, database type, and error information of the failed backup database. In addition, the same failed backup database within a preset ignore time (such as within 2 hours) will not be notified multiple times.

[0213] Through the above steps, this embodiment can significantly improve the efficiency of database backup and disaster recovery status checking, and ensure the high availability and stability of the database system.

[0214] In the embodiment of the present application, by responding to the first instruction, the target disaster recovery database is displayed on the new task interface, and a disaster recovery check task is established according to the target disaster recovery database, which is beneficial to database monitoring, reduces manual operations, improves work efficiency, and enhances the user experience; if the target disaster recovery database type includes an Oracle database, then through the disaster recovery check task, SQL statements are used to query the disaster recovery application latency of the target disaster recovery database, and the disaster recovery result is obtained according to the disaster recovery application latency; if the target disaster recovery database type includes a SQL Server database, then through the disaster recovery check task, SQL statements are used to query the target disaster recovery database to obtain the disaster recovery result, realizing automated database monitoring, which is beneficial to timely discovering database disaster recovery problems, reducing operation and maintenance time, and enhancing system security and stability; by responding to the second instruction, the target disaster recovery database and the disaster recovery result are displayed on the task result viewing page, which is beneficial for users to clearly and intuitively view the database monitoring results, timely discover database disaster recovery problems, and enhance the user experience.

[0215] Please refer to Figure 13 , the embodiment of the present application also provides a database monitoring device, which can implement the above database monitoring method. The device includes:

[0216] A task establishment module 1301, configured to respond to the first instruction, display the target disaster recovery database on the new task interface, and establish a disaster recovery check task according to the target disaster recovery database;

[0217] A first database check module 1302, configured to, if the target disaster recovery database type includes an Oracle database, query the disaster recovery application latency of the target disaster recovery database by using SQL statements through the disaster recovery check task, and obtain the disaster recovery result according to the disaster recovery application latency;

[0218] The second database inspection module 1303 is configured to, if the target disaster recovery database type includes a SQL Server database, query the target disaster recovery database by using SQL statements through the disaster recovery inspection task to obtain a disaster recovery result;

[0219] The result display module 1304 is configured to, in response to a second instruction, display the target disaster recovery database and the disaster recovery result on a task result viewing page.

[0220] It can be understood that the content in the above method embodiments is applicable to the device embodiments. The functions specifically implemented in the device embodiments are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those in the above method embodiments.

[0221] An embodiment of the present application further provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the above database monitoring method is implemented. The electronic device can be any intelligent terminal including a tablet computer, an in-vehicle computer, etc.

[0222] It can be understood that the content in the above method embodiments is applicable to the device embodiments. The functions specifically implemented in the device embodiments are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those in the above method embodiments.

[0223] Please refer to Figure 14 , Figure 14 which schematically shows the hardware structure of an electronic device in another embodiment. The electronic device includes:

[0224] A processor 1401, which can be implemented by using a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., and is configured to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0225] A memory 1402, which can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM), etc. The memory 1402 can store an operating system and other application programs. When implementing the technical solutions provided in the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 1402, and the processor 1401 is called to execute the database monitoring method of the embodiments of the present application;

[0226] The input / output interface 1403 is used to implement information input and output;

[0227] The communication interface 1404 is used to implement communication interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.);

[0228] The bus 1405 transmits information between various components of the device (such as the processor 1401, the memory 1402, the input / output interface 1403, and the communication interface 1404);

[0229] Among them, the processor 1401, the memory 1402, the input / output interface 1403, and the communication interface 1404 achieve communication connections with each other inside the device through the bus 1405.

[0230] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the above database monitoring method.

[0231] It can be understood that the content in the above method embodiment is applicable to the present storage medium embodiment. The functions specifically implemented by the present storage medium embodiment are the same as those of the above method embodiment, and the beneficial effects achieved are also the same as those of the above method embodiment.

[0232] As a non-transitory computer-readable storage medium, the memory can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory can include high-speed random access memory, and can also include non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory optionally includes a memory remotely provided relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the above networks include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.

[0233] The database monitoring method, database monitoring device, electronic device, and storage medium provided by the embodiments of the present application respond to a first instruction to display a target disaster recovery database on the new task interface and establish a disaster recovery check task based on the target disaster recovery database, which is conducive to database monitoring, reduces manual operations, improves work efficiency, and enhances the user experience. If the type of the target disaster recovery database includes an Oracle database, the disaster recovery application delay of the target disaster recovery database is queried using an SQL statement through the disaster recovery check task, and the disaster recovery result is obtained based on the disaster recovery application delay. If the type of the target disaster recovery database includes an SQL Server database, the target disaster recovery database is queried using an SQL statement through the disaster recovery check task to obtain the disaster recovery result, realizing automated database monitoring, which is conducive to timely discovering database disaster recovery problems, reducing operation and maintenance time, and enhancing system security and stability. In response to a second instruction, the target disaster recovery database and the disaster recovery result are displayed on the task result viewing page, which is conducive to users clearly and intuitively viewing the database monitoring result, timely discovering database disaster recovery problems, and enhancing the user experience.

[0234] The embodiments described in the embodiments of the present application are for more clearly explaining the technical solutions of the embodiments of the present application, and do not constitute a limitation to the technical solutions provided by the embodiments of the present application. Those skilled in the art know that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems.

[0235] Those skilled in the art can understand that the technical solutions shown in the figures do not constitute a limitation to the embodiments of the present application, and may include more or fewer steps than those shown in the figures, or combine some steps, or different steps.

[0236] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0237] Those of ordinary skill in the art can understand that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, and their appropriate combinations.

[0238] In the description of the present application and the above-mentioned accompanying drawings, terms such as "first", "second", "third", "fourth", etc. (if any) are used to distinguish similar objects and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances so that the embodiments of the present application described herein can be implemented in an order different from those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that comprises a series of steps or units does not necessarily limit to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0239] It should be understood that in the present application, "at least one (item)" means one or more, and "a plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that there can be three relationships. For example, "A and / or B" can represent: only A exists, only B exists, and both A and B exist at the same time. Among them, A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after. "At least one (individual) of the following" or a similar expression refers to any combination of these items, including any combination of single items (individuals) or plural items (individuals). For example, at least one (individual) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0240] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the above-mentioned unit division is only a logical function division, and there can be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of devices or units can be in electrical, mechanical or other forms.

[0241] The units described above as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0242] In addition, in each embodiment of the present application, each functional unit may be integrated into one processing unit, may exist physically as individual units, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of a software functional unit.

[0243] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product. The computer software product is stored in a storage medium and includes multiple instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in the various embodiments of the present application. The foregoing storage medium includes: various media that can store programs such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs.

[0244] The preferred embodiments of the embodiments of the present application have been described above with reference to the accompanying drawings, and thus do not limit the scope of rights of the embodiments of the present application. Any modifications, equivalent replacements, and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall be within the scope of rights of the embodiments of the present application.

Claims

1. A database monitoring method, characterized in that, The method includes the following steps: In response to a first instruction, display a target disaster recovery database on the new task interface, and establish a disaster recovery check task based on the target disaster recovery database; If the type of the target disaster recovery database includes an Oracle database, query the disaster recovery application latency of the target disaster recovery database using an SQL statement through the disaster recovery check task, and obtain a disaster recovery result based on the disaster recovery application latency; If the type of the target disaster recovery database includes a SQL Server database, query the target disaster recovery database using an SQL statement through the disaster recovery check task to obtain a disaster recovery result; In response to a second instruction, display the target disaster recovery database and the disaster recovery result on the task result viewing page.

2. The method according to claim 1, wherein The method further includes: Obtain the disaster recovery method of the target disaster recovery database through a disaster recovery check task.

3. The method according to claim 2, wherein The step of, if the type of the target disaster recovery database includes an Oracle database, query the disaster recovery application latency of the target disaster recovery database using an SQL statement through the disaster recovery check task, and obtain a disaster recovery result based on the disaster recovery application latency, includes: If the type of the target disaster recovery database includes an Oracle database, and the disaster recovery method corresponding to the target disaster recovery database includes data protection, query the disaster recovery application latency of the target disaster recovery database using an SQL statement through the disaster recovery check task; Obtain the disaster recovery latency threshold of the target disaster recovery database; If the disaster recovery application latency is greater than the disaster recovery latency threshold, determine the disaster recovery result of the target disaster recovery database as disaster recovery failure, otherwise determine the disaster recovery result of the target disaster recovery database as disaster recovery success.

4. The method according to claim 2, wherein The step of, if the type of the target disaster recovery database includes a SQL Server database, query the target disaster recovery database using an SQL statement through the disaster recovery check task to obtain a disaster recovery result, includes: If the type of the target disaster recovery database includes a SQL Server database, and the disaster recovery method corresponding to the target disaster recovery database includes an online availability group, query the synchronous health status of the target disaster recovery database using an SQL statement through the disaster recovery check task; If the synchronous health status is healthy, determine the disaster recovery result of the target disaster recovery database as disaster recovery success.

5. The method according to claim 2, wherein The step of, if the type of the target disaster recovery database includes a SQL Server database, query the target disaster recovery database using an SQL statement through the disaster recovery check task to obtain a disaster recovery result, includes: If the type of the target disaster recovery database includes a SQL Server database, and the disaster recovery method corresponding to the target disaster recovery database includes database mirroring, query the synchronous status of the target disaster recovery database using an SQL statement through the disaster recovery check task; Obtain the preset disaster recovery failure value of the target disaster recovery database; If the synchronous status of the target disaster recovery database does not include the preset disaster recovery failure value, determine the disaster recovery result of the target disaster recovery database as disaster recovery success.

6. The method according to claim 1, wherein The method further includes: In response to the third instruction, display the target backup database in the new task interface, and establish a backup check task based on the target backup database, where the target backup database includes the target backup database type; Query the backup status of the target backup database using an SQL statement through the backup check task, and obtain a backup result based on the backup status; In response to the fourth instruction, display the target backup database and the backup result on the task result viewing page; If the target backup database type includes a SQL Server database and the backup result includes a successful backup, retrieve the backup detail data of the target backup database with a successful backup; In response to the fifth instruction, display the backup detail data on the task result viewing page.

7. The method according to claim 1, characterized in that, The method further includes: Generate database disaster recovery check data based on the disaster recovery check task and the disaster recovery result; Generate database backup check data based on the backup check task and the backup result; Generate an inspection report through the inspection report task based on the database disaster recovery check data and the database backup check data Generate an inspection report through the inspection report task based on the database disaster recovery check data and the database backup check data; In response to the fifth instruction, display the inspection report on the inspection report viewing page.

8. A database monitoring device, characterized in that, The device includes: A task establishment module, configured to, in response to the first instruction, display a target disaster recovery database in the new task interface, and establish a disaster recovery check task based on the target disaster recovery database; A first database check module, configured to, if the target disaster recovery database type includes an Oracle database, query the disaster recovery application latency of the target disaster recovery database using an SQL statement through the disaster recovery check task, and obtain a disaster recovery result based on the disaster recovery application latency; A second database check module, configured to, if the target disaster recovery database type includes a SQL Server database, query the target disaster recovery database using an SQL statement through the disaster recovery check task, and obtain a disaster recovery result; A result display module, configured to, in response to the second instruction, display the target disaster recovery database and the disaster recovery result on the task result viewing page.

9. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Transaction processing control method and system

    CN106970934A

  • Database automatic operation and maintenance management method, server and storage medium

    CN108491422A