views:

1467

answers:

7
+1  Q: 

Oracle ORA-00600

I have SQL SELECT statement that returns:

    Error: ORA-00600: internal error code, arguments: [qerpfAllocateR], [], [], [], [], [], [], []

If I narrow my results by adding one more condition in WHERE clause everything is ok.

Anyone knows what is happening?

EDIT:

    select * from ( select tbl1.col1, ..., tbl1.points
    from table1 tbl1, table2 tbl2
    where tbl1.tbl2FK = tbl2.PK and
          tbl2.col1 = someNumber and
          tbl1.dateColumn = to_date('27-10-2008','dd-mm-yyyy')
    order by tbl1.points desc ) s where rownum <= 3

EDIT2:

My DB admin suggested solution that works:

select * from (select rank() over (order by tbl1.points desc) rank,
                  tbl1.col1, ..., tbl1.points
           from table1 tbl1, table2 tbl2
           where tbl1.tbl2FK = tbl2.PK and
                 tbl2.col1 = someNumber and
                 tbl1.dateColumn = to_date('27-10-2008','dd-mm-yyyy')) s
     where s.rank <= 3
+2  A: 

What is the full query?

http://www.orafaq.com/wiki/ORA-00600 suggests you should report the error to oracle.

tehvan
A: 

I have seen errors like this when there are XMLTYPE columns in the table, using PL/SQL Developer. It wouldn't happen if I had PL/SQL Developer create the query skeleton for me because it would add some syntax to the XMLTYPE column request, I can't remember exactly what.

Dave Swersky
No XMLTYPE is involved here. I've seen ORA-00600 in all sorts of different circumstances - it's a generic "catch-all" error so it won't be the same error, unless the arguments are the same and you're on the same database version/patch.
Jeffrey Kemp
A: 

Something here regarding a similar issue - does your select use joins ?

Ferdeen
-1. ORA-00600 is a generic catch-all error when something goes wrong internally. That link was referring to "[Oracle][ODBC][Ora]ORA-00600: internal error code, arguments: [qctcte1], [0], [], [], [], [], [], []” which is totally different.
Jeffrey Kemp
+3  A: 

The ORA-0600 error indicates an internal error in Oracle itself. You're most likely hitting an Oracle bug.

If you go to http://metalink.oracle.com, you can look up the exact bug, if it is known, by pasting the "arguments" and full stack trace into the ORA-0600 lookup tool. See metalink note 153788.1.

If there's a known bug with that description, it's likely that there's already a patch available for you to download and install. If it's not a known bug, contact support.

Apocalisp
+1  A: 

Good luck with getting support from Oracle...

Seriously though, every time I hit this problem, rearranging the query a little bit usually helps. Maybe fiddling around with the indexes a bit.

DrJokepu
In other words: "I don't know. It's magic. Try shaking the voodoo stick the other way." Rearranging the query helps until you run into the same problem again. It's caused by a bug in Oracle and there's probably a fix for it. If there's not, you should submit a bug report.
Apocalisp
@Apocalisp: First, I doubt that it is probable that there is a fix - there might be one. Waiting for a bugfix can take quite a long time and if you don't want to delay your project infinitely, you need to come up with a workaround. In other words: "He needs a solution now, not in 6 weeks"
DrJokepu
And by the way that's exactly what happened in this case - there was no fix, the DBA suggested a workaround and it worked - everyone is happy, the project does not get delayed, hopefully Oracle will issue a patch at some point.
DrJokepu
I ran into this problem some time ago and found several OTN/Oracle Forum discussions that also attributed this to an internal Oracle bug. I'm having trouble finding them at the moment or I would provide links. It only shows up when doing certain types of nested selects (not sure exactly what properties were causing this). Sometimes the queries would work, other times not... perhaps it had something to do with an index. As frustrating as it is, I'd go with what works rather than try to get a patch. I'm pretty sure there was an Oracle SR/TAR for it but not sure if it was fixed in new v's.
RenderIn
+1  A: 

These bugs are usually related to the optimizer. I think even the smallest change in the query like switching the order of table1 and table2 in the FROM clause might force the optimizer to choose a different plan that will not encounter this error.

Tal
A: 

ORA-00600 basically means you've crash the oracle server (not the instance, just the server servicing your request).

There will almost always be a trace file in your bdump location. This likely wont be a lot of help you to, but will be very helpful to oracle support.

This is generally caused by an oracle bug, and from experience, there isn't a lot you can do about them except raise a SR via metalink (this is the recommended solution from Oracle). They will try to replicate the issue and with any luck, if its a bug it will eventually find its way into a patch.

In the immediate term though (eg, days - months) the main realistic solution is work around it.

While raising the SR doesn't really do alot to help you and can be a frustrating experience, its worth doing, as it might save someone else time once the bug is fixed.

Matthew Watson