We had a small glitch which we tracked down easily. But we try to find the documentation for this behaviour and are not able to get this neither do we understand why Oracle behaves like this.
What we have:
- Oracle 19c
- A schema named ABC
- A procedure in that schema named a
- We call the procedure with the schema prefix
- All works great
- As soon as we add a table with the same name as the schema, the procedure call no longer works and we get the error PLS-00221
Remember, we are working in schema ABC with logon-user ABC !!!
create or replace procedure a as
begin
null;
end a;
/
begin
abc.a();
end;
/
create table abc (a number);
begin
abc.a();
end;
/
PLS-00221: 'A' is not a procedure or not defined
It is obvious that the newly created table produces the issues but what is the reason for this? Calling a procedure with a schema prefix should not be harmed by a table with the same name. The Oracle documentation states, that schema.objects is a proper way of referencing objects, we couldn't find any disclaimer why this should not work.