CN109508285A - A method of through the quick positioning failure code of oracle database and Weblogic middleware - Google Patents

A method of through the quick positioning failure code of oracle database and Weblogic middleware Download PDF

Info

Publication number
CN109508285A
CN109508285A CN201810857648.9A CN201810857648A CN109508285A CN 109508285 A CN109508285 A CN 109508285A CN 201810857648 A CN201810857648 A CN 201810857648A CN 109508285 A CN109508285 A CN 109508285A
Authority
CN
China
Prior art keywords
thread number
weblogic
code
oracle database
nodename
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.)
Granted
Application number
CN201810857648.9A
Other languages
Chinese (zh)
Other versions
CN109508285B (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.)
Shanghai New Torch Network Information Technology Ltd By Share Ltd
Original Assignee
Shanghai New Torch Network Information Technology Ltd By Share 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 Shanghai New Torch Network Information Technology Ltd By Share Ltd filed Critical Shanghai New Torch Network Information Technology Ltd By Share Ltd
Priority to CN201810857648.9A priority Critical patent/CN109508285B/en
Publication of CN109508285A publication Critical patent/CN109508285A/en
Application granted granted Critical
Publication of CN109508285B publication Critical patent/CN109508285B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3644Software debugging by instrumenting at runtime
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3636Software debugging by tracing the execution of the program

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a kind of methods through oracle database and the quick positioning failure code of Weblogic middleware, including step S1: operation Weblogic middleware grabs thread number;S2: the thread number of crawl is associated by real time monitoring Weblogic middleware with the code of corresponding Weblogic middleware;S3: Java database connection module, receiving thread number and corresponding nodename are called;S4:Java database connection module connects oracle database, and thread number and corresponding nodename are sent to oracle database;S5: real time monitoring oracle database session, it will words are associated with nodename and thread number, according to the incidence relation of thread number and the code of Weblogic middleware, determine the code for causing failure SQL.The present invention can be quickly found out the code for generating failure.

Description

A kind of quick positioning failure generation through oracle database and Weblogic middleware The method of code
Technical field
The present invention relates to a kind of location code methods, more particularly to one kind is among oracle database and Weblogic The method of the quick positioning failure code of part.
Background technique
The application program run on Weblogic middleware multinode, is connected to by Java database connection module On oracle database.Usual situation one query, Weblogic can first establish thread, then this thread dispatching Java database Link block connects database, and data base querying returns, this is a complete link.The used system parameter of Weblogic at present The conversational list v $ session that nodename can be sent to database is set, and it is pair that database can be inquired by v $ session The connection for the ServerName creation answered.When (single index is executed according to library SQL by database generation TX lock waiting or high consumption SQL Similar failure) when, how quickly to navigate to is any application code, following methods are generally used at present:
1, it by query SQL sentence, submits to developer and confirms, find corresponding program module and analyzed.
2, when SQL failure occurs, for example TX lock waits or deadlock, if when data personnel positioning TX locks source, it can only This session is terminated to be discharged.
3, after the waiting of TX lock or deadlock or failure SQL occurs, backup file system backup Weblogic Java Virtual Machine Thread is analyzed by the operating condition of thread.
Current mode has the disadvantage that
1, database administrator can not navigate to the application code of Weblogic middleware in oracle database level.
2, database session and Weblogic middleware application layer line journey can not be solved the problems, such as without direct connection.
3, in onrelevant and database personnel's professional knowledge situation analysis thread on the weak side, (Weblogic has Automatic Optimal Number of threads, also there is a setting max-thresholds, and quantity is arranged several hundred thousands of according to system requirements), it is opposite to navigate to specific code It is difficult.
4, timeliness guarantees, locks waiting or deadlock in case of TX, general direct in order to which system can continue to run in time Source is terminated, and has little time to analyze and then SQL is only submitted to developer.If analyzing source, TX lock waiting or dead Risk can be generated to system by locking time length.
Summary of the invention
The technical problem to be solved in the present invention is to provide a kind of through the fast of oracle database and Weblogic middleware It is cumbersome to solve the problems, such as that oracle database accurately provides location code for the method for fast positioning failure code.
The present invention to solve above-mentioned technical problem and the technical solution adopted is that provide it is a kind of through oracle database and The method of the quick positioning failure code of Weblogic middleware, includes the following steps: S1: dividing on each Weblogic node Not Yun Hang Java Virtual Machine and Weblogic middleware, and grab on each Weblogic node the threads of all starting threads Number;S2: monitoring the thread that Java Virtual Machine on each Weblogic node is run in real time, and by the thread number of crawl with it is right The code for the Weblogic middleware answered is associated;S3: Java database connection module, Java database connection module are called Receive the thread number and corresponding nodename that each Weblogic node is sent;S4:Java database connection module connects Oracle database is connect, and the thread number and corresponding nodename that receive in step S3 are sent to oracle database; S5: session and nodename and thread number and are associated by real time monitoring oracle database session, when monitoring failure When SQL, obtain failure SQL session nodename and thread number, and in corresponding node according to thread number with The incidence relation of the code of Weblogic middleware determines the code for causing failure SQL.
Further, the step S1 further include: the starting code of modification Weblogic middleware, so that in Weblogic Between part generate thread number in the operation of response application program, then grab thread number.
Further, in the step S4, creation includes thread number and node name in Java database connection module The connection of title, oracle database conversational list obtain thread number and corresponding nodename from connection, and by thread number It is stored in conversational list with corresponding nodename.
Further, the step S2 further include: Weblogic node Java Virtual Machine is obtained by backup file system Obtain thread number and corresponding code.
Further, the step S5 further include: search the thread number and corresponding in oracle database conversational list Nodename obtains the nodename and thread number of failure SQL session, then by the thread label of failure SQL session and step Thread number in rapid S2 is compared, and determines the code of failure SQL.
The present invention compare the prior art have it is following the utility model has the advantages that it is provided by the invention through oracle database and The method of the quick positioning failure code of Weblogic middleware, carries out inverted orientation code, passes through the meeting of oracle database Table is talked about, the code for generating failure is quickly found out via failure SQL, then terminates failure SQL, it can reserved of codes and guarantor Demonstrate,prove the timeliness of database;Improve the relevance of oracle database and Weblogic middleware;Save analysis Weblogic The time of Java Virtual Machine generation fault code.
Detailed description of the invention
Fig. 1 is the quick positioning failure code for running through oracle database and Weblogic middleware in the embodiment of the present invention Method flow diagram;
Fig. 2 is the quick positioning failure code for running through oracle database and Weblogic middleware in the embodiment of the present invention System connection and signal flow schematic diagram;
Fig. 3 is the quick positioning failure code for running through oracle database and Weblogic middleware in the embodiment of the present invention Method data link forward direction circulate figure.
Specific embodiment
The invention will be further described with reference to the accompanying drawings and examples.
Fig. 1 is the quick positioning failure code for running through oracle database and Weblogic middleware in the embodiment of the present invention Method flow diagram.
Referring to Figure 1, through the quick positioning event of oracle database and Weblogic middleware in the embodiment of the present invention The method for hindering code, includes the following steps:
S1: it is separately operable Java Virtual Machine and Weblogic middleware on each Weblogic node, and each The thread number of all starting threads is grabbed on Weblogic node;
S2: monitoring the thread that Java Virtual Machine on each Weblogic node is run in real time, and by the thread number of crawl It is associated with the code of corresponding Weblogic middleware;
S3: calling Java database connection module, and Java database connection module receives each Weblogic node and sends The thread number come and corresponding nodename;
S4:Java database connection module connects oracle database, and the thread number that is received in step S3 and Corresponding nodename is sent to oracle database;
S5: real time monitoring oracle database session, and session and nodename and thread number are associated, work as prison When controlling failure SQL, the nodename and thread number of failure SQL session are obtained, and according to thread number in corresponding node With the incidence relation of the code of Weblogic middleware, the code for causing failure SQL is determined.
Preferably, step S1 further include: the starting code of modification Weblogic middleware, so that Weblogic middleware exists Thread number is generated when the operation of response application program, then grabs thread number.
Specifically, in step s 4, creation includes thread number and nodename in Java database connection module Connection, oracle database conversational list obtain thread number and corresponding nodename from connection, and by thread number and right The nodename answered is stored in conversational list.
Through the side of oracle database and the quick positioning failure code of Weblogic middleware in the embodiment of the present invention Method, step S2 further include: Weblogic node Java Virtual Machine is obtained by backup file system and obtains thread number and correspondence Code.Step S5 further include: search the thread number in oracle database conversational list and corresponding nodename, obtain event Hinder the nodename and thread number of SQL session, then by the thread number in the thread label of failure SQL session and step S2 It is compared, determines the code of failure SQL.
Fig. 2 is the quick positioning failure code for running through oracle database and Weblogic middleware in the embodiment of the present invention System connection and signal flow schematic diagram.
Fig. 2 is referred to, is separately operable Java Virtual Machine and Weblogic middleware on Weblogic node, and The thread number of all starting threads is grabbed on Weblogic node;The each Weblogic node Java of simultaneous real-time monitoring is virtual The operating condition of machine thread, monitoring thread number and corresponding code;Weblogic node is by thread number and corresponding node name Title is sent to Java database connection module in real time, and then Java database connection module connects oracle database, and line Journey number and corresponding node title are sent to oracle database, when monitoring failure SQL, obtain the section in failure SQL session Point title and thread number;Failure SQL thread label is compared, thread code can be positioned.
Fig. 3 is the quick positioning failure code for running through oracle database and Weblogic middleware in the embodiment of the present invention Method data link forward direction circulate figure.
Refer to Fig. 3, it can be seen that execute difference of the SQL normally with data link circulation when exception, it is abnormal to execute SQL When, positioning causes the code of failure, and execute SQL it is normal when, the release of Jave database connection module data source, Weblogic line Journey release, operation are completed.
In conclusion the quick positioning failure generation provided by the invention through oracle database and Weblogic middleware The method of code, carries out inverted orientation code, by the conversational list of oracle database, is quickly found out generation event via failure SQL Then the code of barrier terminates failure SQL, can reserved of codes and database timeliness;Improve Oracle data The relevance in library and Weblogic middleware;Save the time that analysis Weblogic Java Virtual Machine generates fault code.
Although the present invention is disclosed as above with preferred embodiment, however, it is not to limit the invention, any this field skill Art personnel, without departing from the spirit and scope of the present invention, when can make a little modification and perfect therefore of the invention protection model It encloses to work as and subject to the definition of the claims.

Claims (5)

1. a kind of method through oracle database and the quick positioning failure code of Weblogic middleware, feature exist In including the following steps:
S1: it is separately operable Java Virtual Machine and Weblogic middleware on each Weblogic node, and each The thread number of all starting threads is grabbed on Weblogic node;
S2: monitoring the thread that Java Virtual Machine on each Weblogic node is run in real time, and by the thread number of crawl with it is right The code for the Weblogic middleware answered is associated;
S3: calling Java database connection module, and Java database connection module receives what each Weblogic node was sent Thread number and corresponding nodename;
S4:Java database connection module connects oracle database, and the thread number and correspondence received in step S3 Nodename be sent to oracle database;
S5: session and nodename and thread number and are associated by real time monitoring oracle database session, when monitoring When failure SQL, obtain failure SQL session nodename and thread number, and in corresponding node according to thread number with The incidence relation of the code of Weblogic middleware determines the code for causing failure SQL.
2. as described in claim 1 through the side of oracle database and the quick positioning failure code of Weblogic middleware Method, which is characterized in that the step S1 further include: the starting code of modification Weblogic middleware, so that among Weblogic Part generates thread number in the operation of response application program, then grabs thread number.
3. as described in claim 1 through the side of oracle database and the quick positioning failure code of Weblogic middleware Method, which is characterized in that in the step S4, creation includes thread number and nodename in Java database connection module Connection, oracle database conversational list obtain thread number and corresponding nodename from connection, and by thread number and right The nodename answered is stored in conversational list.
4. as described in claim 1 through the side of oracle database and the quick positioning failure code of Weblogic middleware Method, which is characterized in that the step S2 further include: Weblogic node Java Virtual Machine is obtained by backup file system and is obtained Thread number and corresponding code.
5. as described in claim 1 through the side of oracle database and the quick positioning failure code of Weblogic middleware Method, which is characterized in that the step S5 further include: search the thread number in oracle database conversational list and corresponding node Title obtains the nodename and thread number of failure SQL session, then by the thread number of failure SQL session and step S2 In thread number be compared, determine the code of failure SQL.
CN201810857648.9A 2018-07-31 2018-07-31 Method for quickly positioning fault code through Oracle database and Weblogic middleware Active CN109508285B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810857648.9A CN109508285B (en) 2018-07-31 2018-07-31 Method for quickly positioning fault code through Oracle database and Weblogic middleware

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810857648.9A CN109508285B (en) 2018-07-31 2018-07-31 Method for quickly positioning fault code through Oracle database and Weblogic middleware

Publications (2)

Publication Number Publication Date
CN109508285A true CN109508285A (en) 2019-03-22
CN109508285B CN109508285B (en) 2021-07-27

Family

ID=65745546

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810857648.9A Active CN109508285B (en) 2018-07-31 2018-07-31 Method for quickly positioning fault code through Oracle database and Weblogic middleware

Country Status (1)

Country Link
CN (1) CN109508285B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8881171B1 (en) * 2008-12-15 2014-11-04 Open Invention Network, Llc Method and computer readable medium for providing checkpointing to windows application groups
CN106201826A (en) * 2016-07-13 2016-12-07 焦点科技股份有限公司 A kind of diagnose the big affairs of oracle database and the method for focus affairs
CN106372135A (en) * 2016-08-26 2017-02-01 深圳市卓讯信息技术有限公司 Structured query language SQL execution efficiency tracking method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8881171B1 (en) * 2008-12-15 2014-11-04 Open Invention Network, Llc Method and computer readable medium for providing checkpointing to windows application groups
CN106201826A (en) * 2016-07-13 2016-12-07 焦点科技股份有限公司 A kind of diagnose the big affairs of oracle database and the method for focus affairs
CN106372135A (en) * 2016-08-26 2017-02-01 深圳市卓讯信息技术有限公司 Structured query language SQL execution efficiency tracking method and device

Also Published As

Publication number Publication date
CN109508285B (en) 2021-07-27

Similar Documents

Publication Publication Date Title
US8938421B2 (en) Method and a system for synchronizing data
US20180129579A1 (en) Systems and Methods with a Realtime Log Analysis Framework
CN109150572B (en) Method, device and computer readable storage medium for realizing alarm association
WO2017124704A1 (en) Method and apparatus for displaying log content
US10771323B2 (en) Alarm information processing method, related device, and system
WO2021169064A1 (en) Edge network-based anomaly processing method and apparatus
CN110430071A (en) Service node fault self-recovery method, apparatus, computer equipment and storage medium
CN111552556B (en) GPU cluster service management system and method
CN113434327A (en) Fault processing system, method, equipment and storage medium
CN111930589A (en) Streaming task automatic monitoring system and method
CN107204868B (en) Task operation monitoring information acquisition method and device
JP5395719B2 (en) Rule generation device and program for failure cause analysis system
US7844601B2 (en) Quality of service feedback for technology-neutral data reporting
CN109508285A (en) A method of through the quick positioning failure code of oracle database and Weblogic middleware
JP2011076153A (en) Automatic query generation device for composite event
WO2023093379A1 (en) Disaster recovery switching method and system, electronic device, and storage medium
CN114167181B (en) Method and system for monitoring local and allopatric line fault tracing
CN109981782A (en) Remote storage abnormality eliminating method and system for cluster fissure
CN112860776B (en) Method and system for extracting and scheduling various data
CN115185964A (en) Data synchronization method and device, computer equipment and storage medium
CN114791900A (en) Operator-based Redis operation and maintenance method, device, system and storage medium
CN115544202A (en) Alarm processing method, device and storage medium
CN112181759A (en) Method for monitoring micro-service performance and diagnosing abnormity
CN115525722B (en) Wide table data synchronization method and device, electronic device and storage medium
CN117424843B (en) Management method, management device and ATE test system

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