This article is intended to provide all the data gathering steps you might need while working on WCF-Oracle adapter issue with BizTalk Server 2006 R2 onwards. This document contains the steps to collect following information:

  1. WCF-Oracle Adapter Traces
  2. ODP.NET Performance Counters
  3. ODP.NET Traces

WCF-Oracle Adapter Traces

Add the following section to the corresponding BtsNtSvc.exe.config/BtsNtSvc64.exe.config file. Restart the host instance.

<system.diagnostics>
    <sources>
      <source name ="System.ServiceModel" switchValue="Verbose">
        <listeners>
          <add name="xml" />
        </listeners>
      </source>
      <source name ="System.ServiceModel.MessageLogging" switchValue="Verbose">       
        <listeners>
          <add name="xml" />
        </listeners>
      </source>
      <source name ="System.Runtime.Serialization" switchValue="Verbose">
        <listeners>
          <add name="xml" />
        </listeners>
      </source>
      <source name="Microsoft.ServiceModel.Channels" switchValue="Verbose">
        <listeners>
          <add name="xmlAdapter" />
        </listeners>
      </source>
      <source name="Microsoft.Adapters.OracleDB" switchValue="Verbose">
        <listeners> 
          <add name="xmlAdapter" />
        </listeners> 
      </source> 
   </sources> 
   <sharedListeners> 
      <add name="xml" type="System.Diagnostics.XmlWriterTraceListener"              
traceOutputOptions="LogicalOperationStack"           initializeData="C:\Trace\WCFTrace.svclog" />

                <add name="xmlAdapter" type="System.Diagnostics.XmlWriterTraceListener"              
traceOutputOptions="LogicalOperationStack" initializeData="C:\Trace\AdapterTrace.svclog"/>
   </sharedListeners>
   <trace autoflush="true" /> 
</system.diagnostics> 
<system.serviceModel>
    <diagnostics>     
<messageLogging           
logEntireMessage="true"          
logMalformedMessages="true"          
logMessagesAtServiceLevel="true"
           logMessagesAtTransportLevel="true"/>   
</diagnostics>    
</system.serviceModel>

Please make sure that the user under which BizTalk host instance is running has proper permission on the above mentioned folder, “Trace” in this case..

ODP.NET Performance Counters

Make sure you have that registry entry for “PerformanceCounters” and set it to 4095. There are two different places you need to do that entry depending up on 32 and 64 bit host instance you are using to host the Oracle RL.

For 64 bit : HKEY_LOCAL_MACHINE\Software\Oracle\ODP.NET\2.111.7.0
For 32 bit : HKEY_LOCAL_MACHINE\Software\WOW6432node\Oracle\ODP.NET\2.111.7.0

The possible values are:

Value

Description

0

Not Enabled

1

Number of sessions being established with Oracle Database every second.

2

Number of sessions being severed from Oracle Database every second.

4

Number of active connections originating from connection pools every second.

8

Number of active connections going back to the connection pool every second.

16

Total number of active connections.

32

Number of inactive connection pools.

64

Total number of connections in use.

128

Total number of connections available for use in all the connection pools.

256

Number of pooled active connections.

1024

Number of non-pooled active connections.

2048

Number of connections that will be soon available in the pool. User has closed these connections, but they are currently awaiting actions, such transaction completion, before they can be placed back into the pool as free connections.

4095

All the above

Default:

0

 

Once that is done you need to register the perfmon counters by running following command:
OraProvCfg
/action:register
/product:odp
/component:perfcounter
/providerpath:C:\app\Administrator\product\11.1.0\client_1\ODP.NET\bin\2.x\Oracle.DataAccess.dll

Typically you can find OraProvCfg at C:\app\Administrator\product\11.1.0\client_1\ODP.NET\bin\2.x\. Once you run this command you should see the perfmon counters called “Oracle Provide for .Net”. But you might not see the corresponding instances to select. In that case, restart your host instance and you should be good. The syntax for instance is <processeid#appDomainIndex>. Here the process id should match with the process id of your host instance.

ODP.NET Traces

ODP.NET traces can be enabled by adding a registry entry under following hive:

HKEY_LOCAL_MACHINE\Software\Oracle\ODP.NET\<version>. Here the version is corresponding to Oracle.DataAccess.dll version. Underneath you need to enter three more keys:

1. TraceLevel (string)

Possible values:

 

Value

Description

0

None

1

Entry, exit, and SQL statement information

2

Connection Pooling statistics

4

Distributed transactions (enlistment and delistment)

8

User-mode dump creation upon unmanaged exception

16

HA Event Information

32

Load Balancing Information

64

Self Tuning Information

127

All the above

Default:

0


2. TraceFileName (string) – path and the file name where you want the traces to get dump

3. TraceOutput (string) – 0 for single files and 1 for multiple files


Written by
Chirag Pavecha

Reviewed by
Jainath V R

Microsoft India GTSC