You are on page 1of 2

Copyright (c) 2023, Oracle. All rights reserved. Oracle Confidential.

Queries Failing With ORA-00918 Since Applying 19.17DBRU or Higher (Doc ID 2936045.1)

In this Document

Symptoms
Cause
Solution
References

APPLIES TO:

Oracle Database - Enterprise Edition - Version 19.17.0.0.0 and later


Information in this document applies to any platform.

SYMPTOMS

Since applying 19.17.0.0.221018DBRU or higher, application queries are failing with an ORA-00918:

SQL> SELECT version FROM v$instance;

VERSION
-----------------
12.2.0.1.0

SQL> @q
SQL> SELECT d.dummy
2 FROM dual d1
3 INNER JOIN dual d ON d.dummy = d1.dummy
4 LEFT JOIN dual d ON d.dummy = d1.dummy
5 AND d.dummy = 'Y';

D
-
X

VERSUS

SQL> SELECT version_full FROM v$instance;

VERSION_FULL
-----------------
19.18.0.0.0

SQL> SELECT d.dummy


2 FROM dual d1
3 INNER JOIN dual d ON d.dummy = d1.dummy
4 LEFT JOIN dual d ON d.dummy = d1.dummy
5 AND d.dummy = 'Y';
SELECT d.dummy
*
ERROR at line 1:
ORA-00918: column ambiguously defined
CAUSE

The fix for bug.29015273, which introduced more strict checks on ambiguous column reference by queries with nested ANSI
joins, is included in 19.17.0.0.221018DBRU onwards. While the fix to bug.29015273 is fully correct, the change in behaviour
leads to ORA-918 error to be raised in some applications.

SOLUTION

1. Apply one-off patch.34774426 or 19.18.0.0.230117DBRU. The January 2023 DBRU includes patch.34774426.

The patch.34774426 introduces a fix control parameter to revert the fix temporarily.

2. After applying patch.34774426, set the following to disable the fix of bug 29015273:

_fix_control='29015273:ON'

SQL> alter session set "_FIX_CONTROL"="29015273:ON";

Session altered.

SQL> SELECT version_full FROM v$instance;

VERSION_FULL
-----------------
19.18.0.0.0

SQL> alter session set "_FIX_CONTROL"="29015273:ON";

Session altered.

SQL> SELECT d.dummy


2 FROM dual d1
3 INNER JOIN dual d ON d.dummy = d1.dummy
4 LEFT JOIN dual d ON d.dummy = d1.dummy
5 AND d.dummy = 'Y';

D
-
X

To set the fix control at SYSTEM level:

alter system set "_FIX_CONTROL"="29015273:ON";

REFERENCES
NOTE:2118136.2 - Assistant: Download Reference for Oracle Database/GI Update, Revision, PSU, SPU(CPU), Bundle Patches,
Patchsets and Base Releases
NOTE:827984.1 - How to use the _FIX_CONTROL hidden parameter
Didn't find what you are looking for?

You might also like