AI Dictionary SQL via all_synonyms?

D.Wenzel

Member²
We have in our large Database Problems with the ALL_* Datadictionaray views.

The developer use the feature use DBA-Views = ON but the PSD 16 generate

select table_owner, table_name from all_synonyms
where (owner = 'PUBLIC' or owner = user)
and (synonym_name = table_name)
and not table_owner in ('SYS', 'OLAPSYS', 'XDB', 'LBACSYS', 'MDSYS', 'WMSYS', 'CTXSYS', 'AUDSYS', 'DVSYS', 'SYSTEM', 'ORDSYS', 'ORDDATA', 'APPQOSSYS', 'GSMADMIN_INTERNAL')
order by decode(owner, 'PUBLIC', 1, 0)

A) is this realy generated by the PSD and
B) how can i rewrite this from the DEV-PC (aka canames.sql like ...)


Ahoi Daniel
 
The AI Assistant does indeed execute this query once to determine all table names accessible to the user. It can then find the table names in your prompts and in your SQL and PL/SQL code, so that it can include the table definitions as context.

I see that the query does not comply with the "Use DBA views if available" preference. We will improve this.
 
This has been fixed for version 17.0, for which we will have a public beta shortly. If you need a backport to version 16.0, let me know.
 
Hi @Marco Kalter,
when can we expect Version 17—around June/July 2026?

I need a backport or hotfix for Version 16 for our company.

Thanks, Daniel

P.S. For these reasons, we’re already patching CANAMES.SQL because the data dictionary can’t be reliably bypassed on the large development systems.
 
Back
Top