Enable ODP.Net Logging

Can someone help me with enabling ODP.Net registration on a computer running Windows XP? I googled and found the following link, but this did not work for me.

http://download.oracle.com/docs/html/E10927_01/featConfig.htm

I set the "TraceLevel" parameter to "63" in the registry, but that didn't help

Basically, I want the whole database call to come from my C # code through the log.

I would like for Oracle to have a tool like "SQL Profiler".

+4
source share
3 answers

I had the same problems on some computers when troubleshooting some Oracle support issues. I found that changing the path to the output file a couple of times and several restarts finally made the ODP client start registration. Make sure the output file is in a directory that your calling application identifier has access to.

In the registry key, verify the following. Here is an example from my machine for .net4 and 11.2.

HKEY_LOCAL_MACHINE \ SOFTWARE \ Wow6432Node \ ORACLE \ ODP.NET \ 4.112.2.0

  • 32 or 64 bit (correct node)
  • Change the trace level to 8 (or 64, I think, for full logging)
  • Change trace parameter = 1
  • Set a valid name TraceFileName
+2
source

Note that the default trace will go to the root of drive C. For Windows 7 and later, this requires an administrator privilege, or it just fails. Therefore, either make sure that your application is running as an administrator, or you have changed the file path.

In addition, note that if you want to trace ODP.NET completely successfully, you need to place the settings inside the application or web configuration file, and not the registry, as well as the settings for TRACELEVEL are different (from 1 to 7).

And finally, when tracking unmanaged ODP.NET, remember that there is a separate node WOW registry for 32-bit Windows. If your application is 32 bit, do not accidentally install it under the 64-bit part of the registry.

+1
source

You can also use the AOP-based approach - generate a proxy server using a library such as Castle Dynamic Proxy, intercept the calls you are interested in and write down arguments such as SQL and parameters. This is a more powerful method, in my opinion, although it can somehow affect performance. See This Gist for an example implementation: https://gist.github.com/Buthrakaur/b1124c08f8521f39f8fd

-2
source

All Articles