4

I'm having an issue attempting to generate a trace file for an application.

Attempting to troubleshoot an Oracle problem, but the trace file isn't being written. This is my app.config which gets moved to the Release folder as exename.app.config. I'm trying to run against Visual Studio.

Here's the app.config.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <startup> 
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7"/>
    </startup>
    <oracle.manageddataaccess.client>
        <version number="*">
            <settings>
                <setting name="TraceFileName" value="C:\Temp\odpnet4.trc"/>
                <setting name="TraceLevel" value="7"/>
                <setting name="TraceOption" value="1"/>
            </settings>
        </version>
    </oracle.manageddataaccess.client>
</configuration>

And here's the source code:

    Dim o As New Oracle.ManagedDataAccess.Client.OracleConnection(connectionString)
    o.Open()

What am I doing wrong that I'm not seeing a file? Thanks

3
  • TraceLevel is not correct, probably the others aren't either. Note that the trace settings for the managed provider are different than unmanaged. I think the Tracelevel value is 1-7. Latest docs: docs.oracle.com/en/database/oracle/oracle-database/12.2/odpnt/… AND docs.oracle.com/en/database/oracle/oracle-database/12.2/odpnt/… Commented Apr 12, 2018 at 21:56
  • same issue with the 7..i removed the demandoracle and perf counter thing...any suggestions?...the traceoption of a 0 means a single file rather than if its multithreaded multiple files @ChristianShay Commented Apr 13, 2018 at 0:14
  • Thanks Hans. Please post as answer and I'll give you the 50 worked right away. I sadly spent more time on that than I should have. Commented Apr 16, 2018 at 15:30

2 Answers 2

9
+50
  <setting name="TraceFileName"         value="C:\Temp\odpnet4.trc"/>

How to do this correctly is documented, but you have to dig a bit. The relevant part is:

TraceFileLocation : Trace file destination location. This is different from ODP.NET, Unmanaged Driver, which supports TraceFileName.

Sigh.

Sign up to request clarification or add additional context in comments.

1 Comment

Thankfully, 12.2 fixes the inconsistency. Note that you have to install ODAC 12.2 or later to get the 12.2 driver, as the standard Windows client for 12.2 and later ships with ODP.NET 12.1 for some reason.
0

There is an offical Oracle comparison chart showing config differences between the managed and unmanaged versions here: https://docs.oracle.com/cd/E85694_01/ODPNT/InstallConfigDiff.htm#ODPNT8173

These really matter. Do not assume any unmanaged settings persisted or are the same for the managed odp.net

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.