Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: tables with no synonyms
Joe,
Try this:
select table_name
from dba_tables
where owner='USER_A'
and not exists(
select 1 from dba_synonyms dbas
where dbas.owner='USER_B'
and dbas.table_owner = dba_tables.owner and dbas.table_name = dba_tables.table_name)
Tom
-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Joe Smith
Sent: Wednesday, February 07, 2007 3:16 PM
To: oracle-l_at_freelists.org
Subject: tables with no synonyms
I am using this query to find objects ( owned by User A) that have no private synonyms (for User B) created for other users:
select s.owner, s.synonym_name, s.table_owner, s.table_name,
o.object_name, o.object_type from dba_synonyms s, dba_objects o
How can this be improved upon?
we use a statement such as this to create private synonyms.
create synonym B.synonyn_name for A.object_name;
thanks.
--
http://www.freelists.org/webpage/oracle-l
--
http://www.freelists.org/webpage/oracle-l
Received on Wed Feb 07 2007 - 14:24:15 CST
![]() |
![]() |