Diagnostic Tracing and Message Logging in the Oracle E-Business Suite adapter
Diagnostic tracing helps to effectively diagnose problems that you might encounter when using the adapters. This topic provides information about the following three types of tracing supported with Microsoft BizTalk Adapter for Oracle E-Business Suite:
Oracle server-side tracing using a client identifier
WCF tracing between the adapter client and the adapter
WCF tracing within the adapter
Oracle server side tracing using a client identifier
Oracle allows you to perform server-side tracing for the operations performed by client applications on the Oracle database. Because requests from client applications can be routed to different database sessions, it becomes difficult to trace the origin of the request. However, Oracle facilitates end-to-end application tracing using client identifiers.
The Oracle E-Business adapter exposes the OracleConnectionClientId
binding property that allows you to specify the client identifier at the design time for the connection used by the adapter to connect to Oracle. The adapter client identifier helps you in selective tracing of the operations performed by the adapter client on Oracle, and also allows you to filter and view the Oracle server traces based on the client identifier. For information about how you can enable tracing for client identifiers in Oracle, see https://go.microsoft.com/fwlink/p/?LinkId=135746.
WCF tracing between the adapter client and the adapter
Adapter clients can enable WCF tracing to trace issues between the adapter client and the adapter. WCF tracing is used to trace the input XML that comes from the adapter client by using the WCF service model and is useful in diagnosing serialization issues. WCF tracing is not used for the WCF channel model or for output messages from the adapter to the adapter client. You can activate WCF tracing for BizTalk applications and WCF service model applications by adding an excerpt to the respective configuration files. Also, you can enable tracing both at design-time and run-time.
Tracing at design-time. For the design-time experience, you may use the Add Adapter Service Reference Plug-in, Consume Adapter Service Add-in, or the Add Adapter Metadata Wizard. All these tools can be used from Visual Studio. So, to enable tracing for the design-time experience, you must add the excerpt to the devenv.exe.config file located in <installation drive>:\Program Files\Microsoft Visual Studio <version>\Common7\IDE.
Tracing at run-time. For run-time tracing, you must add the excerpt depending on the application you are using.
For a BizTalk Server applications, you must add the excerpt to the BizTalk configuration file, typically BTSNTSvc.exe.config. For BizTalk Server, this file is available typically under <installation drive>:\Program Files\Microsoft BizTalk Server.
For a WCF service model .NET application, you must add the excerpt to the app.config file of your project.
To enable WCF tracing, add the following excerpt within the
<configuration>
tag:
<system.diagnostics>
<sources>
<source name ="System.ServiceModel" switchValue="Verbose">
<listeners>
<add name="xml" />
</listeners>
</source>
<source name ="System.ServiceModel.MessageLogging"
switchValue="Verbose, ActivityTracing">
<listeners>
<add name="xml" />
</listeners>
</source>
<source name ="System.Runtime.Serialization" switchValue="Verbose">
<listeners>
<add name="xml" />
</listeners>
</source>
</sources>
<sharedListeners>
<add name="xml" type="System.Diagnostics.XmlWriterTraceListener"
traceOutputOptions="LogicalOperationStack"
initializeData="C:\log\WCFTrace.svclog" />
</sharedListeners>
<trace autoflush="true" />
</system.diagnostics>
<system.serviceModel>
<diagnostics>
<messageLogging
logEntireMessage="true"
logMalformedMessages="false"
logMessagesAtServiceLevel="true"
logMessagesAtTransportLevel="false"/>
</diagnostics>
</system.serviceModel>
This saves the WCF traces to C:\log\WCFTrace.svclog. WCF tracing provides more information.
Important
Make sure you mitigate potential security threats of exposing sensitive business data that can be caused when enabling tracing. For recommendations, see the Best Practices for Message and Instance Data Tracking.
WCF tracing within the adapter
The adapters log different categories of useful information to the trace file such as errors, warnings, and information messages. Such information is useful in understanding the process flow within the adapter and diagnosing issues with the adapter. You can activate the WCF LOB Adapter SDK and adapter tracing for BizTalk applications and WCF service model applications by adding an excerpt to the respective configuration files. Also, you can enable tracing both at design-time and run-time.
Tracing at design-time. For the design-time experience, you may use the Add Adapter Service Reference Plug-in, Consume Adapter Service Add-in, or the Add Adapter Metadata Wizard. All these tools can be used from Visual Studio. So, to enable tracing for the design-time experience, you must add the excerpt to the devenv.exe.config file located in <installation drive>:\Program Files\Microsoft Visual Studio <version>\Common7\IDE.
Tracing at run-time. For run-time tracing, you must add the excerpt depending on the application you are using.
For a BizTalk Server applications, you must add the excerpt to the BizTalk configuration file, typically BTSNTSvc.exe.config. For BizTalk Server 2006 R2, this file is available typically under <installation drive>:\Program Files\Microsoft BizTalk Server 2006. For BizTalk Server, this file is available typically under <installation drive>:\Program Files\Microsoft BizTalk Server.
For a WCF service model .NET application, you must add the excerpt to the app.config file of your project.
To enable WCF LOB Adapter SDK and adapter tracing, add the following excerpt within the
<configuration>
tag:
<system.diagnostics>
<sources>
<source name="Microsoft.ServiceModel.Channels" switchValue="Error">
<listeners>
<add name="xml" />
</listeners>
</source>
<source name="Microsoft.Adapters.OracleEBS" switchValue="Information">
<listeners>
<add name="xml" />
</listeners>
</source>
</sources>
<sharedListeners>
<add name="xml" type="System.Diagnostics.XmlWriterTraceListener"
traceOutputOptions="LogicalOperationStack"
initializeData="C:\log\AdapterTrace.svclog" />
</sharedListeners>
<trace autoflush="true" />
</system.diagnostics>
This saves the WCF traces to C:\log\AdapterTrace.svclog.
Viewing the traces
You can use the Windows Communication Foundation (WCF) Service Trace Viewer tool to view the traces. Using Service Trace Viewer for Viewing Correlated Traces and Troubleshooting provides more details on this tool.
Configuring tracking for BizTalk applications
The BizTalk Server Administration console lets you configure various tracking options for items such as send ports and receive ports. The tracking configuration settings enable you to track inbound and outbound event data, message properties, message bodies, and orchestrations. For more information about configuring tracking for BizTalk applications, see Managing and tracking your artifacts.
You can also use Group Hub to view tracked message and instance data, including best practices, saving tracking queries, and more.