Pavan DBA's Blog

The DBA Knowledge Store

script to find sql text with sid of a session

Posted by Pavan DBA on March 30, 2012


#######################

TO FIND SQL TEXT FROM SID

#######################

 

select a.sid,a.program,b.sql_text

from v$session a, v$sqltext b

where a.sql_hash_value = b.hash_value

and a.sid=429

order by a.sid,hash_value,piece;

Advertisements

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

 
%d bloggers like this: