ORA-00904 Caused by Query Using DB LINK and Alias Longer Than 30 Characters
(Doc ID 2612642.1)
Last updated on AUGUST 08, 2020
Applies to:
Oracle Database - Enterprise Edition - Version 12.2.0.1 and laterInformation in this document applies to any platform.
Symptoms
- ORA-00904 is caused by query using DB LINK and Alias longer than 30 characters.
- This problem can be reproduced following test case:
grant dba to <USERNAME> identified by <PASSWORD>;
conn <USERNAME>/<PASSWORD>@<connection_string>
create database link <DBLINKNAME> connect to <USERNAME> identified by <PASSWORD> using
'<connection_string>';
create view v_dual as
select dummy as "a123456789012345678901234567890" from dual@<DBLINKNAME>
union all
select dummy as "a123456789012345678901234567890" from dual@<DBLINKNAME>;
select * from v_dual;
conn <USERNAME>/<PASSWORD>@<connection_string>
create database link <DBLINKNAME> connect to <USERNAME> identified by <PASSWORD> using
'<connection_string>';
create view v_dual as
select dummy as "a123456789012345678901234567890" from dual@<DBLINKNAME>
union all
select dummy as "a123456789012345678901234567890" from dual@<DBLINKNAME>;
select * from v_dual;
Test result:
SQL> select * from v_dual;
select * from v_dual
*
ERROR at line 1:
ORA-00904: "A1"."a123456789012345678901234567890": invalid identifier
ORA-02063: preceding line from <DBLINKNAME>
select * from v_dual
*
ERROR at line 1:
ORA-00904: "A1"."a123456789012345678901234567890": invalid identifier
ORA-02063: preceding line from <DBLINKNAME>
Changes
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Changes |
Cause |
Solution |
References |