Search: For:
Browsing Single Category
www.dbatoolz.com ORACLE DBA Forums Ask DBA › Question Id: 4078 | Permalink

how to get SQLTEXT if we have os levele PID

Question ID: 4078
Created By: 2010-JUL-20 05:55:37 [Deepak]
Updated By: 2010-JUL-20 22:21:20 [Vitaliy]
Status: Open
Severity: Normal
Read Only: No
11618
2010-JUL-20 05:55:37
User
 
 
Registered On: Jul 2010
Total Posts: 2
How to findout full sqltext if we get OS level PID with top or ps -ef command?
11629
2010-JUL-20 22:18:22
Moderator
 
 
Registered On: Mar 2006
Total Posts: 289
I am surprised you didn't learn this while getting your OCP for 9i, 10g ?

If PID is owned by Oracle server you get it from v$sqltext joining it with 
v$session and v$process, else you just join v$sqltext with v$session.

Look it up in the docs ...
[edited by: Vitaliy at 22:21 (CST) on Jul. 20, 2010]