当前位置:数据库 > Oracle >>

Oracle同义词循环链问题解决

Oracle同义词循环链问题解决
 
[sql] 
1、先查有没有循环的同义词:  
    select * from dba_synonyms where   
    table_owner='test' and synonym_name  
    <>table_name;没有记录  
  
    2、再查同义词没有对象的数据库对象:  
    select * from dba_synonyms where   
    table_owner='test'   
    and sysnonym_name in(select a.synonym_name from dba_synonyms a  
    where a.table_owner='test'  
    minus  
    select object_name from user_objects  
    )  
  
    3、把查询出来的结果进行查询表  
    select * from DRILL_PRESON  
    如果该同义词没有对应的对象,就会报ora_01775的错误  
  
    4、删除这个同义词:  
    drop public synonym DRILL_PRESON  

 

 
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,