Quantcast
Channel: Doyensys Allappsdba Blog..
Viewing all articles
Browse latest Browse all 1640

Find the sql_text using ospid

$
0
0
Find top pids of oracle user
$top -u oracle

Enter the os pid and find the sql id 

select sid, sql_id from v$session s, v$process p
where s.paddr = p.addr
and p.spid = &OS_PID;

Enter the sql_id to find the sql_text

set long 1000
set pages 1000 lines 1000
col sql_text for a100
select sql_text
from v$sql
where sql_id = '&sql_id';

Viewing all articles
Browse latest Browse all 1640

Trending Articles