Tuesday, August 2, 2022

ORA-00600 [kcbgtcr_17] Errors on ADG Standby Database When Running a Procedure

 Problem:

One procedure was throwing below error when runs against a 19c standby DB in ADG mode:

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

Analysis:

The failing procedure is having lots of SELECT statements along with deleting and inserting records inside a Global Temporary Table, so far all these transactions are supported in 19c ADG mode.

I searched Oracle support for the same and found that symptoms are similar to bug 31834871 mentioned in this note:

ORA-00600 [kcbgtcr_17] Errors on ADG Standby Database Open in Read Only (Doc ID 2737729.1)

The bug impacts version from 18c to 20c and fixed in 21c, its bug fix patch 31834871 is available almost for all 19c versions except my version 19.5 😔 considering that Oracle support may take ages to deliver the same patch for my DB version!


Solution:

I figured out that setting optimizer_features_enable parameter to any version lower than the versions that are hit by the bug will easily overcome it!

In case your problem is with a query, you can add this hint:

/*+ optimizer_features_enable('12.2.0') */

 In my case, it was a very lengthy and complicated procedure which was failing, it requires me to modify its code in multiple locations, so I thought to add the parameter on session level one time inside the procedure like this:

CREATE OR REPLACE  PROCEDURE test IS

BEGIN
......
EXECUTE IMMEDIATE 'alter session set optimizer_features_enable="12.2.0.1"';
......
END;
/



No comments:

Post a Comment