Logging to Oracle Data Base

Topics: Exception Handling Application Block, Logging Application Block
Sep 22, 2010 at 8:10 PM

Hi ,

I am tring to log exceptions into Oracle database , I first dont have the sql script for creating oracle database.

I got the one from "http://jopinblog.wordpress.com/2007/05/21/enterprise-library-logging-to-oracle-database/"

I got the script from that link , but still unable to log .. could you please let me know any possibility i can log the exception to the oracle database with minimum code change.


Thank You

Malik Khan

Sep 23, 2010 at 2:40 PM


Personally I'm not so familiar of using Oracle. Anyway, were there any exception raised during the actual execution of your logging?

As far as I know there are no other sql script for logging that is part of the EntLib package other than the MS SQL Server provider version. Given that, to be able to accomplish on logging to a database using Oracle it would indeed require you of creating your own Logging database and creating a Custom Trace Listener (for logging) or Custom Exception Handler (for exception logging) class just like what the article that you have found mentioned. 

Gino Terrado
Global Technology and Solutions
Avanade, Inc.

Sep 24, 2010 at 3:22 AM

That blog mentioned that the cause of the failure of logging is due to the timestamp parameter.

" Out of desperation, I change the name of the “timestamp” parameter to TimeOf, recompile the stored proc, and things start working. Apparently, ADO.NET/Oracle cannot handle the parameter with the same name as a reserved word."

With this, the possible workaround would be to create a custom database trace listener or modify the source code to change the name of the timestamp parameter.


Sarah Urmeneta
Global Technology and Solutions
Avanade, Inc.