The way to create oracle synonyms

Some Needs:
    There are two oracle database:SID=A and SID=B,and there is a table "objects" of a user "a" under A ,and a user b
under B.We want to login B as "b" to execute "select * from objects",then it will display the result of a.objects of A.
Resolution
   Let's login B as b and execute "create public synonym objects for a.objects@A",after that we execute
"select * from objects" and it will display all the information of "a.objects"
Attention
  There mustnt be a table named "objects" in B,however the operation will execute but the result is the informatio of b.objects,so we must delete b.objects and recreate synonym. 
發佈了69 篇原創文章 · 獲贊 4 · 訪問量 23萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章