CN109165143A - Database detection method, system, server and storage medium - Google Patents

Database detection method, system, server and storage medium Download PDF

Info

Publication number
CN109165143A
CN109165143A CN201810941949.XA CN201810941949A CN109165143A CN 109165143 A CN109165143 A CN 109165143A CN 201810941949 A CN201810941949 A CN 201810941949A CN 109165143 A CN109165143 A CN 109165143A
Authority
CN
China
Prior art keywords
database
information
detection
target journaling
log
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810941949.XA
Other languages
Chinese (zh)
Inventor
吴子涵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhangjiagang Kangdexin Optronics Material Co Ltd
Original Assignee
Zhangjiagang Kangdexin Optronics Material 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 Zhangjiagang Kangdexin Optronics Material Co Ltd filed Critical Zhangjiagang Kangdexin Optronics Material Co Ltd
Priority to CN201810941949.XA priority Critical patent/CN109165143A/en
Publication of CN109165143A publication Critical patent/CN109165143A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • G06F11/3072Monitoring arrangements determined by the means or processing involved in reporting the monitored data where the reporting involves data filtering, e.g. pattern matching, time or event triggered, adaptive or policy-based reporting

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention discloses a kind of database detection method, system, server and storage mediums, this method comprises: obtaining target journaling information corresponding with the detection request when receiving the detection request to database;The detection script pre-established is called to detect the target journaling information, the operating status of the database is determined according to the testing result, the technical solution of the embodiment of the present invention solves when judging whether the operation of database is abnormal in the prior art, need to be manually entered the exception information that keyword is gone in inquiry database, it is taken a long time using mode at this time, efficiency is lower, and the exponential growth of information over time in database, workload is bigger when using such judgment mode again, more reduce working efficiency, it realizes and the information in database is filtered automatically by the script pre-established, improve the technical effect of database detection efficiency.

Description

Database detection method, system, server and storage medium
Technical field
The present embodiments relate to field of computer technology more particularly to a kind of database detection method, system, equipment and Storage medium.
Background technique
The business data important to an enterprise is generally stored in database, with the increasing of enterprise operation time Data volume caused by long can be increasing, if the data in database are in the process of running, Database Systems stop suddenly It runs or other failures occurs, necessarily will affect the production of enterprise and bring certain economic loss to enterprise, therefore how Guarantee that the normal operation of Database Systems becomes key.
Ensure in the prior art database operate normally frequently with embodiment be: database operation all information it is equal It is stored in journal file, to judge that database operation with the presence or absence of exception, needs user to be manually entered keyword from data Error message is filtered out in the journal file in library.Due to needing the manual input inquiry error message of user, it is understood that there may be look within several days Ask it is primary, when inquire there are when error message may error message have existed several days, therefore exist to error message Reason not in time, delay time at stop longer technical problem;Further, with the variation of database runing time, databases The information of storage can become more and more, when staff is believed by being manually entered the modes such as inquiry filter false from database again The technical issues of when breath, workload is very big, there is the labour cost for improving user at this time and reduces working efficiency.
Summary of the invention
The embodiment of the present invention provides a kind of database detection method, system, equipment and storage medium, to realize automatic detection The operating status of database improves detection efficiency and reduces the technical effect of labour cost.
In a first aspect, the embodiment of the invention provides a kind of database detection methods, this method comprises:
When receiving the detection request to database, target journaling information corresponding with the detection request is obtained;
It calls the detection script pre-established to detect the target journaling information, is determined according to the testing result The operating status of the database.
Second aspect, the embodiment of the invention also provides a kind of database detection system, which includes:
Log information obtains module, for obtaining and requesting with the detection when receiving the detection request to database Corresponding target journaling information;
Database operating status determining module, for call the detection script pre-established to the target journaling information into Row detection, the operating status of the database is determined according to the testing result.
The third aspect, the embodiment of the invention also provides a kind of server, which includes:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processing Device realizes the database detection method as described in the embodiment of the present invention is any.
Fourth aspect, the embodiment of the present invention also provide a kind of storage medium comprising computer executable instructions, the meter Calculation machine executable instruction by computer processor when being executed for executing the database inspection as described in the embodiment of the present invention is any Survey method.
The technical solution of the embodiment of the present invention is by obtaining and the detection when receiving the detection request to database Request corresponding target journaling information;The detection script pre-established is called to detect the target journaling information, according to The testing result determines the operating status of the database, solve in the prior art by user be manually entered keyword from When searching error message in database, the lower technical problem of efficiency is taken a long time;And with the change of database runing time Change, the information of databases storage is more and more, then that there are labour costs when using such mode is higher, efficiency is lower and right Database Systems processing not in time there is technical issues that the operation of database, realize according to the detection pre-established Script automatically detect to the information in database and then determines whether the operation of database is abnormal, has both reduced labour Cost, and the technical effect for improving detection efficiency and the information in database capable of being handled in time.
Detailed description of the invention
In order to more clearly illustrate the technical scheme of the exemplary embodiment of the present invention, below to required in description embodiment The attached drawing to be used does a simple introduction.Obviously, the attached drawing introduced is present invention a part of the embodiment to be described Attached drawing, rather than whole attached drawings without creative efforts, may be used also for those of ordinary skill in the art To obtain other attached drawings according to these attached drawings.
Fig. 1 is a kind of database detection method flow schematic diagram provided by the embodiment of the present invention one;
Fig. 2 is a kind of database detection method flow schematic diagram provided by the embodiment of the present invention two;
Fig. 3 is a kind of database detection system structure diagram provided by the embodiment of the present invention three;
Fig. 4 is a kind of server architecture schematic diagram provided by the embodiment of the present invention four.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
Embodiment one
Fig. 1 is a kind of database detection method flow schematic diagram provided by the embodiment of the present invention one, and the present embodiment can fit Whether occurs abnormal situation for Test database, this method can be executed by database detection system, which can be with It is realized by way of software and/or hardware.
As described in Figure 1, the method for the present embodiment includes:
S110, when receiving the detection request to database, obtain corresponding with detection request target journaling and believe Breath.
Wherein, database can be understood as the warehouse of storage and management data.Database can store and record itself Operation data, the information such as state and user's access application, webpage when, whether corresponding program or webpage respond The information such as the program that user is triggered.The data information recorded in database further include whether access successfully, access time and The information such as amount of access.
It should be noted that user can write according to actual needs before the technical solution using the embodiment of the present invention Corresponding program code or corresponding Run Script detect database to realize.Program code (script) can be collected At in a computer or in other equipment for needing to detect database.User can by trigger the program code come Realize database detection, program code can also be set to timing and detected, optionally, daily morning a bit, the detection such as two o'clock The data run state of the previous day.The carrying out practically mode and runing time of program code are not limited thereto.
If the operation of program code needs user to trigger corresponding operation, can be triggering transports program code (script) Capable key, can also be understood as user's detection trigger database whether Yi Chang control instruction.Programming personnel can also be with Timing is set by its code to detect.
Wherein, when detection request can be understood as user and trigger the program code or script, the request that is programmed in script Instruction, i.e. detection request.Detection request may include default detection time information, that is to say, that be transferred a certain section of user Database operation information in time, for example, transfer the operation information of database in one day, in two days database operation information Deng.
It should be noted that can be set according to actual needs before programming personnel's programming data library detection code (script) Default detection time information is set, such as default detection time information can be, database of every two hour detection, every four Database of hour detection, detects database of a database or detection in every two days etc. daily.User can basis Default detection time in detection request determines target journaling information corresponding thereto.
Target journaling information can be the log that user wants in the preset time obtained or include setting keyword Information.Illustratively, database detection system is timing operation, and optionally, Test database is with the presence or absence of the abnormal time For daily two o'clock in the morning, presetting detection time is 24 hours, that is, the operating status of database of detection daily.Example Property, today be No. 19, No. 19 two o'clock in the morning from database log file obtain No. 18 24 hours in log information, And using the log information as target journaling information.
Based on the above technical solution it is found that the information of databases storage includes that number of passes is believed according to the operation in library itself The time of each website or application program and whether respond the information such as user that breath and user are accessed.Wherein, each Information is stored in the journal file of database, therefore is obtained log information corresponding with detection request and be understood that Are as follows: log information corresponding with the detection request in database log file is obtained, and the log information is stored in the In one destination document, using the log information in the first object document as target journaling information.
After getting log information corresponding with retrieval request, optionally, after obtaining No. 18 log informations, by 18 Number log information be stored in first object document.Wherein, first object document suffix can be .txt .doc .docx or Person .log etc., it is preferred that the suffix of first object document is .log, that is, the meaning of log, commonly used in record system or The processing information that the certain softwares of person have been completed, so as to will be as reference.It is usually text text there is no fixed format Part can be opened with notepad to check content.Most suffix is the work that the file of .log can find out it from filename With, such as uninstall.log or error.log, the former is usually the record generated in software installation process certainly, so as to Uninstaller use can be supplied to when unloading in the future, the latter is usually for recording the running mistake letter of some softwares Breath etc..The naming method of first object file in technical solution of the embodiment of the present invention can be date .log, for example, 20180719.log.On the one hand such naming method, which is advantageous in that, can recorde log letter corresponding with default detection time On the other hand breath transfers or manages the database operation information on corresponding date convenient for user.Illustratively, current date is 20180719, then first object document is named as 20180719.log, when receiving detection request, then before obtaining ten No. nine One day log information, that is, No. 18 log informations, and No. 18 log informations are stored in first object document, It is exactly stored in the document of entitled 20180719.log
The detection script that S120, calling pre-establish detects the target journaling information, is tied according to the detection Fruit determines the operating status of the database.
Wherein, the detection script pre-established can be understood as the program code (script) that programming personnel writes in advance, use In the operating status of Test database.Calling the detection script that pre-establishes to detect target journaling information specifically can be with Be: execute the detection script pre-established obtain in the target journaling information include at least one predetermined keyword target day Master chip section, wherein the keyword includes the identification information that referred database is operating abnormally;Correspondingly, described according to the inspection Survey the operating status that result determines the database, comprising: if detecting the presence of the target journaling segment, it is determined that the number Operating status according to library is misoperation.
Target journaling information is understood that according to the log information preset in the journal file of detection time called data library.It needs It is noted that the journal file in database can recorde the operation conditions of database itself and user accesses certain applications The information such as whether respond when program, webpage.When database self-operating goes wrong or webpage does not respond user, can all have Corresponding label can regard this label as predetermined keyword, that is to say, that the identification information that database is operating abnormally.Database The identification information of operation exception is usually that there are the logs piece segment informations such as fault, error or exclamation mark in log information.Cause The quantity of this predetermined keyword can be one two or more, specific quantity can be according to the number of abnormal identification information Amount is configured.Predetermined keyword can be what the identification databases such as null, fault, error or number combination were operating abnormally Information.Therefore, database fortune can be filtered out from target journaling information, that is, first object document according to predetermined keyword The abnormal log information of row.
Time for being operating abnormally for the ease of statistical data analysis library and it is abnormal concrete condition, it can will be according to extremely The log information that a few predetermined keyword filters out is stored into the second destination document.Wherein, the name of the second destination document Mode is also date .log, for recording the log information on date corresponding with detection request is issued.Second destination document this Sample name is advantageous in that, it can be determined that goes out database operation and there is the abnormal date and judge according to there is the abnormal date Database runs the date etc. for the problem that frequently occurs, and takes corresponding precautionary measures in advance convenient for user, optionally, which day is total Occur that abnormal, which day does not occur exception, frequently occurs the abnormal period, the information such as abnormal reason occurs, to data into Row analysis takes appropriate measures in advance convenient for user, and reduction database the frequency being operating abnormally occurs and can timely logarithm It is safeguarded according to library, and then improves user experience.
Based on the above technical solution, in order to judge database with the presence or absence of it is abnormal can be by judging the second target Whether document is sky, to determine whether database operation is abnormal.It specifically can be, when the second destination document is empty, illustrate root Log information corresponding with predetermined keyword is not detected from first object document according to predetermined keyword, that is to say, that data Library operates normally;It is screened from first object document when the second destination document is not sky, that is, according to preset keyword Log information corresponding with predetermined keyword is gone out, which can represent database operation and exception occur, in turn It is abnormal can to determine that database operating status corresponding with current date occurs, it can using the technical solution of the embodiment of the present invention Clearly to arrive which day specific which time hop counts according to inventory in exception information.
When determining that database operating status occurs abnormal, the target journaling segment is sent out in a manner of mail or information Give target terminal.Wherein, target journaling segment be understood that include predetermined keyword log information segment.Target terminal can To be interpreted as terminal used in data base administrator, optionally, mobile phone or computer etc..When detect database run When occurring abnormal, then by log segment or the second destination document to be sent to target use in the form of mail or in a manner of short breath Mobile terminal applied by family, to reach the technical effect for reminding user;It can also be to work as and detect that Database Systems occur When problem, during prompting to user's transmission information, server or equipment can also issue corresponding warning message Database is safeguarded to remind the needs to take appropriate measures.
The technical solution of the embodiment of the present invention is by obtaining and the detection when receiving the detection request to database Request corresponding target journaling information;The detection script pre-established is called to detect the target journaling information, according to The testing result determines the operating status of the database, solve in the prior art by user be manually entered keyword from When searching error message in database, the lower technical problem of efficiency is taken a long time;And with the change of database runing time Change, the information of databases storage is more and more, then that there are labour costs when using such mode is higher, efficiency is lower and right Database Systems processing not in time there is technical issues that the operation of database, realize according to the detection pre-established Script automatically detect to the information in database and then determines whether the operation of database is abnormal, has both reduced labour Cost, and the technical effect for improving detection efficiency and the information in database capable of being handled in time.
Based on the above technical solution, after the operating status for determining database according to testing result, further includes: It re-establishes destination document and deletes the first object document;And/or delete database log file in the target The corresponding log information of log information.
It should be noted that first object document is either one or more.Optionally, first object document is One, when receiving detection request, then first object document can be deleted and be reappeared and establish a first object document, it will be from The log information corresponding with detection request got in database log file is stored in the first object text re-established In shelves, certainly, the destination document re-established is corresponding with current date;There are at least one destination documents can be whenever connecing When receiving detection request, a destination document corresponding with current date will be automatically created, and will most newly created target Document can be by it when obtaining log information from database log file according to detection request as first object document It is stored in first object document, that is, in destination document corresponding with current date.Certainly, in the process of practical application In in order to avoid the case where data information of database purchase excessively leads to database redundancy appearance, database day can also be deleted Log information corresponding with the log information stored in first object document in will file, it is possible to understand that are as follows: when according to detection Request, can will be identical with the information in database after obtaining log information corresponding thereto in database log file Log information is deleted, to realize reduction database redundancy.
Embodiment two
As a preferred embodiment of above-described embodiment, Fig. 2 is a kind of database inspection provided by the embodiment of the present invention two Method flow schematic diagram is surveyed, as described in Figure 2, the method for the embodiment of the present invention includes:
S201, date created file.
It should be noted that the script that each step in the embodiment of the present invention can be pre-established by programming personnel Come what is realized.When the whether abnormal key of user's detection trigger database, then can automatically create corresponding with current date Date file, optionally, the date for creating file is 20180719.The date file suffix of creation can be word, txt or Log etc., it is preferred that the date file suffix of creation is .log.Wherein, the date file is on the day before recording current date Database operation information.Illustratively, the current date is July ten No. nine, then the date file created can be 20180719.log。
S202, one day log information is extracted from Database Systems journal file, and the log information is deposited in In the date file of creation.
It is extracted from database log file according to default detection time information corresponding with default detection time information It is complete to can be ten No. eight 24 hours of July stored in ten No. nine extraction database log files in July for log information Portion's log information is also possible to partial log information, and certainly default detection time is also possible to setting detection in two days once, works as inspection Two days log informations are directly acquired when survey;Detection in three days is primary, and three days log informations etc. are directly acquired when detection, if Detection in two days is primary, then being exactly to extract ten No. eight July ten No. seven, 48 hours two days log informations in July.The present invention The technical solution of embodiment extracts ten No. nine by taking the database operating status of detection in one day as an example from database log file Ten No. eight log informations of the previous day, and the log information of extraction is stored in date file corresponding with current date, It is namely to be stored in ten No. eight log informations in ten No. nine files of creation.
S203, Database Systems journal file is emptied.
When the detection mode to database is that detection in one day is primary, then can by the log information on the day before current date from It takes out and is stored in document corresponding with current date in database.It, can will be from this time in order to reduce the redundancy of database The log information taken out in database is deleted, that is, the decimated log information in the library system that clears data, in turn Reduce the redundancy of database.
S204, error message corresponding with the keyword is filtered out from the date file of creation according to keyword, And the error message is deposited in specified document.
The operating status and user that database itself is had recorded in database log file trigger corresponding program or The case where whether time, clicking rate and the program or the page of the page respond user, therefore can in the journal file of database With misregistration information or the information not responded.That is by the information in the date document that is extracted into it may determine that The operating status in one day data library, that is, may determine that according to the information stored in the entitled 20180719.log of date file The operating status in 18 number library of the previous day.Specific judgment mode can be, according to preset keyword, wherein keyword It can be operation and mark fault, error of mistake or the information such as exclamation mark occur, by these information from the date of creation Log information corresponding with the keyword is filtered out in file.
Which obtains for the ease of the error message of statistic record database appearance and by error message progress inducing classification A kind of mistake that information occurs is more and is taken appropriate measures according to error message, the error message of database can be stored Into specified destination document, that is to say, that store the error message filtered out from date file according to preset keyword Into specified document.
S205, judge whether the specified document is sky, if it is not, then executing S206;If so, executing S207.
When not filtering out error message from the date file of creation according to preset keyword, then specifying document is ineffective law, rule, etc. Shelves;When having filtered out error message from the date file of creation according to keyword, that is to say, that storage has letter in specified document Breath, then determine that there are error messages in database operational process, it is understood that there is exception for database operation, then executes S206。
There is exception in S206, database, prompt user.
It is not sky when detecting in specified document, that is to say, that have the corresponding log for having predetermined keyword in specified document When information, then it is assumed that filtered out error message by predetermined keyword, that is to say, that database exists abnormal.When detecting number When abnormal according to inventory, then the error message in specified document target terminal is sent to remind user, it is specific to send out It send mode can be and is sent to target terminal corresponding with target user, optional mobile phone by way of mail or short message Or computer etc., to reach the technical effect for reminding user.
S207, database normal operation.
When specified document is empty, then it is assumed that there is no mistake letters from the log information transferred in database log file Breath, database normal operation.
The technical solution of the embodiment of the present invention is by obtaining and the detection when receiving the detection request to database Request corresponding target journaling information;The detection script pre-established is called to detect the target journaling information, according to The testing result determines the operating status of the database, solve in the prior art by user be manually entered keyword from When searching error message in database, the lower technical problem of efficiency is taken a long time;And with the change of database runing time Change, the information of databases storage is more and more, then that there are labour costs when using such mode is higher, efficiency is lower and right Database Systems processing not in time there is technical issues that the operation of database, realize according to the detection pre-established Script automatically detect to the information in database and then determines whether the operation of database is abnormal, has both reduced labour Cost, and the technical effect for improving detection efficiency and the information in database capable of being handled in time.
Embodiment three
Fig. 3 is a kind of database detection system structure diagram provided by the embodiment of the present invention three, which includes: day Will data obtaining module 310 and database operating status determining module 320.
Wherein, log information obtain module 310, for when receive to database detection request when, obtain with it is described Corresponding target journaling information is requested in detection;Database operating status determining module 320, for calling the detection foot pre-established This detects the target journaling information, and the operating status of the database is determined according to the testing result.
Based on the above technical solution, the log information obtains module and is also used to: obtaining database log file In log information corresponding with the detection request, and the log information is stored in first object document, by described Log information in one destination document is as target journaling information.
On the basis of above-mentioned each technical solution, the detection request includes default detection time information;Correspondingly, described Log information obtains module, comprising: obtains database log file, goes out the number according to the default detection time information sifting According to log information corresponding with the default detection time information in the journal file of library as target journaling information.
On the basis of above-mentioned each technical solution, the database operating status determining module is true according to the testing result After the operating status of the fixed database, further includes: first deletes unit, for re-establishing destination document and by described the One destination document is deleted;And/or second delete unit, for delete in database log file with the target journaling information Corresponding log information.
On the basis of above-mentioned each technical solution, the database operating status determining module is also used to execute and build in advance Vertical detection script obtains the target journaling segment in the target journaling information including at least one predetermined keyword, wherein The keyword includes the identification information that referred database is operating abnormally;Correspondingly, described that institute is determined according to the testing result State the operating status of database, comprising: if detecting the presence of the target journaling segment, it is determined that the operation shape of the database State is misoperation.
On the basis of above-mentioned each technical solution, the target journaling is obtained in the detection script pre-established that executes After target journaling segment in information including at least one predetermined keyword, further includes: store the target journaling segment In the second destination document;Correspondingly, described to detect the presence of the target journaling segment, comprising: if detecting described second When destination document is empty file, it is determined that the database operating status is to operate normally;If detecting the second target text Shelves are not empty file, it is determined that there are the target journaling segments for second destination document.
On the basis of above-mentioned each technical solution, described device further include: reminding module, for being run in the database After state determining module determines that the operating status of the database is misoperation, by the target journaling segment with mail or The mode of information is sent to target terminal.
The technical solution of the embodiment of the present invention is by obtaining and the detection when receiving the detection request to database Request corresponding target journaling information;The detection script pre-established is called to detect the target journaling information, according to The testing result determines the operating status of the database, solve in the prior art by user be manually entered keyword from When searching error message in database, the lower technical problem of efficiency is taken a long time;And with the change of database runing time Change, the information of databases storage is more and more, then that there are labour costs when using such mode is higher, efficiency is lower and right Database Systems processing not in time there is technical issues that the operation of database, realize according to the detection pre-established Script automatically detect to the information in database and then determines whether the operation of database is abnormal, has both reduced labour Cost, and the technical effect for improving detection efficiency and the information in database capable of being handled in time.
Data provided by any embodiment of the invention can be performed in database detection system provided by the embodiment of the present invention Library detection method has the corresponding functional module of execution method and beneficial effect.
It is worth noting that, each unit included by above system and module are only divided according to function logic , but be not limited to the above division, as long as corresponding functions can be realized;In addition, the specific name of each functional unit Title is also only for convenience of distinguishing each other, and is not intended to restrict the invention the protection scope of embodiment.
Example IV
Fig. 4 is a kind of structural schematic diagram for server that the embodiment of the present invention four provides.Fig. 4, which is shown, to be suitable for being used to realizing The block diagram of the exemplary servers 40 of embodiment of the embodiment of the present invention.The server 40 that Fig. 4 is shown is only an example, no The function and use scope for coping with the embodiment of the present invention bring any restrictions.
As shown in figure 4, server 40 is showed in the form of universal computing device.The component of server 40 may include but not Be limited to: one or more processor or processing unit 401, system storage 402, connecting different system components (including is Unite memory 402 and processing unit 401) bus 403.
Bus 403 indicates one of a few class bus structures or a variety of, including memory bus or Memory Controller, Peripheral bus, graphics acceleration port, processor or the local bus using any bus structures in a variety of bus structures.It lifts For example, these architectures include but is not limited to industry standard architecture (ISA) bus, microchannel architecture (MAC) Bus, enhanced isa bus, Video Electronics Standards Association (VESA) local bus and peripheral component interconnection (PCI) bus.
Server 40 typically comprises a variety of computer system readable media.These media can be and any can be serviced The usable medium that device 40 accesses, including volatile and non-volatile media, moveable and immovable medium.
System storage 402 may include the computer system readable media of form of volatile memory, such as deposit at random Access to memory (RAM) 404 and/or cache memory 405.Server 40 may further include it is other it is removable/can not Mobile, volatile/non-volatile computer system storage medium.Only as an example, storage system 406 can be used for reading and writing not Movably, non-volatile magnetic media (Fig. 4 do not show, commonly referred to as " hard disk drive ").It although not shown in fig 4, can be with The disc driver for reading and writing to removable non-volatile magnetic disk (such as " floppy disk ") is provided, and non-volatile to moving The CD drive of CD (such as CD-ROM, DVD-ROM or other optical mediums) read-write.In these cases, each driving Device can be connected by one or more data media interfaces with bus 403.Memory 402 may include at least one program Product, the program product have one group of (for example, at least one) program module, these program modules are configured to perform the present invention The function of each embodiment.
Program/utility 408 with one group of (at least one) program module 407, can store in such as memory In 402, such program module 407 includes but is not limited to operating system, one or more application program, other program modules And program data, it may include the realization of network environment in each of these examples or certain combination.Program module 407 Usually execute the function and/or method in embodiment described in the invention.
Server 40 can also be with one or more external equipments 409 (such as keyboard, sensing equipment, display 410 etc.) Communication, can also be enabled a user to one or more equipment interact with the server 40 communicate, and/or with make the service Any equipment (such as network interface card, modem etc.) that device 40 can be communicated with one or more of the other calculating equipment is logical Letter.This communication can be carried out by input/output (I/O) interface 411.Also, server 40 can also pass through Network adaptation Device 412 and one or more network (such as local area network (LAN), wide area network (WAN) and/or public network, such as internet) Communication.As shown, network adapter 412 is communicated by bus 403 with other modules of server 40.Although should be understood that It is not shown in Fig. 4, other hardware and/or software module can be used in conjunction with server 40, including but not limited to: microcode is set Standby driver, redundant processing unit, external disk drive array, RAID system, tape drive and data backup storage system System etc..
Processing unit 401 by the program that is stored in system storage 402 of operation, thereby executing various function application with And data processing, such as realize a kind of database detection method provided by the embodiment of the present invention.
Embodiment five
The embodiment of the present invention five also provides a kind of storage medium comprising computer executable instructions, and the computer can be held Row instruction by computer processor when being executed for executing a kind of database detection method.
The computer storage medium of the embodiment of the present invention, can be using any of one or more computer-readable media Combination.Computer-readable medium can be computer-readable signal media or computer readable storage medium.It is computer-readable Storage medium for example may be-but not limited to-the system of electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, device or Device, or any above combination.The more specific example (non exhaustive list) of computer readable storage medium includes: tool There are electrical connection, the portable computer diskette, hard disk, random access memory (RAM), read-only memory of one or more conducting wires (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD- ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.In this document, computer-readable storage Medium can be any tangible medium for including or store program, which can be commanded execution system, device or device Using or it is in connection.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for By the use of instruction execution system, device or device or program in connection.
The program code for including on computer-readable medium can transmit with any suitable medium, including --- but it is unlimited In wireless, electric wire, optical cable, RF etc. or above-mentioned any appropriate combination.
Can with one or more programming languages or combinations thereof come write for execute the embodiment of the present invention operation Computer program code, described program design language include object oriented program language-such as Java, Smalltalk, C++ further include conventional procedural programming language --- such as " C " language or similar program design language Speech.Program code can be executed fully on the user computer, partly be executed on the user computer, as an independence Software package execute, part on the user computer part execute on the remote computer or completely in remote computer or It is executed on server.In situations involving remote computers, remote computer can pass through the network of any kind --- packet It includes local area network (LAN) or wide area network (WAN)-is connected to subscriber computer, or, it may be connected to outer computer (such as benefit It is connected with ISP by internet).
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation, It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.

Claims (10)

1. a kind of database detection method characterized by comprising
When receiving the detection request to database, target journaling information corresponding with the detection request is obtained;
The detection script pre-established is called to detect the target journaling information, according to testing result determination The operating status of database.
2. the method according to claim 1, wherein described obtain target journaling corresponding with the detection request Information, further includes:
Log information corresponding with the detection request in database log file is obtained, and the log information is stored in the In one destination document, using the log information in the first object document as target journaling information.
3. according to the method described in claim 2, it is characterized in that, detection request includes default detection time information;
Correspondingly, target journaling information corresponding with the detection request in the acquisition database log file, comprising:
Obtain database log file, according to the default detection time information sifting go out in the database log file with institute The corresponding log information of default detection time information is stated as target journaling information.
4. according to the method described in claim 3, it is characterized in that, in the fortune for determining the database according to the testing result After row state, further includes:
It re-establishes destination document and deletes the first object document;And/or
Delete log information corresponding with the target journaling information in database log file.
5. the method according to claim 1, wherein described call the detection script pre-established to the target Log information is detected, comprising:
The detection script that execution pre-establishes obtains the target in the target journaling information including at least one predetermined keyword Log segment, wherein the keyword includes the identification information that referred database is operating abnormally;
Correspondingly, the operating status that the database is determined according to the testing result, comprising:
If detecting the presence of the target journaling segment, it is determined that the operating status of the database is misoperation.
6. according to the method described in claim 5, it is characterized in that, described in being obtained in the detection script that the execution pre-establishes After target journaling segment in target journaling information including at least one predetermined keyword, further includes:
The target journaling segment is stored in the second destination document;
It is correspondingly, described to detect the presence of the target journaling segment, comprising:
If detect that second destination document is empty file, it is determined that the database operating status is to operate normally;
If detecting, second destination document is not empty file, it is determined that there are the target journalings for second destination document Segment.
7. according to the method described in claim 5, it is characterized in that, the operating status in the determination database is abnormal After operation, further includes:
The target journaling segment is sent to target terminal in a manner of mail or information.
8. a kind of database detection system characterized by comprising
Log information obtains module, for obtaining corresponding with the detection request when receiving the detection request to database Target journaling information;
Database operating status determining module, for calling the detection script pre-established to examine the target journaling information It surveys, the operating status of the database is determined according to the testing result.
9. a kind of server, which is characterized in that the server includes:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real The now database detection method as described in any in claim 1-7.
10. a kind of storage medium comprising computer executable instructions, the computer executable instructions are by computer disposal For executing the database detection method as described in any in claim 1-7 when device executes.
CN201810941949.XA 2018-08-17 2018-08-17 Database detection method, system, server and storage medium Pending CN109165143A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810941949.XA CN109165143A (en) 2018-08-17 2018-08-17 Database detection method, system, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810941949.XA CN109165143A (en) 2018-08-17 2018-08-17 Database detection method, system, server and storage medium

Publications (1)

Publication Number Publication Date
CN109165143A true CN109165143A (en) 2019-01-08

Family

ID=64895893

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810941949.XA Pending CN109165143A (en) 2018-08-17 2018-08-17 Database detection method, system, server and storage medium

Country Status (1)

Country Link
CN (1) CN109165143A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110502581A (en) * 2019-08-27 2019-11-26 中国联合网络通信集团有限公司 Distributed data base system monitoring method and device
CN110888776A (en) * 2019-11-13 2020-03-17 网联清算有限公司 Database health state detection method, device and equipment
CN111008123A (en) * 2019-10-23 2020-04-14 贝壳技术有限公司 Database testing method and device, storage medium and electronic equipment
CN111190880A (en) * 2019-08-08 2020-05-22 腾讯科技(深圳)有限公司 Database detection method and device and computer readable storage medium
CN111414263A (en) * 2020-03-20 2020-07-14 深圳乐信软件技术有限公司 Information processing method, device, server and storage medium
CN111752741A (en) * 2020-06-30 2020-10-09 深圳前海微众银行股份有限公司 System performance detection method and device
CN112231694A (en) * 2020-10-27 2021-01-15 北京人大金仓信息技术股份有限公司 Database detection method, device, equipment and medium
CN113132004A (en) * 2021-04-14 2021-07-16 浪潮天元通信信息***有限公司 Method for counting light receiving and emitting power of network equipment interface and computer readable medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000099371A (en) * 1998-09-24 2000-04-07 Hitachi Ltd Fault monitoring system
JP2010224705A (en) * 2009-03-23 2010-10-07 Hitachi Software Eng Co Ltd Log retrieval system
CN104008201A (en) * 2014-06-16 2014-08-27 安徽工业大学 Numerical control machine tool production information obtaining method
US20150128111A1 (en) * 2013-08-26 2015-05-07 Tencent Technology (Shenzhen) Company Limited Devices and Methods for Acquiring Abnormal Information
US20150220413A1 (en) * 2014-01-31 2015-08-06 Hewlett-Packard Development Company, L.P. Extracting Log Files From Storage Devices
CN106371986A (en) * 2016-09-08 2017-02-01 上海新炬网络技术有限公司 Log treatment operation and maintenance monitoring system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000099371A (en) * 1998-09-24 2000-04-07 Hitachi Ltd Fault monitoring system
JP2010224705A (en) * 2009-03-23 2010-10-07 Hitachi Software Eng Co Ltd Log retrieval system
US20150128111A1 (en) * 2013-08-26 2015-05-07 Tencent Technology (Shenzhen) Company Limited Devices and Methods for Acquiring Abnormal Information
US20150220413A1 (en) * 2014-01-31 2015-08-06 Hewlett-Packard Development Company, L.P. Extracting Log Files From Storage Devices
CN104008201A (en) * 2014-06-16 2014-08-27 安徽工业大学 Numerical control machine tool production information obtaining method
CN106371986A (en) * 2016-09-08 2017-02-01 上海新炬网络技术有限公司 Log treatment operation and maintenance monitoring system

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111190880A (en) * 2019-08-08 2020-05-22 腾讯科技(深圳)有限公司 Database detection method and device and computer readable storage medium
CN111190880B (en) * 2019-08-08 2024-03-12 腾讯科技(深圳)有限公司 Database detection method, device and computer readable storage medium
CN110502581A (en) * 2019-08-27 2019-11-26 中国联合网络通信集团有限公司 Distributed data base system monitoring method and device
CN110502581B (en) * 2019-08-27 2022-07-08 中国联合网络通信集团有限公司 Distributed database system monitoring method and device
CN111008123A (en) * 2019-10-23 2020-04-14 贝壳技术有限公司 Database testing method and device, storage medium and electronic equipment
CN111008123B (en) * 2019-10-23 2023-10-24 贝壳技术有限公司 Database testing method and device, storage medium and electronic equipment
CN110888776A (en) * 2019-11-13 2020-03-17 网联清算有限公司 Database health state detection method, device and equipment
CN111414263A (en) * 2020-03-20 2020-07-14 深圳乐信软件技术有限公司 Information processing method, device, server and storage medium
CN111752741A (en) * 2020-06-30 2020-10-09 深圳前海微众银行股份有限公司 System performance detection method and device
CN112231694A (en) * 2020-10-27 2021-01-15 北京人大金仓信息技术股份有限公司 Database detection method, device, equipment and medium
CN113132004A (en) * 2021-04-14 2021-07-16 浪潮天元通信信息***有限公司 Method for counting light receiving and emitting power of network equipment interface and computer readable medium

Similar Documents

Publication Publication Date Title
CN109165143A (en) Database detection method, system, server and storage medium
US10534659B2 (en) Policy based dynamic data collection for problem analysis
US11372635B2 (en) In-memory software package installation and testing
US8676568B2 (en) Information processing apparatus and message extraction method
US11561972B2 (en) Query conversion for querying disparate data sources
CN103793479A (en) Log management method and log management system
CN103649926A (en) Providing access to mainframe data objects in a heterogeneous computing environment
CN103460197A (en) Computer system, file management method and metadata server
US20060004839A1 (en) Method and system for data processing with data replication for the same
US9391935B1 (en) Techniques for file classification information retention
CN114880405A (en) Data lake-based data processing method and system
CN110717130B (en) Dotting method, dotting device, dotting terminal and storage medium
CN108460160B (en) Off-line method, device, terminal and storage medium of database instance
CN111061802A (en) Power data management processing method and device and storage medium
CN112433888B (en) Data processing method and device, storage medium and electronic equipment
CN112948396A (en) Data storage method and device, electronic equipment and storage medium
US11294866B2 (en) Lazy optimistic concurrency control
CN106886471A (en) A kind of read-write fault detection method and system based on disk in linux
CN116185393A (en) Method, device, equipment, medium and product for generating interface document
CN113342619A (en) Log monitoring method and system, electronic device and readable medium
CN113138974A (en) Database compliance detection method and device
US8775732B1 (en) Method and system for passing information to disk arrays for efficient storage management
US20230244686A1 (en) Automatic determination of alternative paths for a process flow using machine learning
CN109344130A (en) A kind of blog management method and device
CN114584616B (en) Message pushing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20190108

RJ01 Rejection of invention patent application after publication