CN115185921B - Database fault loss stopping method, device, electronic equipment, medium and program product - Google Patents

Database fault loss stopping method, device, electronic equipment, medium and program product Download PDF

Info

Publication number
CN115185921B
CN115185921B CN202210540508.5A CN202210540508A CN115185921B CN 115185921 B CN115185921 B CN 115185921B CN 202210540508 A CN202210540508 A CN 202210540508A CN 115185921 B CN115185921 B CN 115185921B
Authority
CN
China
Prior art keywords
database
sql
instance
abnormal
blocking
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210540508.5A
Other languages
Chinese (zh)
Other versions
CN115185921A (en
Inventor
张良
赵宇航
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Seashell Housing Beijing Technology Co Ltd
Original Assignee
Seashell Housing Beijing Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seashell Housing Beijing Technology Co Ltd filed Critical Seashell Housing Beijing Technology Co Ltd
Priority to CN202210540508.5A priority Critical patent/CN115185921B/en
Publication of CN115185921A publication Critical patent/CN115185921A/en
Application granted granted Critical
Publication of CN115185921B publication Critical patent/CN115185921B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The embodiment of the invention provides a database fault loss stopping method, a device, electronic equipment, a medium and a program product, wherein the method comprises the following steps: determining an abnormal SQL statement to be blocked and a database instance where the abnormal SQL statement is located; extracting SQL fingerprints representing a class of SQL statements to which the abnormal SQL statements belong; and sending a blocking command to a database server where the database instance is located, wherein the blocking command comprises an instance ID of the database instance, SQL fingerprints and rewrite rules of the SQL fingerprints, so that the database server writes the rewrite rules into the database instance according to the instance ID and the SQL fingerprints, and the rewrite rules are triggered to take effect. According to the method, the device, the electronic equipment, the medium and the program product for stopping the database faults, the SQL request can be executed according to the rewritten SQL statement by rewriting the abnormal SQL statement, the quick processing and the result returning of the abnormal SQL statement can be realized, and the database faults can be effectively and quickly stopped.

Description

Database fault loss stopping method, device, electronic equipment, medium and program product
Technical Field
The embodiment of the invention relates to a database fault loss stopping method, a database fault loss stopping device, electronic equipment, a medium and a program product.
Background
The more widely used database product for internet online applications is MySQL database, which typically requires 99.99% of service availability (SLA). When service faults occur, a corresponding damage stopping plan needs to be formulated, and service is quickly restored.
Online interconnect applications typically select MySQL as the underlying database store, and application services enable consistent reading of data for each application node by storing business data in the database. The application node does not store data, also commonly referred to as a stateless service, mySQL stores business data, also commonly referred to as a stateful service, which is a distinction between application services and database services. Therefore, when the application flow suddenly increases, the stateless service expansion only needs to allocate CPU and memory resources, and the expansion speed depends on the service deployment and release speed. When the application flow of the stateful service of the database is suddenly increased, a large number of data copies are required to be performed in addition to the deployment and release of the database service, and the capacity cannot be expanded in a short time. The database is therefore typically the first service to be overwhelmed when faced with a sudden increase in traffic.
MySQL databases serve as underlying storage services, and the typical means to stop failures against application traffic surges is to expand or kill slow queries from the library. The speed of expansion from the library is limited by the speed of copying the data copy, and enough redundancy needs to be prepared in advance to realize quick expansion, so that a great amount of resource waste is generated, otherwise, damage is difficult to stop in a short time (for example, less than 5 min). The damage stopping scheme of the slow query is used for searching and killing the request with low query speed according to a certain time interval, and the request is processed as usual during the searching and killing interval, so that the slow query only plays a role in reducing the load of the database for the new request which is continuously increased, the pressure of the database cannot be thoroughly relieved, SQL execution errors can be caused, and the application needs to do corresponding exception handling or effective damage stopping cannot be realized. Thus, application traffic surges are most often encountered in which it is often necessary to rely on upper layer traffic throttling to achieve fast loss prevention, however many upper layer traffic does not provide the throttling function.
Disclosure of Invention
In order to solve the problems in the prior art, the embodiment of the invention provides a database fault loss stopping method, a device, electronic equipment, a medium and a program product.
The embodiment of the invention provides a database fault loss stopping method, which comprises the following steps: determining an abnormal SQL statement to be blocked and a database instance in which the abnormal SQL statement is located; extracting SQL fingerprints according to the abnormal SQL sentences; the SQL fingerprint is used for representing a class of SQL sentences to which the abnormal SQL sentences belong; and sending a blocking command to a database server where the database instance is located, wherein the blocking command comprises an instance ID of the database instance, the SQL fingerprint and an overwriting rule of an SQL statement corresponding to the SQL fingerprint, so that the database server writes the overwriting rule into the database instance according to the instance ID and the SQL fingerprint after receiving the blocking command, and triggers the overwriting rule to take effect.
According to the database fault loss stopping method provided by the embodiment of the invention, the rewriting rule comprises the following steps: and replacing the SQL statement corresponding to the SQL fingerprint with an instruction for directly returning a result set.
According to the method for stopping the database fault provided by the embodiment of the invention, before the sealing command is sent to the database server where the database instance is located, the method further comprises the following steps: and receiving the rewrite rules sent by the client.
According to the method for stopping the database fault provided by the embodiment of the invention, the determining the abnormal SQL statement to be blocked and the database instance where the abnormal SQL statement is located includes: sending information of a database instance with abnormality to a client; receiving a query instruction of the SQL request of the database instance initiated by the client; sending the query instruction to the database server where the database instance is located; receiving a query result of the query instruction returned by the database server, wherein the query result comprises an SQL request being executed by the database instance; sending the query result to the client for display; receiving the abnormal SQL statement to be blocked and the information of the database instance where the abnormal SQL statement is located, which are determined by the client according to the query result; or, the determining the abnormal SQL statement to be blocked and the database instance where the abnormal SQL statement is located includes: and receiving the abnormal SQL statement to be blocked and the information of the database instance where the abnormal SQL statement is located, which are input by the client.
According to the method for stopping the database fault provided by the embodiment of the invention, after the sealing command is sent to the database server where the database instance is located, the method further comprises the following steps: writing the blocking information into a database table, and displaying a blocking list at a client according to the database table; the seal information comprises at least one of the SQL fingerprint, the rewritten SQL statement, the database instance, the database name, the operator, the seal state, the instance ID and the time information; the forbidden list comprises all or part of forbidden information and supports inquiry according to preset forbidden information; and/or triggering the database server to create or update a rewrite rule table according to the blocking command, wherein the rewrite rule table comprises the instance ID and the rewrite rule.
According to the database fault loss stopping method provided by the embodiment of the invention, the method further comprises the following steps: receiving a forbidden state change instruction sent by the client; wherein the blocking state change instruction includes information of at least one database instance to be subjected to blocking state change; the database server where the database instance is located is obtained respectively, and the forbidden state change instruction of the database instance is sent to the database server so that the database server can execute corresponding forbidden state change on the corresponding database instance; the forbidden state changing instruction comprises at least one of forbidden state forbidden instruction, forbidden state enabling instruction and forbidden deletion instruction.
According to the database fault loss stopping method provided by the embodiment of the invention, the method further comprises the following steps: and acquiring the number of the blocked SQL sentences of the database instance, drawing a blocking monitoring curve according to the number of the blocked SQL sentences, and sending the blocking monitoring curve to a client for display.
The embodiment of the invention provides a database fault loss stopping device, which comprises: the abnormal SQL information determining module is used for: determining an abnormal SQL statement to be blocked and a database instance in which the abnormal SQL statement is located; the SQL fingerprint acquisition module is used for: extracting SQL fingerprints according to the abnormal SQL sentences; the SQL fingerprint is used for representing a class of SQL sentences to which the abnormal SQL sentences belong; the sealing and forbidden module is used for: and sending a blocking command to a database server where the database instance is located, wherein the blocking command comprises an instance ID of the database instance, the SQL fingerprint and an overwriting rule of an SQL statement corresponding to the SQL fingerprint, so that the database server writes the overwriting rule into the database instance according to the instance ID and the SQL fingerprint after receiving the blocking command, and triggers the overwriting rule to take effect.
The embodiment of the invention also provides electronic equipment, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the steps of any database fault loss stopping method are realized when the processor executes the program.
The embodiments of the present invention also provide a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of any of the database fault loss prevention methods described above.
According to the method, the device, the electronic equipment, the medium and the program product for stopping the database faults, the SQL request can be executed according to the rewritten SQL statement by rewriting the abnormal SQL statement, and the quick processing and the result return of the abnormal SQL statement can be realized by directly returning the result set, so that the database faults are stopped effectively and quickly.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a database fault loss prevention method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a custom seal page of a client in the database fault loss prevention method according to the embodiment of the present invention;
FIG. 3 is a schematic diagram showing a sealing management interface of a database fault loss prevention method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram showing a seal monitoring curve in the database fault loss stopping method according to the embodiment of the present invention;
FIG. 5 is a second flowchart of a database fault loss prevention method according to an embodiment of the present invention;
FIG. 6 is an example of a flow monitoring curve in a database fault loss prevention method provided by an embodiment of the present invention;
FIG. 7 is a schematic structural diagram of a database fault loss prevention device according to an embodiment of the present invention;
fig. 8 illustrates a physical structure diagram of an electronic device.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The database fault loss prevention method, apparatus, electronic device, medium and program product of the present invention are described below in conjunction with fig. 1-8.
Fig. 1 is a schematic flow chart of a database fault loss stopping method according to an embodiment of the present invention. As shown in fig. 1, the method includes:
step 101, determining an abnormal SQL statement to be blocked and a database instance where the abnormal SQL statement is located.
Abnormal SQL statements, such as SQL statements that cause a flow bump, are typically more concurrent SQL statements. For example, a plurality of clients initiate login requests at the same time, and the concurrency of SQL sentences corresponding to the login requests is large. Abnormal SQL statements can cause database failures. The description of the embodiment of the invention will mainly take the abnormal situation of flow sudden increase as an example.
The database fault loss prevention method provided by the embodiment of the invention can be applied to a server for realizing database fault loss prevention through a blocking means, and the server is called a blocking server for the convenience of distinguishing. The blocking server first needs to determine the abnormal SQL statement to be blocked and the database instance where the abnormal SQL statement is located. The database instance is a program, is a layer of data management software between a user and an operating system, and the user performs any operation on data in the database, including data definition, data query, data maintenance, database operation control and the like, under the database instance, and an application program can only make a lane with the database through the database instance. The database instances run on a database server, which may run multiple database instances for implementing different functions. The blocking server may communicate with a plurality of database servers to implement blocking of abnormal SQL statements in database instances on the database servers.
One database instance may serve multiple databases. Different databases may also correspond to the same SQL statement, if the abnormal SQL statement of a specific database needs to be blocked, the blocking server needs to determine the database name corresponding to the abnormal SQL statement to be blocked, in addition to the abnormal SQL statement to be blocked and the database instance where the abnormal SQL statement is located.
102, extracting SQL fingerprints according to the abnormal SQL sentences; the SQL fingerprint is used for representing a class of SQL sentences to which the abnormal SQL sentences belong.
The type of the SQL statement with the exception can be known according to the exception SQL statement. For example, the SQL statement in which the exception occurred is a login request. The corresponding SQL statement of the login request usually contains information such as a user name, a password and the like, and the information is continuously changed, so that the sealing of only a single SQL statement is meaningless, and the sealing of the SQL statement is needed. Thus, an SQL fingerprint is extracted from the abnormal SQL statement; the SQL fingerprint is used for representing a class of SQL sentences to which the abnormal SQL sentences belong.
And extracting the SQL fingerprint according to the abnormal SQL statement, wherein the step of commonly replacing variables in the abnormal SQL statement with preset characters is carried out to obtain the SQL fingerprint corresponding to the abnormal SQL statement. When the seal server extracts SQL fingerprints according to the abnormal SQL sentences, the variables in the abnormal SQL sentences can be replaced by preset characters in a wild way, so that the SQL fingerprints corresponding to the abnormal SQL sentences are obtained. The sealing server can perform regular searching according to the data type, and the matched result is replaced by a question mark through regular matching of character strings in numbers, double quotation marks or single quotation marks, so that the SQL fingerprint is obtained.
Step 103, sending a blocking command to a database server where the database instance is located, where the blocking command includes an instance ID of the database instance, the SQL fingerprint, and an overwriting rule of an SQL statement corresponding to the SQL fingerprint, so that after the database server receives the blocking command, the database server writes the overwriting rule into the database instance according to the instance ID and the SQL fingerprint, and triggers the overwriting rule to take effect.
The corresponding relation between the database instance and the database server can be stored in the blocking server, and the database instance can be uniquely identified by an instance ID. The method comprises the steps that a sealing forbidden server sends a sealing forbidden command to a database server where a database instance is located, wherein the sealing forbidden command comprises an instance ID of the database instance, SQL fingerprints and an SQL statement rewriting rule corresponding to the SQL fingerprints. The rewriting rule comprises replacing SQL sentences corresponding to SQL fingerprints with preset instructions.
After receiving the blocking command, the database server loads a query rewrite plug-in, writes rewrite rules into the database instance according to the instance ID and the SQL fingerprint, namely, replaces the SQL statement corresponding to the SQL fingerprint with rules of a preset instruction and writes the rules into the corresponding database instance, and if the specific database is blocked, the name of the database is required to be indicated. After the overwriting is completed, triggering the overwriting rules to take effect by calling a trigger function by using the query overwriting plug-in. When the database instance receives the SQL request again, the query rewrite plug-in obtains the SQL fingerprint of the SQL statement corresponding to the SQL request, compares the SQL fingerprint with the SQL fingerprint in the seal command, rewrites the SQL statement according to the rewrite rule if the SQL fingerprint is consistent with the SQL fingerprint in the seal command, replaces the SQL statement with a preset instruction and executes the SQL statement, and can directly return a result set corresponding to the preset instruction. The rule of SQL fingerprint extraction by the sealing server is the same as the rule of fingerprint extraction by the query rewrite plug-in.
The blocked SQL does not need to be completely executed by the database, and the cost of the database depends on the cost of SQL analysis, and the SQL analysis takes less than 10% of the whole SQL execution time, which is equivalent to 10 times capacity expansion. Compared with a slave library with 10 times of expansion, the SQL blocking platform can realize second-level rapid blocking, and the loss-stopping efficiency is far higher than that of the slave library. SQL parsing may include SQL fingerprint extraction, overwriting SQL statements, and returning results based on the overwritten SQL statements.
SQL blocking utilizes Query Rewrite (Query Rewrite) techniques. Unlike the strategy of searching and killing slow inquiry, SQL (structured query language) sealing and forbidden return is a normal result set, SQL execution errors cannot be caused, no special treatment is needed to be carried out on application, the application is less invasive, and damage prevention is better.
According to the database fault loss stopping method provided by the embodiment of the invention, the SQL request can be executed according to the rewritten SQL statement by rewriting the abnormal SQL statement, the quick processing and the result return of the abnormal SQL statement can be realized, and the database fault loss stopping can be effectively and quickly realized.
According to the database fault loss stopping method provided by the embodiment of the invention, the rewrite rule comprises an instruction for replacing the SQL statement corresponding to the SQL fingerprint with a direct return result set.
The overwriting rule may include replacing an SQL statement corresponding to the SQL fingerprint with a preset instruction. The preset instruction is, for example, a return fixed value, a preset simple instruction, etc. In order to increase the processing speed, in this embodiment, the rewrite rule is set to replace the SQL statement corresponding to the SQL fingerprint with an instruction that directly returns the result set. The directly returned result set may be an empty result set.
Taking a database service fault caused by flow as an example, the loss stopping strategy of the fault needs to be two points, namely quick and effective. According to the database fault loss stopping method provided by the embodiment of the invention, the specific SQL is blocked when the flow is suddenly applied, and the abnormal flow is rapidly discarded and the loss is rapidly stopped in a form of directly returning a result set.
According to the database fault loss stopping method provided by the embodiment of the invention, the rewriting rule is set to be the instruction for replacing the SQL statement corresponding to the SQL fingerprint with the direct return result set, so that the database fault loss stopping speed is further improved.
According to the method for stopping the database fault provided by the embodiment of the invention, before the sealing command is sent to the database server where the database instance is located, the method further comprises the following steps: and receiving the rewrite rules sent by the client.
The keep-alive server may set up a web client that communicates with the keep-alive server through a browser for relevant setup or other operations. For example, a custom package page may be set at the client for custom processing of package information. The rewrite rules in the seal command sent by the seal server to the database server may be from the client.
Fig. 2 is a schematic diagram of a custom seal page of a client in the database fault loss prevention method according to an embodiment of the present invention. As shown in fig. 2, preselected items of the rewrite rules may be set, including, for example, direct return of a null result set, return of "hello world", and so forth. After selecting the corresponding rewrite rule and clicking "submit seal", the relevant seal custom information including the rewrite rule can be sent to the seal server.
According to the database fault loss stopping method provided by the embodiment of the invention, the user-defined processing of the rewriting rule can be realized by receiving the rewriting rule sent by the client.
According to the method for stopping the database fault provided by the embodiment of the invention, the determining the abnormal SQL statement to be blocked and the database instance where the abnormal SQL statement is located includes: sending information of a database instance with abnormality to a client; receiving a query instruction of the SQL request of the database instance initiated by the client; sending the query instruction to the database server where the database instance is located; receiving a query result of the query instruction returned by the database server, wherein the query result comprises an SQL request being executed by the database instance; sending the query result to the client for display; receiving the abnormal SQL statement to be blocked and the information of the database instance where the abnormal SQL statement is located, which are determined by the client according to the query result; or, the determining the abnormal SQL statement to be blocked and the database instance where the abnormal SQL statement is located includes: and receiving the abnormal SQL statement to be blocked and the information of the database instance where the abnormal SQL statement is located, which are input by the client.
When determining an abnormal SQL statement to be blocked and a database instance where the abnormal SQL statement is located, the blocking server can acquire the abnormal SQL statement through an interaction process with the client.
When an abnormal SQL statement to be blocked and a database instance where the abnormal SQL statement is located are acquired according to the real-time abnormal condition of the database, the blocking server firstly acquires information of the abnormal database instance, and the information of the abnormal database instance acquired by the blocking server can be acquired through a third party service, such as a database abnormality monitoring service. The blocking server acquires the information of the abnormal database instance and sends the information of the abnormal database instance to the client. The blocking server may send the information of the abnormal database instance to the client through a short message, where the short message may include a link of the custom blocking page shown in fig. 2. After clicking the link, the client automatically opens the custom seal page shown in fig. 2, and can automatically fill the information of the abnormal database instance into the instance information frame. Of course, the information of the database instance may be displayed in a short message, and the operator may input the information of the database instance into the instance information frame.
After the information of the database instance is filled in the instance information frame, the client sends a query instruction of the SQL request of the filled database instance to the sealing server by clicking 'Show Processslot', and the query instruction is used for querying the information of the SQL request currently being executed by the database instance. After receiving the query instruction sent by the client, the sealing server sends the query instruction to the database server where the corresponding database instance is located, and receives a query result of the query instruction returned by the database server, wherein the query result comprises an SQL request being executed by the database instance. And the sealing server sends the query result to the client for display. The executing SQL requests may be displayed separately for different databases. And, a selection box can be set corresponding to the SQL sentence in the display result of the executing SQL request, when the selection box corresponding to a certain SQL sentence is selected, the corresponding database name is automatically filled into the related library name information box shown in fig. 2, and the selected SQL sentence is automatically filled into the SQL information box to be blocked. After the rewrite rule corresponding to the SQL is selected, the seal-forbidden custom information is sent to the seal-forbidden server by clicking a 'submit seal-forbidden' button. The method comprises the steps of sealing abnormal SQL sentences and information of database instances where the abnormal SQL sentences are located.
In addition, to meet the requirement of autonomous blocking, for example, some SQL sentences can confirm that blocking is required without monitoring the database abnormality. The abnormal SQL statement to be blocked and the information of the database instance where the abnormal SQL statement is located can be directly input into the blocking custom page of the client, and the information related to the library name can be further included, and the information is sent to the blocking server.
According to the method for stopping the damage of the database faults, provided by the embodiment of the invention, the abnormal SQL statement to be blocked and the database instance where the abnormal SQL statement is located are determined according to the abnormal condition of the database instance, or the abnormal SQL statement to be blocked and the database instance where the abnormal SQL statement is located are determined according to the input result of the client, so that different requirements are met, and the flexibility is improved.
According to the method for stopping the database fault provided by the embodiment of the invention, after the sealing command is sent to the database server where the database instance is located, the method further comprises the following steps: writing the blocking information into a database table, and displaying a blocking list at a client according to the database table; the seal information comprises at least one of the SQL fingerprint, the rewritten SQL statement, the database instance, the database name, the operator, the seal state, the instance ID and the time information; the forbidden list comprises all or part of forbidden information and supports inquiry according to preset forbidden information; and/or triggering the database server to create or update a rewrite rule table according to the blocking command, wherein the rewrite rule table comprises the instance ID and the rewrite rule.
After sending a blocking command to a database server where the database instance is located, the blocking server writes blocking information into a database table, and displays a blocking list at a client according to the database table; the sealing information comprises at least one of SQL fingerprints, rewritten SQL sentences, database examples, database names, operators, sealing states, example IDs and time information; the blocking list includes all or part of the blocking information in the database table.
Fig. 3 is a schematic display diagram of a sealing management interface of a database fault loss prevention method according to an embodiment of the present invention. As shown in fig. 3, the sealing list may be presented at a sealing management interface. The sealing forbidden list comprises source SQL (SQL fingerprint), rewritten SQL (SQL statement rewritten according to the rewriting rule), database instance, operator, sealing forbidden state, etc., and can support query according to database instance (port), SQL statement keyword, operator, etc.
In addition, after the blocking server sends a blocking command to the database server where the database instance is located, the database server is triggered to load a query rewrite plug-in, write rewrite rules into the database instance according to the instance ID and SQL fingerprints, and trigger the rewrite rules to take effect, and the database server is triggered to create or update a rewrite rule table according to the blocking command, wherein the rewrite rule table comprises the instance ID and the rewrite rules, so that information loss is avoided, and the database instance can be rewritten according to the rewrite rule table after restarting.
According to the database fault loss stopping method provided by the embodiment of the invention, after the sealing command is sent to the database server where the database instance is located, the sealing information is written into the data table, and the sealing list is displayed at the client according to the database table, so that the client can conveniently inquire the sealing related information; by triggering the database server to create or update the rewrite rule table according to the blocking command, the rewrite rule table can be used for writing in the rewrite rules after the database instance is restarted, and the reliability is improved.
According to the database fault loss stopping method provided by the embodiment of the invention, the method further comprises the following steps: receiving a forbidden state change instruction sent by the client; wherein the blocking state change instruction includes information of at least one database instance to be subjected to blocking state change; the database server where the database instance is located is obtained respectively, and the forbidden state change instruction of the database instance is sent to the database server so that the database server can execute corresponding forbidden state change on the corresponding database instance; the forbidden state changing instruction comprises at least one of forbidden state forbidden instruction, forbidden state enabling instruction and forbidden deletion instruction.
As shown in fig. 3, batch disable operation buttons and batch delete operation buttons may be provided on the display interface of the blocking list. After the blocking information corresponding to at least one database instance is selected, clicking the batch disabling button can send a batch disabling instruction of the selected database instance to the blocking server. The batch disable instruction includes an instance ID of the database instance to be disabled. The method comprises the steps that a blocking server obtains a database server where a database instance corresponding to an instance ID is located, and a blocking and disabling instruction of the database instance corresponding to the instance ID is sent to the database server, so that the database server can execute blocking and disabling on the corresponding database instance.
After the blocking information corresponding to at least one database instance is selected, clicking a batch deletion button, and sending a batch deletion instruction of the selected database instance to the blocking server. The bulk delete instruction includes an instance ID of the database instance to be deleted. The blocking server acquires the database server where the database instance corresponding to the instance ID is located, and sends a blocking and deleting instruction of the database instance corresponding to the instance ID to the database server so that the database server can execute blocking and deleting on the corresponding database instance. In addition, the blocking list and the database table will also delete the blocking information of the related database instance.
In addition, a seal-forbidden enable button (not shown in fig. 3) may be further set on the seal-forbidden management interface, after seal-forbidden information corresponding to at least one database instance is selected, the batch enable button is clicked, and a batch enable instruction of the selected database instance may be sent to the seal-forbidden server. The batch enable instruction includes an instance ID of the database instance to be enabled. The method comprises the steps that a blocking server obtains a database server where a database instance corresponding to an instance ID is located, and a blocking enabling instruction of the database instance corresponding to the instance ID is sent to the database server, so that the database server can execute blocking enabling on the corresponding database instance.
Clicking on the processist tab in fig. 3 may display the case of the SQL request currently being executed by the specified database instance.
According to the database fault loss stopping method provided by the embodiment of the invention, the blocking state change instruction sent by the client is received, and the database server is triggered to change the blocking state of the corresponding database instance according to the blocking state change instruction, so that the effective management of the blocking state is realized.
According to the database fault loss stopping method provided by the embodiment of the invention, the method further comprises the following steps: and acquiring the number of the blocked SQL sentences of the database instance, drawing a blocking monitoring curve according to the number of the blocked SQL sentences, and sending the blocking monitoring curve to a client for display.
The blocking server may send a query request for the number of blocked SQL statements of the database instance to the database server, and the database server may obtain information of the number of blocked SQL statements of the corresponding database instance by confirming the global state re_number_re_request and send it to the blocking server. The blocking server can draw a blocking monitoring curve according to the information of the number of the SQL sentences of which the database instance is blocked and send the blocking monitoring curve to the client for display.
Fig. 4 is a schematic diagram showing a seal monitoring curve in the database fault loss stopping method according to the embodiment of the present invention.
According to the database fault loss prevention method provided by the embodiment of the invention, the number of the blocked SQL sentences of the database instance is obtained, the blocking monitoring curve is drawn according to the number of the blocked SQL sentences and is sent to the client for display, so that the monitoring of the blocking effect is realized.
The sealing server and the client can form a sealing platform to realize damage stopping of database faults.
FIG. 5 is a second flowchart of a database fault loss prevention method according to an embodiment of the present invention. As shown in FIG. 5, the method for stopping the database fault provided by the invention is described by taking MySQL server fault caused by abnormal flow sudden increase as an example. The database fault loss stopping method provided by the invention comprises the following steps:
(1) Monitoring a flow variable and identifying the occurrence of a flow bump: traffic conditions may be monitored using a third party service.
Fig. 6 is an example of a flow monitoring curve in the database fault loss prevention method according to the embodiment of the present invention. As shown in fig. 6, it can be seen that a sudden increase in flow occurs after 01:19:00.
(2) Locating abnormal SQL:
for a MySQL failure loss prevention scheme, an abnormal SQL is located first when a database encounters a traffic surge. The client of the blocking platform displays the SQL request currently being executed by executing the SHOW PROCESSLIST operation on the appointed instance, and for the scene of the flow jump, the SQL with higher concurrency of the current execution is usually abnormal SQL, so that the rapid positioning of the flow jump SQL type (the SQL type can be known according to the abnormal SQL) is realized.
(3) Extracting SQL fingerprints:
only the abnormal SQL type is positioned, and because the variable in the SQL is continuously changed, the variable in the SQL is subjected to general substitution to realize the sealing of the SQL of one type. If the variable replacement is not carried out, the SQL of the corresponding variable can be only blocked, and the function of stopping damage is not achieved. And (3) the sealing server of the sealing platform performs regular search according to the data type when the SQL fingerprint is extracted, and the matched result is replaced by a question mark through regularly matching the character strings in the number, the double-quotation number or the single-quotation number, so that the SQL fingerprint is obtained.
(4) Loading a query rewrite plug-in:
and after receiving the blocking command sent by the blocking server, the database server loads the query rewrite plug-in. MySQL 5.7 begins to support Query Rewrite plugins, installed as follows
shell>mysql-u root-p<install_rewriter.sql
Enter password:(enter root password here)
(5) Writing rewrite rules:
after the database server loads the query rewrite plug-in, rewrite rules are written to the corresponding database instance. For example, the SQL statement to be blocked is replaced by a "DO 1" instruction, the SQL fingerprint obtained in step (3) is written into the pattern field in the following statement, and the "DO 1" instruction is written into the replacement field. Wherein execution of the "DO 1" instruction returns the result set directly.
INSERT INTO query_rewrite.rewrite_rules(pattern,replacement)
VALUES('SELECT?','DO 1');
(6) Establishing an SQL (structured query language) forbidden list:
in order to facilitate the management of SQL blocking rules, the rewriting rules are synchronously updated into the database table of the blocking server after being written into MySQL instances to be blocked. The table construction statement of the database table is as follows:
Figure BDA0003648023050000161
the database table of the blocking server records SQL fingerprints, the rewritten SQL, database examples, related to DB (database name), operator, blocking state, primary key ID (which can be consistent with example ID and is used for distinguishing abnormal SQL of different database examples), creation time, update time and other information. The SQL blocking list may expose key fields in the database table and may be exposed at the client.
(7) Triggering the rewrite rules to take effect:
the database instance will not take effect immediately after writing the rewrite rules, and the rewrite rules to be written need to be triggered to take effect by using the query rewrite plug-in to call the trigger function, and the specific instructions are as follows:
mysql>set global rewriter_enabled=on;
mysql>CALL query_rewrite.flush_rewrite_rules();
(8) Displaying a forbidden monitoring curve:
to facilitate validating SQL blocking results, this may be accomplished by confirming whether the global state rewriter_number_rewritten_queries grows:
mysql>show global status like'rewriter_number_rewritten_queries';
the blocking server obtains the results of the global state rewriter_number_rewritten_queries for each database instance to reveal a blocking monitoring curve. The shutdown monitoring curve for re_number_re_request is shown in fig. 4.
The quick sealing and disabling of the SQL is finished, the sealing and disabling rule is deleted from the MySQL instance after the flow is restored, and the SQL sealing and disabling list is cleaned, so that the downloading of the SQL sealing and disabling rule is finished.
The database fault loss stopping method provided by the embodiment of the invention has the following technical effects:
1. the average loss stopping time in the online service fault loss stopping is less than 5 minutes, and the timeliness can meet the availability requirement of 99.99% of service.
2. For the service with the front end lacking current limiting, SQL sealing and forbidden become a traffic damage-stopping bottom-covering strategy, and the feasibility of the invention is fully verified by on-line multiple fault processing.
The database fault loss prevention device provided by the embodiment of the invention is described below, and the database fault loss prevention device described below and the database fault loss prevention method described above can be referred to correspondingly.
Fig. 7 is a schematic structural diagram of a database fault loss prevention device according to an embodiment of the present invention. As shown in fig. 7, the apparatus includes an abnormal SQL information determination module 10, an SQL fingerprint acquisition module 20, and a blocking module 30, wherein: the abnormal SQL information determining module 10 is used for: determining an abnormal SQL statement to be blocked and a database instance in which the abnormal SQL statement is located; the SQL fingerprint acquisition module 20 is used for: extracting SQL fingerprints according to the abnormal SQL sentences; the SQL fingerprint is used for representing a class of SQL sentences to which the abnormal SQL sentences belong; the disabling module 30 is configured to: and sending a blocking command to a database server where the database instance is located, wherein the blocking command comprises an instance ID of the database instance, the SQL fingerprint and an overwriting rule of an SQL statement corresponding to the SQL fingerprint, so that the database server writes the overwriting rule into the database instance according to the instance ID and the SQL fingerprint after receiving the blocking command, and triggers the overwriting rule to take effect.
According to the database fault loss stopping device provided by the embodiment of the invention, the SQL request can be executed according to the rewritten SQL statement by rewriting the abnormal SQL statement, the quick processing and the result return of the abnormal SQL statement can be realized, and the database fault loss stopping can be effectively and quickly realized.
According to the database fault loss stopping device provided by the embodiment of the invention, the rewriting rule comprises: and replacing the SQL statement corresponding to the SQL fingerprint with an instruction for directly returning a result set.
According to the database fault loss stopping device provided by the embodiment of the invention, the SQL fingerprint is replaced by the instruction for directly returning the result set by setting the rewriting rule, so that the speed of database fault loss stopping is further improved.
According to the database fault loss-stopping device provided in the embodiment of the present invention, before the sending of the blocking command to the database server where the database instance is located, the blocking module 30 is further configured to: and receiving the rewrite rules sent by the client.
The database fault loss stopping device provided by the embodiment of the invention can realize the custom processing of the rewriting rules by receiving the rewriting rules sent by the client.
According to the database fault loss prevention device provided by the embodiment of the invention, the abnormal SQL information determination module 10 is specifically configured to: sending information of a database instance with abnormality to a client; receiving a query instruction of the SQL request of the database instance initiated by the client; sending the query instruction to the database server where the database instance is located; receiving a query result of the query instruction returned by the database server, wherein the query result comprises an SQL request being executed by the database instance; sending the query result to the client for display; receiving the abnormal SQL statement to be blocked and the information of the database instance where the abnormal SQL statement is located, which are determined by the client according to the query result; or receiving the abnormal SQL statement to be blocked and the information of the database instance where the abnormal SQL statement is located, which are input by the client.
According to the database fault loss prevention device provided by the embodiment of the invention, the abnormal SQL statement to be blocked and the database instance where the abnormal SQL statement is located are determined according to the abnormal condition of the database instance, or the abnormal SQL statement to be blocked and the database instance where the abnormal SQL statement is located are determined according to the input result of the client, so that different requirements are met, and the flexibility is improved.
According to the database fault loss stopping device provided by the embodiment of the present invention, after the blocking module 30 is configured to send a blocking command to the database server where the database instance is located, the blocking module is further configured to: writing the blocking information into a database table, and displaying a blocking list at a client according to the database table; the seal information comprises at least one of the SQL fingerprint, the rewritten SQL statement, the database instance, the database name, the operator, the seal state, the instance ID and the time information; the forbidden list comprises all or part of forbidden information and supports inquiry according to preset forbidden information; and/or triggering the database server to create or update a rewrite rule table according to the blocking command, wherein the rewrite rule table comprises the instance ID and the rewrite rule.
According to the database fault loss stopping device provided by the embodiment of the invention, after the sealing command is sent to the database server where the database instance is located, the sealing information is written into the data table, and the sealing list is displayed at the client according to the database table, so that the client can conveniently inquire the sealing information; by triggering the database server to create or update the rewrite rule table according to the blocking command, the rewrite rule table can be used for writing in the rewrite rules after the database instance is restarted, and the reliability is improved.
According to the database fault loss stopping device provided by the embodiment of the invention, the blocking module 30 is further configured to: receiving a forbidden state change instruction sent by the client; wherein the blocking state change instruction includes information of at least one database instance to be subjected to blocking state change; the database server where the database instance is located is obtained respectively, and the forbidden state change instruction of the database instance is sent to the database server so that the database server can execute corresponding forbidden state change on the corresponding database instance; the forbidden state changing instruction comprises at least one of forbidden state forbidden instruction, forbidden state enabling instruction and forbidden deletion instruction.
According to the database fault loss prevention device provided by the embodiment of the invention, the blocking state change instruction sent by the client is received, and the database server is triggered to change the blocking state of the corresponding database instance according to the blocking state change instruction, so that the effective management of the blocking state is realized.
According to the database fault loss stopping device provided by the embodiment of the invention, the blocking module 30 is further configured to: and acquiring the number of the blocked SQL sentences of the database instance, drawing a blocking monitoring curve according to the number of the blocked SQL sentences, and sending the blocking monitoring curve to a client for display.
According to the database fault loss prevention device provided by the embodiment of the invention, the number of the blocked SQL sentences of the database instance is obtained, the blocking monitoring curve is drawn according to the number of the blocked SQL sentences and is sent to the client for display, so that the monitoring of the blocking effect is realized.
Fig. 8 illustrates a physical structure diagram of an electronic device, as shown in fig. 8, which may include: processor 810, communication interface (Communications Interface) 820, memory 830, and communication bus 840, wherein processor 810, communication interface 820, memory 830 accomplish communication with each other through communication bus 840. Processor 810 may invoke logic instructions in memory 830 to perform a database fault loss prevention method comprising: determining an abnormal SQL statement to be blocked and a database instance in which the abnormal SQL statement is located; extracting SQL fingerprints according to the abnormal SQL sentences; the SQL fingerprint is used for representing a class of SQL sentences to which the abnormal SQL sentences belong; and sending a blocking command to a database server where the database instance is located, wherein the blocking command comprises an instance ID of the database instance, the SQL fingerprint and an overwriting rule of an SQL statement corresponding to the SQL fingerprint, so that the database server writes the overwriting rule into the database instance according to the instance ID and the SQL fingerprint after receiving the blocking command, and triggers the overwriting rule to take effect.
Further, the logic instructions in the memory 830 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, embodiments of the present invention also provide a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform a database fault loss prevention method provided by the above methods, the method comprising: determining an abnormal SQL statement to be blocked and a database instance in which the abnormal SQL statement is located; extracting SQL fingerprints according to the abnormal SQL sentences; the SQL fingerprint is used for representing a class of SQL sentences to which the abnormal SQL sentences belong; and sending a blocking command to a database server where the database instance is located, wherein the blocking command comprises an instance ID of the database instance, the SQL fingerprint and an overwriting rule of an SQL statement corresponding to the SQL fingerprint, so that the database server writes the overwriting rule into the database instance according to the instance ID and the SQL fingerprint after receiving the blocking command, and triggers the overwriting rule to take effect.
In yet another aspect, an embodiment of the present invention further provides a non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor, is implemented to perform the above-provided database fault loss prevention methods, the method comprising: determining an abnormal SQL statement to be blocked and a database instance in which the abnormal SQL statement is located; extracting SQL fingerprints according to the abnormal SQL sentences; the SQL fingerprint is used for representing a class of SQL sentences to which the abnormal SQL sentences belong; and sending a blocking command to a database server where the database instance is located, wherein the blocking command comprises an instance ID of the database instance, the SQL fingerprint and an overwriting rule of an SQL statement corresponding to the SQL fingerprint, so that the database server writes the overwriting rule into the database instance according to the instance ID and the SQL fingerprint after receiving the blocking command, and triggers the overwriting rule to take effect.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (9)

1. A database fault loss prevention method, comprising:
determining an abnormal SQL statement to be blocked and a database instance in which the abnormal SQL statement is located;
extracting SQL fingerprints according to the abnormal SQL sentences; the SQL fingerprint is used for representing a class of SQL sentences to which the abnormal SQL sentences belong;
sending a blocking command to a database server where the database instance is located, wherein the blocking command comprises an instance ID of the database instance, the SQL fingerprint and an overwriting rule of an SQL statement corresponding to the SQL fingerprint, so that the database server writes the overwriting rule into the database instance according to the instance ID and the SQL fingerprint after receiving the blocking command, and triggers the overwriting rule to take effect; wherein the rewrite rule includes: and replacing the SQL statement corresponding to the SQL fingerprint with an instruction which directly returns to the normal result set.
2. The database fault loss prevention method of claim 1, further comprising, prior to said sending a seal command to a database server where said database instance is located: and receiving the rewrite rules sent by the client.
3. The database fault loss prevention method of claim 1, wherein,
the determining the abnormal SQL statement to be blocked and the database instance where the abnormal SQL statement is located includes: sending information of a database instance with abnormality to a client; receiving a query instruction of the SQL request of the database instance initiated by the client; sending the query instruction to the database server where the database instance is located; receiving a query result of the query instruction returned by the database server, wherein the query result comprises an SQL request being executed by the database instance; sending the query result to the client for display; receiving the abnormal SQL statement to be blocked and the information of the database instance where the abnormal SQL statement is located, which are determined by the client according to the query result;
or, the determining the abnormal SQL statement to be blocked and the database instance where the abnormal SQL statement is located includes: and receiving the abnormal SQL statement to be blocked and the information of the database instance where the abnormal SQL statement is located, which are input by the client.
4. The database fault loss prevention method of claim 1, further comprising, after said sending a seal command to a database server where said database instance is located:
Writing the blocking information into a database table, and displaying a blocking list at a client according to the database table; the seal information comprises at least one of the SQL fingerprint, the rewritten SQL statement, the database instance, the database name, the operator, the seal state, the instance ID and the time information; the forbidden list comprises all or part of forbidden information and supports inquiry according to preset forbidden information;
and/or triggering the database server to create or update a rewrite rule table according to the blocking command, wherein the rewrite rule table comprises the instance ID and the rewrite rule.
5. The database fault loss prevention method of claim 4, further comprising:
receiving a forbidden state change instruction sent by the client; wherein the blocking state change instruction includes information of at least one database instance to be subjected to blocking state change;
the database server where the database instance is located is obtained respectively, and the forbidden state change instruction of the database instance is sent to the database server so that the database server can execute corresponding forbidden state change on the corresponding database instance;
The forbidden state changing instruction comprises at least one of forbidden state forbidden instruction, forbidden state enabling instruction and forbidden deletion instruction.
6. The database fault loss prevention method of claim 1, further comprising:
and acquiring the number of the blocked SQL sentences of the database instance, drawing a blocking monitoring curve according to the number of the blocked SQL sentences, and sending the blocking monitoring curve to a client for display.
7. A database fault loss prevention device, comprising:
the abnormal SQL information determining module is used for: determining an abnormal SQL statement to be blocked and a database instance in which the abnormal SQL statement is located;
the SQL fingerprint acquisition module is used for: extracting SQL fingerprints according to the abnormal SQL sentences; the SQL fingerprint is used for representing a class of SQL sentences to which the abnormal SQL sentences belong;
the sealing and forbidden module is used for: sending a blocking command to a database server where the database instance is located, wherein the blocking command comprises an instance ID of the database instance, the SQL fingerprint and an overwriting rule of an SQL statement corresponding to the SQL fingerprint, so that the database server writes the overwriting rule into the database instance according to the instance ID and the SQL fingerprint after receiving the blocking command, and triggers the overwriting rule to take effect; wherein the rewrite rule includes: and replacing the SQL statement corresponding to the SQL fingerprint with an instruction which directly returns to the normal result set.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the database fault loss prevention method according to any of claims 1 to 6 when the program is executed by the processor.
9. A non-transitory computer readable storage medium, having stored thereon a computer program, which when executed by a processor, implements the steps of the database fault loss prevention method according to any of claims 1 to 6.
CN202210540508.5A 2022-05-17 2022-05-17 Database fault loss stopping method, device, electronic equipment, medium and program product Active CN115185921B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210540508.5A CN115185921B (en) 2022-05-17 2022-05-17 Database fault loss stopping method, device, electronic equipment, medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210540508.5A CN115185921B (en) 2022-05-17 2022-05-17 Database fault loss stopping method, device, electronic equipment, medium and program product

Publications (2)

Publication Number Publication Date
CN115185921A CN115185921A (en) 2022-10-14
CN115185921B true CN115185921B (en) 2023-06-16

Family

ID=83513046

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210540508.5A Active CN115185921B (en) 2022-05-17 2022-05-17 Database fault loss stopping method, device, electronic equipment, medium and program product

Country Status (1)

Country Link
CN (1) CN115185921B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10162729B1 (en) * 2016-02-01 2018-12-25 State Farm Mutual Automobile Insurance Company Automatic review of SQL statement complexity
CN111026963A (en) * 2019-12-04 2020-04-17 贝壳技术有限公司 Data query method and device, and configuration information setting method and device
CN113434529A (en) * 2021-06-22 2021-09-24 青岛海尔科技有限公司 Business data query method and device, storage medium, processor and electronic equipment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105046150B (en) * 2015-08-06 2017-10-17 福建天晴数码有限公司 Prevent the method and system of SQL injection
CN106919678A (en) * 2017-02-27 2017-07-04 武汉珞佳伟业科技有限公司 A kind of database inquiry optimization system and method
CN112988786B (en) * 2021-05-12 2022-04-05 北京优炫软件股份有限公司 Database maintenance method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10162729B1 (en) * 2016-02-01 2018-12-25 State Farm Mutual Automobile Insurance Company Automatic review of SQL statement complexity
CN111026963A (en) * 2019-12-04 2020-04-17 贝壳技术有限公司 Data query method and device, and configuration information setting method and device
CN113434529A (en) * 2021-06-22 2021-09-24 青岛海尔科技有限公司 Business data query method and device, storage medium, processor and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
樊红珍 ; .SQL注入自动化检测关键技术研究.计算机与网络.2017,(第06期),第46-47页. *

Also Published As

Publication number Publication date
CN115185921A (en) 2022-10-14

Similar Documents

Publication Publication Date Title
JP5075736B2 (en) System failure recovery method and system for virtual server
CN107451040B (en) Method and device for positioning fault reason and computer readable storage medium
CN105074698A (en) Executing continuous event processing (CEP) queries in parallel
US9514176B2 (en) Database update notification method
US11061889B2 (en) Systems and methods of managing manifest refresh in a database
US20190102477A1 (en) Novel metadata relationships in a configuration management database
CN109361553B (en) Configuration rollback method and device
CN112749050B (en) Micro-service-framework-based safety circuit breaking method and device and computing equipment
CN111367725A (en) Asynchronous task online monitoring method, front-end control system and service response platform
CN114528350A (en) Cluster split brain processing method, device and equipment and readable storage medium
US20100057787A1 (en) Method, system, and computer program product for cloning of distributed and stateful systems
CN115185921B (en) Database fault loss stopping method, device, electronic equipment, medium and program product
CN113672471A (en) Software monitoring method, device, equipment and storage medium
JP2006025434A (en) System and method for high capacity fault correlation
CN111611058A (en) Task execution method and device and electronic equipment
CN108304699A (en) A kind of method and device that security software is protected
US11093485B2 (en) Branch-based recovery in a database system
CN114791900A (en) Operator-based Redis operation and maintenance method, device, system and storage medium
US10949232B2 (en) Managing virtualized computing resources in a cloud computing environment
JP5466740B2 (en) System failure recovery method and system for virtual server
CN112269677A (en) Rollback operation device, method, equipment and medium under heterogeneous cloud platform
CN112540897B (en) Database monitoring method, device, server and medium
CN117251500B (en) Dynamic read-write separation method for database
CN114666250B (en) Method for keeping consistency of data and state in security software system
US11847104B1 (en) Method and system for facilitating database migration

Legal Events

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