DB/Oracle
오라클 synonym 모두 찾기
Lohen
2016. 2. 4. 23:55
select 'drop synonym '|| owner ||'.'|| synonym_name ||';', s.* from dba_synonyms s where table_owner not in ('SYS', 'SYSTEM') and db_link is NULL and table_name not in (select object_name from dba_objects o where o.object_name = s.table_name and o.owner = s.table_owner and o.object_type not like '%SYNONYM%') order by owner asc;
반응형