Find Oracle in the session with Linux process number (PID) Execute those SQL

Source: Internet
Author: User

1, in the use of system process PID query the corresponding physical address

SELECT v.addr,v.* from V$process V
WHERE v.spid = ' 5256;

2, through the physical address to find the corresponding sql_id

SELECT t.sql_id,t.* from V$session t
WHERE t.paddr= ' 000000025c5eb9f8 ';

3. Find the corresponding SQL statement by sql_id

SELECT Sql_text from V$sql
WHERE sql_id = ' DQU970XZS3GPV ';

The above 3 sentences are merged into one sentence:

SELECT S.sql_text
From V$sql S,
V$session T,
V$process V
WHERE s.sql_id = t.sql_id
and t.paddr = V.addr
and v.spid = ' 5256 ';

Analyze the problem specifically with this SQL statement

Find Oracle in the session with Linux process number (PID) Execute those SQL

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.