Tuesday, February 10, 2009

Oracle 10g client upgrade error - Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Last year when we were looking to upgrade Oracle client to 10.2 version (our databases were already 10g from a year before), ran into errors with XMLType columns. Anytime we read XMLType column, we get an exception "Attempted to read or write protected memory. This is often an indication that other memory is corrupt".

Strangely, this was not a problem on local machines but only on servers. Tried many simulations and trials, but with no success. This might be a valid error in cases like when the connection was closed/disposed before reading the XMLType data but in my test scenarios I made sure it was clean code and handles objects properly. Actually went too deep trying to diagnose the problem, even digging GAC.

Turns out in the end all we had to do is to apply 10g Release 2 (10.2.0.4) Patch Set 3 for Microsoft Windows (32-Bit). And things have been stable since that patch.

Love coding!

No comments: