I'm wondering if oci_connect() can cause a 1438 error, because i get this all the time:
Warning: oci_connect() [function.oci-connect]: ORA-00604: error occurred at recursive SQL level 1 ORA-01438: value larger than specified precision allowed for this column ORA-06512: at line 8 in /xxxxxx/some.php on line 220
It's not depending on which table is being queried. It seems like oci_connect() is inserting some trackingstaff in some sys table, or maybe a trigger is related with the logon. But i don't have the permission to figure out this problem in sys.
Any Idea what could be the cause for this error?
Update
Does oracle do some logging somewhere automatically out of box without configured to specifically? Can i somehow let oracle or PHP show me which table or column is affected?
Update I found out that, when i call the PHP Script in Bash directly, it does work fine. But a call from web will cause titled problem. Any Idea?
The message
error occurred at recursive SQL level 1
suggests to me that the error is arising within a trigger. My guess is that there is anAFTER LOGON ON SCHEMA
orDATABASE
trigger, and for some reason it causes an error when your web server process attempts to connect.Here's an example of how to generate the error you're getting. I have a table called
TINY
, with a single column that can only take values up to 99:Now let's create a user account and verify that they can connect:
Good - let's log back in as me and create a trigger that will cause an error if
FRED
attempts to connect:Recall that our
TINY
table can only store values up to 99. So, what happens whenFRED
attempts to connect?Other than the line number, and the bit PHP added, that's exactly the message you got.
If you want to see whether there are any
AFTER LOGON
triggers in your database, try running the queryOn my database (Oracle 11g XE beta), I get the following output:
I don't believe Oracle does any logging out-of-the-box, and I'd be surprised if PHP's
oci_connect
does either.I can only speculate as to why the error arises only for your web server and not when you run PHP from a bash script. Perhaps the trigger is querying
V$SESSION
and trying to figure out what user account is trying to connect to the database?