ioerr & ORA-03137

By iotk

iotk-explain-oracle-error.php is a facility that helps to provide substantive documentation for common Oracle errors that you might encounter while using IOTK. It was added to the framework because of the often abstract or unrelated messages given by Oracle’s error reporting facility oerr.

For example, if you receive an ORA-03137 error you can execute the following Oracle command:

oerr ora 3137

oerr will produce the following documentation:

03137, 00000, "TTC protocol internal error : [%s] [%s] [%s] [%s] [%s] [%s] [%s] [%s]"
// *Cause:  TTC protocol internal error.
// *Action: Contact Oracle Support Services.

The right solution for this problem may not require you to call Oracle Support Services. My experience with them is that getting resolution to an issue is a rarity and I would call a number of consulting firms I’ve worked with in the past before calling them. The solution might be quite simple though: disable statement caching.

Instead of executing oerr to get a description of the issue, you can execute IOTK’s ioerr using the same command line parameters passed to oerr:

ioerr ora 3137

Will produce the following documentation:

ORA-3137
--------

Oracle's (oerr ora 3137) official description:
TTC protocol internal error : [%s] [%s] [%s] [%s] [%s] [%s] [%s] [%s]

PROBLEM DESCRIPTION
-------------------

Occasionally you get this error when you attempt to execute queries.  The error
appears both in the PHP error log and in the Oracle alert log and looks like
this:

ORA-03137: TTC protocol internal error : [12333] [10] [84] [101] [] [] [] []

RESOLUTION
----------

Find out what the value is for the PHP configuration setting:

    oci8.statement_cache_size

You find this either by looking in the php.ini file, if you know where it is,
or by executing the following command on the command line:

    php -i | grep statement_cache_size

If the value for the statement_cache_size is not 0, change it to zero and
re-execute your tests/queries.

NOTES
-----

We encountered this error using the following software packages:

    Oracle 11.1.0.6.0
    Oracle Instant Client 11.1.0.1
    PHP 5.2.4
    OCI 1.3.5
    APC 3.0.14
    openSuSE 10.3

In total, documentation is provided for 19 errors ranging from issues with straightforward solutions (like this one) to more complex issues with solutions requiring code changes or upgrades of Oracle.

I will document all of the errors that I’ve tracked and documented while building and using IOTK. I suspect a few of my solutions will be helpful to people. Here are the specific errors that I have documented:

ORA-01000
An issue caused by a memory leak in specific versions of older PHP OCI 8 drivers. Proud to say I helped provide reproducible test cases for this one for Oracle.

ORA-01001
ORA-01031
ORA-01036
ORA-12154
ORA-12528
ORA-12541
ORA-01745
ORA-01861
ORA-02429
ORA-28002

ORA-03114
If accompanied by an ORA-07445 and core dump you might need to upgrade Oracle to 11g. This was a nasty one.

ORA-03137
ORA-00054
ORA-06550
ORA-06553
ORA-00904

OCI-22303
An issue that used to arise when calling oci_new_collection() to bind user defined types to stored procedures. This is essentially another memory leak in the PHP OCI 8 driver, one for which I also provided reproducible test cases to Oracle.


Leave a Reply