I hoped that on Oracle 26ai I could finally leverage schema level privileges and avoid the hassle of granting SELECT explicitly table by table.
grant select any table on schema PB_040000 to TT_020000;
And it works well with SELECT queries and with DESCRIBE too.
![]() |
| Image courtesy of Google Gemini |
It works also on tables created after granting the privilege.
But, unfortunately, it turns out that DBMS_DEVELOPER.GET_METADATA ignores the schema level privilege:
--connect as TT_020000
set serveroutput on
begin
dbms_output.put_line(
json_serialize(
dbms_developer.get_metadata(
name => 'ORDERS',
schema => 'PB_040000',
object_type => 'TABLE',
level => 'BASIC'
)
PRETTY
)
);
end;
/
begin
*
ERROR at line 1:
ORA-03408: Object not found : PB_040000.ORDERS
ORA-06512: at "SYS.DBMS_DEVELOPER", line 17
ORA-06512: at "SYS.DBMS_DEVELOPER", line 57
ORA-06512: at line 2
https://docs.oracle.com/error-help/db/ora-03408/
More Details :
https://docs.oracle.com/error-help/db/ora-03408/
https://docs.oracle.com/error-help/db/ora-06512/
Whether the security model of DBMS_DEVELOPER should change in the future and become compatible with schema level privileges is a valid question in my humble opinion.
