CLOB to Oracle DB Target (large string causes issues)

Skip to first unread message

Ted Cooper

Feb 13, 2014, 9:38:05 AM2/13/14
When inserting a large string message to Oracle from a C# application, we encounter a known Oracle issue:

ORA-01460 - unimplemented or unreasonable conversion requested

This problem occurs with strings over 4000 characters.  In ODP.NET you can beat it with some creative methods to call the database, per this link:

The suggested fix is to do the following: "Set the parameter value when BeginTransaction has already been called on the DbConnection."

However, with the DB configured as a target, I don't get this level of fine control to tweak how we call the stored procedure.

Similar to the person in the link, I'm trying to send a large amount of string data as XML to the DB for processing.

Is this something we could build into nLog, either as an optional parameter on the target for Oracle calls, or automatic based on the type of connection?

Kim Christensen

Feb 17, 2014, 5:37:15 PM2/17/14

You could create a custom target which solves this problem. Unfortunately there are no way to perform this workaround in NLog

Steven Orvis

Jan 25, 2016, 2:44:28 PM1/25/16
to NLog-Users
I have a pull request for this same issue. Even if they don't merge the code you could create a custom DatabaseTarget and use the code from the pull request.
Reply all
Reply to author
0 new messages