Quick positioning when the oracle system is busy

Source: Internet
Author: User

When the oracle system is busy, quickly locate 1. Check the current number of connections select count (*) from gv $ session; www.2cto.com 2. Here we are the bs architecture, let's take a look at the general situation of the session for the application. 2.1 sqlselect gs executed. inst_id, gs. SID, gvs. SQL _text, gs. SERIAL #, gs. STATUS, gs. EVENT, gs. WAIT_CLASS, gs. WAIT_TIME, gs. SECONDS_IN_WAIT, p. spid, gs. logon_time from gv $ process p, gv $ session gs left join gv $ SQL gvs on gs. SQL _id = gvs. SQL _id where gs. PROGRAM = 'jdbc Thin client' and gs. paddr = p. ADDR; Note: 1) the State field has four meanings: (1) Waiting: the SESSION is Waiting for this event. (2) Waited unknown time: the time cannot be obtained because the value of timed_statistics is set to false. It indicates a wait, but the time is short. (3) Wait short time: indicates that a Wait has occurred. However, because the Wait time is very short and does not exceed one time unit, no records are recorded. (4) Waited knnow time: if the session waits and receives the required resources, it enters the State from waiting. Www.2cto.com 2). The Wait_time value also has four meanings: (1) value> 0: Last wait time (unit: 10 ms), not waiting currently. (2) value = 0: the session is waiting for the current event. (3) value =-1: The last wait time is less than one statistical unit, and the current status is not waiting. (4) value =-2: The time statistics status is not set to available, and is not waiting. 3). Wait_time and Second_in_wait field values are related to state: (1) if the state value is Waiting, the wait_time value is useless. The Second_in_wait value is the actual wait time (unit: seconds ). (2) If the state value is Wait unknow time, the wait_time value and Second_in_wait value are useless. (3) If the state value is Wait short time, the wait_time value and Second_in_wait value are useless. (4) If the value of state is Waiting known time, the value of wait_time is the actual Waiting time (unit: seconds), and the value of Second_in_wait is useless.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.