Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7815381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T05:30:18+00:00 2026-06-02T05:30:18+00:00

This one has me stumped, so I thought I’d see if anyone else has

  • 0

This one has me stumped, so I thought I’d see if anyone else has ran into this issue and/or knows of a workaround.

I have the following SELECT statement:

SELECT * FROM TPM_VIEWSEARCH_EXPORT VS WHERE (PROJECTTYPEID IN (1))

This works fine, though it’s a pretty slow query that returns about 3,000 rows. However, I want to order the results. So I try:

SELECT * FROM TPM_VIEWSEARCH_EXPORT VS WHERE (PROJECTTYPEID IN (1)) ORDER BY PROJECTID, VERSIONID

When I do this, the query runs for about 25 seconds and then returns:

ORA-00600: internal error code, arguments: [kokegPinLob1], [], [],
[], [], [], [], [], [], [], [], []

I can also move the ORDER BY clause into the view definition itself, and get the same error. The annoying thing is this repros only on our production server (which runs on Linux), and not on my development server which runs locally on Windows. However, it does repro 100% of the time.

The VIEW definition may or may not matter, but here it is anyway:

CREATE VIEW TPM_VIEWSEARCH_EXPORT AS
   SELECT
      V.PROJECTID, V.VERSIONID, V.NAME, V.STAGEID, V.REQUESTTYPE, V.PRIORITY, V.HEALTH, V.TRAININGDELIVERYSTART, V.TRAININGDELIVERYEND, V.MEASUREMENTINFO, V.DESCRIPTION, V.BUSINESSSPONSORLEVELINVOLVE,
      P.INITIATIVEID, P.LEADERSHIPONLY, P.BUSINESSLAUNCHDATE, P.EXPECTEDBUSINESSRESULTS, P.PROJECTTYPEID,
      T.SHORTNAME as ProjectType,
      I.NAME as InitiativeName, 
      C.NAME as TrainingCategory,
      S.NAME as StageName,
      PTO.FIRSTNAME as PTOFirst, PTO.LASTNAME as PTOLast,
      STO.FIRSTNAME as STOFirst, STO.LASTNAME as STOLast,
      LTS.FIRSTNAME as LTSFirst, LTS.LASTNAME as LTSLast,
      R.FIRSTNAME as ReqFirst, R.LASTNAME as ReqLast,
      BS.FIRSTNAME as BSFirst, BS.LASTNAME as BSLast,
      (select WM_CONCAT(FIRSTNAME || ' ' || LASTNAME) from TPM_PROJECTVERSIONSME inner join TPM_USER USING (USERID) where PROJECTID=V.PROJECTID and VERSIONID=V.VERSIONID) as SME,
      (select WM_CONCAT(NAME) from TPM_PROJECTAREAS inner join TPM_AREAS USING (AREAID) where PROJECTID=V.PROJECTID) as Areas,
      (select WM_CONCAT(NAME) from TPM_PROJECTWORKGROUPS inner join TPM_WORKGROUPS USING (WORKGROUPID) where PROJECTID=V.PROJECTID) as Workgroups,
      (select WM_CONCAT(NAME) from TPM_PROJECTVERSIONSYSTEMS inner join TPM_SYSTEMS USING (SYSTEMID) where PROJECTID=V.PROJECTID and VERSIONID=V.VERSIONID) as Systems,
      (select WM_CONCAT(NAME) from TPM_PROJECTVERSIONTEAMS inner join TPM_DEVELOPMENTTEAMS USING (TEAMID) where PROJECTID=V.PROJECTID and VERSIONID=V.VERSIONID) as SupportingDevTeams
   FROM TPM_PROJECTVERSION V
   INNER JOIN TPM_PROJECT P ON P.PROJECTID = V.PROJECTID
   INNER JOIN TPM_PROJECTTYPES T ON T.PROJECTTYPEID = P.PROJECTTYPEID
   INNER JOIN TPM_INITIATIVES I ON I.INITIATIVEID = P.INITIATIVEID
   INNER JOIN TPM_PROJECTSTAGE S ON S.STAGEID = V.STAGEID
   INNER JOIN TPM_PROJECTCATEGORIES PC ON (PC.PROJECTID=V.PROJECTID)
   INNER JOIN TPM_TRAININGCATEGORIES C ON (C.CATEGORYID=PC.CATEGORYID)
   INNER JOIN TPM_USER R ON (V.REQUESTOR=R.USERID)
   INNER JOIN TPM_USER BS ON (V.BUSINESSSPONSOR=BS.USERID)
   LEFT JOIN TPM_USER PTO ON PTO.USERID = V.PRIMARYTRAININGOWNER
   LEFT JOIN TPM_USER STO ON (V.SECONDARYTRAININGOWNER=STO.USERID)
   LEFT JOIN TPM_USER LTS ON (V.LEADTRAININGSPONSOR=LTS.USERID)

The DBAs that run the production server claim this is a known Oracle bug, however no patch is available. Is this truly an Oracle bug, or does this issue have something to do with the view definition or the data in the database.

UPDATE:

Oracle version (Dev machine, which works):

Oracle Database 11g Express Edition Release 11.2.0.2.0 - Beta
PL/SQL Release 11.2.0.2.0 - Beta
CORE    11.2.0.2.0  Production
TNS for 32-bit Windows: Version 11.2.0.2.0 - Beta
NLSRTL Version 11.2.0.2.0 - Production

Oracle version (Production):

TNS for Solaris: Version 11.2.0.2.0 - Production
PL/SQL Release 11.2.0.2.0 - Production
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
NLSRTL Version 11.2.0.2.0 - Production
CORE    11.2.0.2.0  Production
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T05:30:21+00:00Added an answer on June 2, 2026 at 5:30 am

    The solution, which was recommended by Justin Cave in a comment, was to switch to the LISTAGG function instead of WM_CONCAT. This method not only avoids the crash, but also increases the speed of the query from about 46 minutes to around 30 seconds. The updated code is:

      (select LISTAGG(LASTNAME || ', ' || FIRSTNAME, '; ') WITHIN GROUP (ORDER BY LASTNAME, FIRSTNAME) from TPM_PROJECTVERSIONSME inner join TPM_USER USING (USERID) where PROJECTID=V.PROJECTID and VERSIONID=V.VERSIONID) as SME,
      (select LISTAGG(NAME, '; ') WITHIN GROUP (ORDER BY NAME) from TPM_PROJECTAREAS inner join TPM_AREAS USING (AREAID) where PROJECTID=V.PROJECTID) as Areas,
      (select LISTAGG(NAME, '; ') WITHIN GROUP (ORDER BY NAME) from TPM_PROJECTWORKGROUPS inner join TPM_WORKGROUPS USING (WORKGROUPID) where PROJECTID=V.PROJECTID) as Workgroups,
      (select LISTAGG(NAME, '; ') WITHIN GROUP (ORDER BY NAME) from TPM_PROJECTVERSIONSYSTEMS inner join TPM_SYSTEMS USING (SYSTEMID) where PROJECTID=V.PROJECTID and VERSIONID=V.VERSIONID) as Systems,
      (select LISTAGG(NAME, '; ') WITHIN GROUP (ORDER BY NAME) from TPM_PROJECTVERSIONTEAMS inner join TPM_DEVELOPMENTTEAMS USING (TEAMID) where PROJECTID=V.PROJECTID and VERSIONID=V.VERSIONID) as SupportingDevTeams
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This one has me stumped, and none of the other related questions here have
This one has me stumped. I have two Windows installations of PHP: 32-bit on
So...this one has me stumped. I am using VS 2008 (C#). I have some
This one has me stumped and thought I would pose it to the SO
This one has me stumped. <div id=container> <div id=store></div> <div id=contact></div> </div> I'm looking
This one has me stumped. Here are the relative bits of code: public AgencyDetails(Guid
This one has me stumped. I need to call an activity method from within
I'm really stumped by this one! The StackFrame object ( MSDN Link ) has
This one has got me stumped. I'm deploying a Rails 3 app to Slicehost
This one has me stumped. I've searched and found similar questions but I can't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.