Background query on login

snm

Member
We are using 11.0.6.1796 version.

We are seeing this query -

select s.synonym_name as object_name, o.object_type
from all_synonyms s, sys.all_objects o
where s.owner in ('PUBLIC', :schema)
and o.owner = s.table_owner
and o.object_name = s.table_name
and o.object_type in ('TABLE', 'VIEW', 'PACKAGE','TYPE', 'PROCEDURE', 'FUNCTION', 'SEQUENCE')

from users trying to login and run queries. Is there a way to disable this from pl/sql developer ? Thank you.
 
You can remove the query from the CANames.sql file in the PL/SQL Developer installation directory. As a result the Code Assistant will no longer display synonyms when typing partial synonym names. For example, when a user types

dbms_ou

the Code Assistant will no longer suggest "dbms_output" (which is a public synonym for sys.dbms_output).
 
Cool - never even knew that file existed!
Always noticed that triggers don't appear to auto complete via code assist - reading the above, I thought that might fix it, as TRIGGER is omitted from the list. However, i've modified the relevant block of SQL to :

select object_name, object_type
from sys.all_objects o
where o.owner = :schema
and o.object_type in ('TABLE', 'VIEW', 'PACKAGE','TYPE', 'PROCEDURE', 'FUNCTION', 'SEQUENCE', 'TRIGGER')


but they still don't auto complete.
 
I tested this and it works just fine. I have a trigger named EMP_INSERT_TRIGGER, and when I type

EMP_IN|

the Code Assistant lists this trigger. The trigger is however not listed when you type

OWNER.|

This would require an enhancement.
 
Your second example is the issue we have. To be fair, I rarely type it out without the owner, so never realised it would work with just it's name.
 
Back
Top