SQL Query to view sql for a OS Pid / process

Posted on August 29, 2008. Filed under: DBA/Admin Tips, Scripts | Tags: , , , , |

Select a.sid,a.serial#,b.pid,c.sql_text,a.module,
to_number(b.spid) PROCESSID,
substr(a.username, 1, 12) username
From v$session a,
v$process b,v$sql c
Where a.paddr = b.addr
and a.sql_address = c.address
and b.spid = ‘&spid’
/

Advertisements

Make a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

One Response to “SQL Query to view sql for a OS Pid / process”

RSS Feed for OraclePitStop – Lets share some knowledge Comments RSS Feed


Where's The Comment Form?

Liked it here?
Why not try sites on the blogroll...

%d bloggers like this: