<docbook><section><title>UDAADOTracing</title><para> </para><title> Call Tracing with our ADO.NET Providers </title> Call Tracing with our ADO.NET Providers 
<para>To enable tracing using any of our ADO.Net Providers, create an environment variable called <computeroutput>OPL.NET.TRACE.CONFIG</computeroutput>, which targets a text file (which you&#39;ll create shortly); for example, on Windows: </para><programlisting>set OPL.NET.TRACE.CONFIG=C:\Program Files\OpenLink Software\UDA\adotrace.cfg
</programlisting><para> This text file will contain structured XML as described (and with examples) below, with three key elements:</para><itemizedlist mark="bullet" spacing="compact"><listitem> <emphasis>provider</emphasis> -- specified by classname, as shown in the examples below </listitem>
<listitem> <emphasis>tracelevel</emphasis> -- specified by values shown, in increasing level of detail; defaults to none if omitted <programlisting>tracelevel ::= None | Exception | Warning | Info | Call | InternalCall | Debug
</programlisting></listitem>
<listitem> <emphasis>tracefile</emphasis> -- filename prefix for tracefile.
 If omitted, trace output will be directed to the console.
 The filename prefix can include a path, either absolute or relative to the client application&#39;s working directory.</listitem>
</itemizedlist><para>The output tracefile will be named in this form -- </para><programlisting>&lt;filename prefix&gt;_&lt;application domain name&gt;_&lt;process id&gt;_&lt;application domain id&gt;_&lt;provider name&gt;.log
</programlisting><para> Trace output will be written to the specified log file in the form -- </para><programlisting>&lt;time&gt; [&lt;thread id&gt;:&lt;stack depth&gt;] &lt;object name&gt;.&lt;method&gt;: &lt;context&gt;
</programlisting><para>-- where context may be -- </para><itemizedlist mark="bullet" spacing="compact"><listitem> <emphasis>ENTRY</emphasis> -- method entry </listitem>
<listitem> <emphasis>EXIT</emphasis> -- method exit </listitem>
<listitem> <emphasis>EXCEPTION</emphasis> -- exception thrown </listitem>
<listitem> <emphasis>MESSAGE</emphasis> -- general trace message</listitem>
</itemizedlist><para>A thread&#39;s exit from a method is not shown unless the method has a non-void return type or output parameters (e.g., ref or out parameters in C#).
 When not shown, the method will have exited before the first subsequent entry in the trace output where the thread&#39;s stack depth is less than its stack depth when the method was entered.</para><para>The following sample <computeroutput>%OPL.NET.TRACE.CONFIG%</computeroutput> would trace calls from all OpenLink ADO.NET Providers -- </para><programlisting>&lt;providers&gt;

  &lt;!-- Single-Tier ADO.NET Provider for ODBC Data Sources --&gt;
  &lt;provider name=&quot;OpenLink.Data.OdbcClient&quot;&gt;
    &lt;tracelevel&gt;
        Debug
    &lt;/tracelevel&gt;
    &lt;tracefile&gt;
        c:\trace_odbc
    &lt;/tracefile&gt;
  &lt;/provider&gt;

  &lt;!-- Single-Tier ADO.NET Provider for Microsoft SQL Server Data Sources --&gt;
  &lt;provider name=&quot;OpenLink.Data.SQLServer&quot;&gt;
    &lt;tracelevel&gt;
        Debug
    &lt;/tracelevel&gt;
    &lt;tracefile&gt;
        c:\trace_sql
    &lt;/tracefile&gt;
  &lt;/provider&gt;

  &lt;!-- Single-Tier ADO.NET Provider for Sybase Data Sources --&gt;
  &lt;provider name=&quot;OpenLink.Data.Sybase&quot;&gt;
    &lt;tracelevel&gt;
        Debug
    &lt;/tracelevel&gt;
    &lt;tracefile&gt;
        c:\trace_syb
    &lt;/tracefile&gt;
  &lt;/provider&gt;

  &lt;!-- Multi-Tier Generic Client ADO.NET Provider --&gt;
  &lt;provider name=&quot;OpenLink.Data.GenericClient&quot;&gt;
    &lt;tracelevel&gt;
        Debug
    &lt;/tracelevel&gt;
    &lt;tracefile&gt;
        c:\trace_generic
    &lt;/tracefile&gt;
  &lt;/provider&gt;

  &lt;!-- Single-Tier ADO.NET Provider for Virtuoso --&gt;
  &lt;provider name=&quot;OpenLink.Data.Virtuoso&quot;&gt;
    &lt;tracelevel&gt;
        Debug
    &lt;/tracelevel&gt;
    &lt;tracefile&gt;
        c:\trace_virtuoso
    &lt;/tracefile&gt;
  &lt;/provider&gt;

&lt;/providers&gt;
</programlisting><para> </para></section></docbook>