Skip to Main Content

ora-00600 with union all

netikrasFeb 7 2018 — edited Feb 8 2018


so today I've whitnessed something new. After doing some pen-testing on the application I found the database damaged in some way.

Oracle Database 11g Release - 64bit Production


after this error pops up JDBC connection becomes broken and cannot be reused. Connection does not break if I'm running this via sqlplus.

This happens ONLY when (there is union all in the query) && (there are 2 or more columns) && (there is a count(*)) && (there is order by clause). Skip either of the components and the query executes just fine. Happens with any view/table I have tried.

Noticed this first on a view using union all in its query as java app started spitting out errors suggesting DB connection has been closed prematurely.

Does that mean there's no way out but a fresh database?


Some food for google's cybermonkeys to fiest on:

select count(*) from (


    0 as id1,

    1 as id2

  from dual

union all


    0 as id1,

    1 as id2

  from dual

  order by id1 desc



ORA-00600: internal error code, arguments: [qctcte1], [0], [], [], [], [], [], [], [], [], [], []

00600. 00000 -  "internal error code, arguments: [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s]"

*Cause:    This is the generic internal error number for Oracle program

           exceptions. It indicates that a process has encountered a low-level,

           unexpected condition. The first argument is the internal message

           number. This argument and the database version number are critical in

           identifying the root cause and the potential impact to your system.

Post Details
Added on Feb 7 2018