<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://communities.bentley.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How to trace SQL between Oracle and Bentley Map ?</title><link>https://communities.bentley.com/products/geospatial/desktop/f/bentley-map-forum/57653/how-to-trace-sql-between-oracle-and-bentley-map</link><description>Hi there, 
 Is there any way to trace SQL statements as well as responses between Bentley Map and Oracle? 
 I noticed there&amp;#39;s a log file that you can enable but it doesn&amp;#39;t log SQL statements... 
 Does anyone knows if TOAD allows you to trace an application</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>Re: How to trace SQL between Oracle and Bentley Map ?</title><link>https://communities.bentley.com/thread/136214?ContentTypeID=1</link><pubDate>Mon, 12 Jul 2010 17:21:13 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:41983ce0-fb54-450f-9b61-5d9a178de05b</guid><dc:creator>Martin Roy</dc:creator><description>&lt;p&gt;Hi. One way is to enable logging on the Oracle server. You can use a trigger such as this to only log when a specific Oracle user is logged:&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;grant ALTER SESSION to system;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;CREATE OR REPLACE TRIGGER BENTLEY_ORA_CON_TRACE&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;After logon on database&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;Begin &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;if ( user=&amp;#39;FERNANDO&amp;#39;) then&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&amp;nbsp;execute immediate &amp;#39;alter session set sql_trace=true&amp;#39;;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&amp;nbsp;execute immediate &amp;#39;alter session set events &amp;#39;&amp;#39;10046 trace name context forever, level 12&amp;#39;&amp;#39;&amp;#39;;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;End if;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;END;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;/&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;Obviously you must replace &amp;#39;FERNANDO&amp;#39; with the actual account used &lt;img src="http://communities.bentley.com/emoticons/emotion-1.gif" alt="Smile" /&gt; Don&amp;#39;t forget to drop the trigger once you&amp;#39;re done so you don&amp;#39;t slow down all requests.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Martin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>