intermittent ora-00900 error encountered
Hi all,
Setup: Oracle 10.2.0.4.0. Solaris 64 bit, 2.10.
I have a delete statement which intermittently throws ora-00900 error. sql statement is as:
delete from Event2 where rowid in (select rowid from (select rowid from Event2 order by eventtime) where rownum < 6501);
Error:
27 Jul 2010 23:13:38:984 ERROR [EventCounter-Thread] UTIL - SQLUtil: error executing query: delete from Event2 where rowid in (select rowid from (select rowid from Event2 order by eventtime) where rownum < 6501)
27 Jul 2010 23:13:38:984 ERROR [EventCounter-Thread] UTIL - DbAPI.removeOldEventsorAlarms() - Exception while executing query java.sql.SQLException: ORA-00900: invalid SQL statement
This sql is run by Java code on the database and the number in sql (as 6501 below) is decided during runtime by Java. However, not run using 'execute immediate' or thru a procedure/function/anonymous block; rather runs as a simple sql on database. I have Procedural option installed on the server (as it runs most of the time) and runs fine always when I run it on sqlplus. What we are doing is deleting oldest 'n' number of records from this log table.
I have a delete statement which intermittently throws ora-00900 error. sql statement is as:
delete from Event2 where rowid in (select rowid from (select rowid from Event2 order by eventtime) where rownum < 6501);
Error:
27 Jul 2010 23:13:38:984 ERROR [EventCounter-Thread] UTIL - SQLUtil: error executing query: delete from Event2 where rowid in (select rowid from (select rowid from Event2 order by eventtime) where rownum < 6501)
27 Jul 2010 23:13:38:984 ERROR [EventCounter-Thread] UTIL - DbAPI.removeOldEventsorAlarms() - Exception while executing query java.sql.SQLException: ORA-00900: invalid SQL statement
This sql is run by Java code on the database and the number in sql (as 6501 below) is decided during runtime by Java. However, not run using 'execute immediate' or thru a procedure/function/anonymous block; rather runs as a simple sql on database. I have Procedural option installed on the server (as it runs most of the time) and runs fine always when I run it on sqlplus. What we are doing is deleting oldest 'n' number of records from this log table.
0