  | | | -none- | -none- 2007-10-02 - By Alvaro Jose Fernandez
Back Apart of checking v$sqlarea.module for any differences, I only could think of of joining the addr and hash_value with v$session, to obtain v$session.prev_sql_addr and v$session.prev_hash_value, and using them, checking the sql from v$sqlarea if it matches the 'BEGIN PQR; END' ..
I have a procedure named 'XYZ' and inside this procedure I have select statement. When I execute this procedure I can see a entry for procedure 'XYZ' and also a entry for select statement (which is actually inside procedure). How do I know if this select statement has come from this procedure or somebody else fired this statement as standalone (not using procedure)
<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas -microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40" xmlns:ns0="http://www.exclaimer.co.uk" xmlns:ns1="urn:schemas-microsoft-com :xslt" xmlns:ns2="http://www.exclaimer.co.uk/rtf">
<head> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"> <meta name=Generator content="Microsoft Word 11 (filtered medium)"> <title>Link procedure to sql statement in v$sqlarea</title> <style> <!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0cm; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman";} a:link, span.MsoHyperlink {color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {color:blue; text-decoration:underline;} p {mso-margin-top-alt:auto; margin-right:0cm; mso-margin-bottom-alt:auto; margin-left:0cm; font-size:12.0pt; font-family:"Times New Roman";} address {margin:0cm; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman"; font-style:italic;} pre {margin:0cm; margin-bottom:.0001pt; font-size:10.0pt; font-family:"Courier New";} span.EstiloCorreo18 {mso-style-type:personal-reply; font-family:Arial; color:navy;} @(protected) Section1 {size:595.3pt 841.9pt; margin:70.85pt 3.0cm 70.85pt 3.0cm;} div.Section1 {page:Section1;} --> </style>
</head>
<body lang=ES link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size: 10.0pt;font-family:Arial;color:navy'>Apart of checking v$sqlarea.module for any differences, I only could think of of joining the addr and hash_value with v$session, to obtain v$session.prev_sql_addr and v$session.prev_hash_value, and using them, checking the sql from v$sqlarea if it matches the ‘</span>< /font><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>BEGIN PQR; END’ ..<font color=navy><span style='color:navy'><o:p></o:p></span></font ></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size: 12.0pt'><o:p> </o:p></span></font></p>
<div>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>I have a procedure named 'XYZ' and inside this procedure I have select statement. When I execute this procedure I can see a entry for procedure 'XYZ' and also a entry for select statement (which is actually inside procedure). How do I know if this select statement has come from this procedure or somebody else fired this statement as standalone (not using procedure)</span></font><o:p></o:p></p>
</div>
</div>
</body>
</html>
|
|
 |