Oracle出現ORA-01775: 同義字的迴圈鏈問題

來源:互聯網
上載者:User

Oracle出現ORA-01775: 同義字的迴圈鏈問題

1、 當用程式串連或者用plsql查詢同義字時,如果出現ora-01775:同義字的迴圈鏈這樣的問題。

一般是因為存在同義字,但同義字沒有相應的對象。

2、 先查有沒有迴圈的同義字。

select*fromdba_synonyms
wheretable_owner='TEST'

and synonym_name<>table_name;

沒有記錄。

3、 再查同義字沒有對象的資料庫物件

select*fromdba_synonyms
wheretable_owner='TEST'
and
synonym_namein
(selecta.synonym_namefromdba_synonyms awherea.table_owner='TEST'
minus
selectobject_namefromuser_objects)

4、 把查詢出來的結果進行查詢表

select*fromDRILL_PRESON

如果該同義字沒有相應的對象,則會包ora-01775的錯誤

5、 把這個同義字刪除

droppublicsynonymDRILL_PRESON

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.