The content of the invention
Larger, less efficient in order to solve the problems, such as on-line transaction fault location difficulty of the prior art, the present invention is carriedGo out a kind of on-line transaction Fault Locating Method and device.
In order to achieve the above object, the embodiment of the present invention provides a kind of on-line transaction Fault Locating Method, including:Receive and useThe fault position request at family;Tracking data is gathered according to the fault position request;Bar is analyzed according to pre-stored suspected faultMesh determines fault message to be solved in the tracking data, and is analyzed, and generation failure analysis result is simultaneously exported.
Further, in one embodiment, before tracking data is gathered according to the fault position request, also include:The export procedure of trace data collection is embedded into system bottom module and is activated, realize the customization to system bottom module.
Further, in one embodiment, it is described that tracking data is gathered according to the fault position request, including:According toThe fault position request opens transaction tracking;According to the mainframe on-line Transaction Name that tracking is specified in the fault position requestRoutine call information and database access information during to transaction operation are acquired;The gathered database access letter of parsingBreath.
Further, in one embodiment, the pre-stored suspected fault analysis entry of the basis determines the tracking numberThe fault message to be solved in, and be analyzed, generate failure analysis result and export, including:According to pre-stored suspiciousReturn code and the application error code of each database access and routine call, judge transaction in the contrast transaction of accident analysis entryWith the presence or absence of failure;And corresponding suspected fault letter is determined according to the tracking data and pre-stored experience problem information bankCease and generate failure analysis result.
Further, in one embodiment, the failure analysis result includes transaction flow figure, the transaction flow iconKnow the situation and ordinal relation of each routine call and database access for transaction, and the link for breaking down.
In order to achieve the above object, the embodiment of the present invention also provides a kind of on-line transaction fault locator, including:RequestReceiver module, the fault position request for receiving user;Data acquisition module, for being gathered according to the fault position requestTracking data;Failure analysis module, for determining to wait to solve in the tracking data according to pre-stored suspected fault analysis entryFault message certainly, and be analyzed, generate failure analysis result and export.
Further, in one embodiment, also include:The embedded module of outlet, for according to the fault position requestBefore collection tracking data, the export procedure of trace data collection is embedded into system bottom module and is activated, realized to systemThe customization of bottom module.
Further, in one embodiment, the data acquisition module be used for according to the fault position request collection withTrack data, it is specifically included:Tracking opening unit, for opening transaction tracking according to the fault position request;Data acquisitionUnit, for being adjusted according to the program when mainframe on-line Transaction Name of tracking is specified in the fault position request to transaction operationIt is acquired with information and database access information;Data resolution unit, for parsing gathered database access information.
Further, in one embodiment, the failure analysis module is used for according to pre-stored suspected fault analysis barMesh determines fault message to be solved in the tracking data, and is analyzed, and generation failure analysis result is simultaneously exported, and its is specificIncluding:Breakdown judge unit, for according in pre-stored suspected fault analysis entry contrast transaction every time database access andReturn code and the application error code of routine call, judge that transaction whether there is failure;And accident analysis unit, for basisThe tracking data and pre-stored experience problem information bank determine corresponding suspected fault information and generate failure analysis result.
Further, in one embodiment, the failure analysis result of the accident analysis unit generation includes transaction flowFigure, the transaction flow map logo goes out each routine call of transaction and the situation and ordinal relation of database access, and goes outThe link of existing failure.
On-line transaction Fault Locating Method proposed by the invention and device, needed for by gathering on-line transaction fault locationData wanted, and storehouse carries out automated analysis to data based on experience, it is to avoid manual interception tracking data, reduce surveyExamination personnel and the communication cost of developer, reduce tester's transaction test and data prepare the number of times of reply, it is to avoidRepeat track, therefore improve the solution efficiency of on-line transaction problem;The method of the present invention can provide detailed transaction flow andResource access information, allows exploitation tester directly to grasp whole transaction flow, understands Test coverage situation, it is to avoid test leakage, carriesApplication version quality high;Also, it is transparent to obtain tracking data to transaction operation, can avoid using existing tracking dataSampling instrument problem encountered.
During specific implementation, before step S102, the also trace data collection function including activation system customization.I.e.:The export procedure of trace data collection is embedded into system bottom module, and is activated, realize the customization to system bottom module.When on-line transaction configuration processor is called or triggers export procedure, transaction of the export procedure according to specified by automatically during database accessName is tracked the collection of data, and the operation of the collection process of data to on-line transaction is transparent.In one embodiment, 3 are setIndividual outlet module, 3 outlet modules are respectively associated 3 EXIT POINT of CICS, after 3 outlet modules are activated,Outlet module is just embedded into CICS system bottom modules, is respectively completed routine call request LINK, routine call and returnsData acquisition RETURN related to SQL statement.After transaction tracking is set, outlet mold will be automatically called during using transaction operationThe communication area data of block, capture program call request and response, the SQL statement of execution, the input data of SQL statement, output numberAccording to, table name and return code, and the tracking data such as the interrupt code that occurs of program.
In the present embodiment, as shown in Fig. 2 gathering the side of tracking data in step S102 according to the fault position requestMethod, specifically includes following steps:
Step S1021, transaction tracking is opened according to the fault position request;
Step S1022, runs according to the mainframe on-line Transaction Name of tracking is specified in the fault position request to transactionWhen routine call information and database access information be acquired.In the present embodiment, the tracking data includes:Between programCall, the related data and return code of database access (i.e. the execution of SQL statement), and exception interrupt code etc..
Step S1023, parses gathered database access information.In the present invention, the data of routine call need notParsing, but export procedure can only get the sequence number of performed SQL statement and can just get tool, it is necessary to be parsed to the sequence numberThe SQL statement of body, the process of parsing be exactly according to the sequence number of SQL statement found out in DB2 system tables specific SQL statement andSQL types, the sequence number and SQL statement of SQL are associated.
In the present embodiment, as shown in figure 3, in step S103 according to pre-stored suspected fault analysis entry determinesThe method of fault message to be solved in tracking data, and being analyzed, generation failure analysis result and output, specifically include withLower step:
Step S1031, according to each database access and program in pre-stored suspected fault analysis entry contrast transactionReturn code and the application error code for calling, judge that transaction whether there is failure.For example, database access returns to -805, programCall return PROGRAM ERROR.
Step S1032, corresponding suspected fault is determined according to the tracking data and pre-stored experience problem information bankInformation simultaneously generates failure analysis result.For example, it is PROGRAM ERROR, it is necessary to point out the program of the program to determine to check failureJustice or program entity do not exist, it is necessary to the environment that developer logs in correlation is further examined.In the step, the failure pointAnalysis result includes transaction flow figure, and the transaction flow map logo goes out the situation of each routine call and database access of transactionAnd ordinal relation, and the link for breaking down, allow developer to become more apparent upon the detailed process of whole transaction so that failurePositioning becomes apparent from and clearly.
In the present embodiment, pre-stored suspected fault analysis entry and solution suggestion includes:
1) application error code, routine call return code, program interrupt code code and exception SQLCODE analyses
Reported an error for each, there is provided describe in detail, navigate to error-reporting routine, there is provided the possible cause of mistake and the solution of suggestionCertainly method, such as routine call return code is PROGRAM ERROR, and solution is to do application definition.
2) area's size the matching analysis are communicated
Each routine call is checked, whether called side is consistent with the communication area size of the side that is called, if inconsistent, just needsCheck code.
3) transaction endless loop analysis
Check whether transaction flow continuously repeats and perform some operations, if it is, endless loop may be present, there is provided suspiciousProgram and associated cyclic operation, code is further analyzed.
4) transaction data updates interpretation of result
Input and output data to the SQL statement of each UPDATE/DELETE/INSERT are analyzed, and check institute moreWhether new data are normal.
5) transaction flow analysis
Each routine call and SQL statement are analyzed, check whether transaction flow is consistent with design.
Step S103 generation transaction flow figure after, by suspected fault information, it is proposed that solution and transaction flowJourney figure is all sent to client so that developer refers to, to realize the positioning of on-line transaction failure.
Although it should be noted that the behaviour of on-line transaction Fault Locating Method of the invention is described with particular order in the accompanying drawingsMake, but, this does not require that or implies must perform these operations according to the particular order, or have to carry out whole institutesThe operation shown could realize desired result.Additionally or alternatively, it is convenient to omit some steps, multiple steps are merged into oneIndividual step is performed, and/or a step is decomposed into execution of multiple steps.
After the method for describing exemplary embodiment of the invention, next, with reference to Fig. 4 to exemplary reality of the inventionThe on-line transaction fault locator for applying mode is introduced.The implementation of the device may refer to the implementation of the above method, repeatPart is repeated no more.Term " module " used below and " unit ", can realize the software of predetermined function and/or hardPart.Although the module described by following examples is preferably realized with software, hardware, or software and hardware combinationRealization be also that may and be contemplated.
Fig. 4 is the structural representation of the on-line transaction fault locator of the embodiment of the present invention.As illustrated, including:
Request receiving module 101, the fault position request for receiving user;
Data acquisition module 102, for gathering tracking data according to the fault position request;
Failure analysis module 103, for determining to be treated in the tracking data according to pre-stored suspected fault analysis entryThe fault message of solution, and be analyzed, generate failure analysis result and export.
In the present embodiment, as shown in figure 5, the data acquisition module 102 is used to be adopted according to the fault position requestCollection tracking data, it is specifically included:
Tracking opening unit 1021, for opening transaction tracking according to the fault position request;
Data acquisition unit 1022, for according to the mainframe on-line Transaction Name that tracking is specified in the fault position requestRoutine call information and database access information during to transaction operation are acquired;
Data resolution unit 1023, for parsing gathered database access information.
In one embodiment, on-line transaction fault locator of the invention also includes the embedded module of outlet, in rootBefore according to fault position request collection tracking data, the export procedure of trace data collection is embedded into system bottom moduleAnd activate, realize the customization to system bottom module.The module can be an independent module, it is also possible to be included in data and adoptRealized in collection module 102.
In the present embodiment, as shown in fig. 6, the failure analysis module 103 is used for according to pre-stored suspected fault pointAnalysis entry determines fault message to be solved in the tracking data, and is analyzed, and generation failure analysis result is simultaneously exported, itsSpecifically include:
Breakdown judge unit 1031, for each database in the pre-stored suspected fault analysis entry contrast transaction of basisReturn code and the application error code with routine call are accessed, judges that transaction whether there is failure;And
Accident analysis unit 1032, for corresponding with pre-stored experience problem information bank determination according to the tracking dataSuspected fault information and generate failure analysis result.
In the present embodiment, the failure analysis result of the generation of accident analysis unit 1032 includes transaction flow figure, instituteState transaction flow map logo and go out each routine call of transaction and the situation and ordinal relation of database access, and break downLink.
Although additionally, be referred to some units of on-line transaction fault locator in above-detailed, thisPlant and divide not enforceable.In fact, according to the embodiment of the present invention, the feature of above-described two or more unitsCan be embodied in a unit with function.Equally, the feature and function of an above-described unit can also be furtherIt is divided into by multiple units to embody.
The application of on-line transaction Fault Locating Method of the invention and device is described below by way of a specific embodiment.
It is understood that although title is different, the functional module included by the specific embodiment is real with shown in Fig. 4Apply the functional module in example be actually it is consistent, only by the feature and function of two or more units in a unitEmbody, or, the feature and function of a unit are further divided into being embodied by multiple units.
As shown in fig. 7, the on-line transaction fault locator of the embodiment includes client terminal device 401, service end communicationDevice 402, trace data collection master control set 403, transacter 404 and data analysis device 405.
Client terminal device 401, the fault position request for receiving user is set up with service end communication device 402 and is connected,Transaction tracking request is initiated, and receives tracking data;
Service end communication device 402, the transaction for receiving client terminal device 401 tracks request, forwards the request to trackingData acquisition master control set 403, and the tracking data that tracking data collection master control set 403 is returned is received, it is sent to clientDevice 401;
Tracking data gathers master control set 403, for receiving tracking request, notifies tracking data harvester 404, triggeringTracking, and tracking data return will be collected;
Tracking data harvester 404, is responsible for completing on-line transaction data acquisition, and gathered data is write into tracking dataIn file.In the present embodiment, tracking data harvester 404 includes 3 outlet modules, and 3 outlet modules are respectively associatedTo 3 EXIT POINT of CICS, after 3 outlet modules are activated, outlet module is just embedded into CICS system bottom modulesIn, it is respectively completed routine call request LINK, routine call and returns to the RETURN data acquisitions related to SQL statement, set and hand overEasily after tracking, the communication area number of outlet module, capture program call request and response will be automatically called during using transaction operationAccording to, the SQL statement of execution, the input data of SQL statement, output data, table name and return code, and the interrupt code that program occursEtc. tracking data, and write track data file;
Tracking data resolver 405, for reading track data file and doing dissection process, the treatment of parsing is exactly rootSpecific SQL statement is found out in DB2 system tables according to the sequence number of SQL statement in tracking data, so as to by the sequence number of SQL andSQL statement is associated, and the data after parsing are returned into tracking data collection master control set 403;
Fail analysis device 406, after tracking data returns to client terminal device 401, fail analysis device 406 will be rightData are analyzed, and generate transaction flow figure, and rule of thumb each inspection entry in problem information storehouse is entered to tracking dataRow inspection, Mining Problems, there is provided the solution of suggestion, and generate failure analysis result.
On-line transaction Fault Locating Method proposed by the invention and device, needed for by gathering on-line transaction fault locationData wanted, and storehouse carries out automated analysis to data based on experience, it is to avoid manual interception tracking data, reduce surveyExamination personnel and the communication cost of developer, reduce tester's transaction test and data prepare the number of times of reply, it is to avoidRepeat track, therefore improve the solution efficiency of on-line transaction problem;The method of the present invention can provide detailed transaction flow andResource access information, allows exploitation tester directly to grasp whole transaction flow, understands Test coverage situation, it is to avoid test leakage, carriesApplication version quality high;Also, it is transparent to obtain tracking data to transaction operation, can avoid being adopted using existing tracking dataCollection instrument problem encountered, such as tracking process can pin correlation table record, and other transaction are it may happen that wait lock time-out, influenceThe normal operation of other transaction.
It should be understood by those skilled in the art that, embodiments of the invention can be provided as method, system or computer programProduct.Therefore, the present invention can be using the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardwareApply the form of example.And, the present invention can be used and wherein include the computer of computer usable program code at one or moreThe computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) is producedThe form of product.
The present invention is the flow with reference to method according to embodiments of the present invention, equipment (system) and computer program productFigure and/or block diagram are described.It should be understood that every first-class during flow chart and/or block diagram can be realized by computer program instructionsThe combination of flow and/or square frame in journey and/or square frame and flow chart and/or block diagram.These computer programs can be providedThe processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produceA raw machine so that produced for reality by the instruction of computer or the computing device of other programmable data processing devicesThe device of the function of being specified in present one flow of flow chart or multiple one square frame of flow and/or block diagram or multiple square frames.
These computer program instructions may be alternatively stored in can guide computer or other programmable data processing devices with spyIn determining the computer-readable memory that mode works so that instruction of the storage in the computer-readable memory is produced and include fingerMake the manufacture of device, the command device realize in one flow of flow chart or multiple one square frame of flow and/or block diagram orThe function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that in meterSeries of operation steps is performed on calculation machine or other programmable devices to produce computer implemented treatment, so as in computer orThe instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram oneThe step of function of being specified in individual square frame or multiple square frames.
Apply specific embodiment in the present invention to be set forth principle of the invention and implementation method, above exampleExplanation be only intended to help and understand the method for the present invention and its core concept;Simultaneously for those of ordinary skill in the art,According to thought of the invention, will change in specific embodiments and applications, in sum, in this specificationAppearance should not be construed as limiting the invention.