ORA-00600: [qkswcWithQbcRefdByMain4]

Hello all,
This days I found this in a client’s 12c Database when trying to create a Materialized View:

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

A perfect match to MOS ORA-00600 [qkswcWithQbcRefdByMain4] when Create MV “WITH” clause (Doc ID 2232872.1).

The root cause is documented on BUG 22867413 – ORA-600 CALLING DBMS_ADVISOR.TUNE_MVIEW.
The given solution is to apply Patch 22867413.

After applying patch, issue solved. 🙂

# Alert Log:

Thu May 25 21:33:56 2017
Errors in file /u01/app/oracle/diag/rdbms/dwdb/DWDB/trace/DWDB_ora_35851.trc  (incident=575846):
ORA-00600: internal error code, arguments: [qkswcWithQbcRefdByMain4], [], [], [], [], [], [], [], [], [], [], []
Incident details in: /u01/app/oracle/diag/rdbms/dwdb/DWDB/incident/incdir_575846/DWDB_ora_35851_i575846.trc
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
Thu May 25 21:33:58 2017
Dumping diagnostic data in directory=[cdmp_20170525213358], requested by (instance=1, osid=35851), summary=[incident=575846].

# Trace File:

Trace file /u01/app/oracle/diag/rdbms/dwdb/DWDB/trace/DWDB_ora_35851.trc
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
ORACLE_HOME = /u01/app/oracle/product/12.1.0/dbhome_1
System name:    Linux
Node name:      server01.grepora.com
Release:        2.6.32-504.12.2.el6.x86_64
Version:        #1 SMP Sun Feb 1 12:14:02 EST 2015
Machine:        x86_64
Instance name: DWDB
Redo thread mounted by this instance: 1
Oracle process number: 158
Unix process pid: 35851, image: oracle@server01.grepora.com


*** 2017-05-25 21:33:56.421
*** SESSION ID:(1564.59864) 2017-05-25 21:33:56.421
*** CLIENT ID:() 2017-05-25 21:33:56.421
*** SERVICE NAME:(SYS$USERS) 2017-05-25 21:33:56.421
*** MODULE NAME:(toad.exe) 2017-05-25 21:33:56.421
*** CLIENT DRIVER:() 2017-05-25 21:33:56.421
*** ACTION NAME:() 2017-05-25 21:33:56.421

Incident 575846 created, dump file: /u01/app/oracle/diag/rdbms/dwdb/DWDB/incident/incdir_575846/DWDB_ora_35851_i575846.trc
ORA-00600: internal error code, arguments: [qkswcWithQbcRefdByMain4], [], [], [], [], [], [], [], [], [], [], []

# Dump File:

Dump file /u01/app/oracle/diag/rdbms/dwdb/DWDB/incident/incdir_575846/DWDB_ora_35851_i575846.trc
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
ORACLE_HOME = /u01/app/oracle/product/12.1.0/dbhome_1
System name:    Linux
Node name:      server01.grepora.com
Release:        2.6.32-504.12.2.el6.x86_64
Version:        #1 SMP Sun Feb 1 12:14:02 EST 2015
Machine:        x86_64
Instance name: DWDB
Redo thread mounted by this instance: 1
Oracle process number: 158
Unix process pid: 35851, image: oracle@server01.grepora.com


*** 2017-05-25 21:33:56.421
*** SESSION ID:(1564.59864) 2017-05-25 21:33:56.421
*** CLIENT ID:() 2017-05-25 21:33:56.421
*** SERVICE NAME:(SYS$USERS) 2017-05-25 21:33:56.421
*** MODULE NAME:(toad.exe) 2017-05-25 21:33:56.421
*** CLIENT DRIVER:() 2017-05-25 21:33:56.421
*** ACTION NAME:() 2017-05-25 21:33:56.421

[TOC00000]
Jump to table of contents
Dump continued from file: /u01/app/oracle/diag/rdbms/dwdb/DWDB/trace/DWDB_ora_35851.trc
[TOC00001]
ORA-00600: internal error code, arguments: [qkswcWithQbcRefdByMain4], [], [], [], [], [], [], [], [], [], [], []

[TOC00001-END]
[TOC00002]
========= Dump for incident 575846 (ORA 600 [qkswcWithQbcRefdByMain4]) ========
*** 2017-05-25 21:33:56.421
dbkedDefDump(): Starting incident default dumps (flags=0x2, level=3, mask=0x0)
[TOC00003]
----- Current SQL Statement for this session (sql_id=4b9g61sa1an98) -----
CREATE MATERIALIZED VIEW OWNER.MVIEW_TEST
BUILD IMMEDIATE
REFRESH COMPLETE
START WITH sysdate
NEXT (sysdate+1)
WITH PRIMARY KEY
AS
with table_qwerty AS (
SELECT a,b,c,d,e
  FROM owner.table alias.....

And this was the problematic MVIEW. 🙂

Cheers!

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.