日韩视频在线观看,日本中文字幕一区精品在线,国产交换配乱婬视频手机版,热re99久久精品国产99热

  • <sup id="fgl9g"></sup>
      <legend id="fgl9g"><abbr id="fgl9g"><thead id="fgl9g"></thead></abbr></legend>
      我要投稿 投訴建議

      Oracle中使用同義詞介紹

      時(shí)間:2021-04-11 09:31:21 同義詞 我要投稿

      Oracle中使用同義詞介紹

        一、背景

      Oracle中使用同義詞介紹

        有兩個(gè)sid:Asid,Bsid,在Asid下有兩個(gè)用戶Auser1,Auser2,在Bsid下有一個(gè)用戶Buser1。其中Auser2和Buser1建立了dblink。現(xiàn)希望通過(guò)登錄Buser1訪問(wèn)Auser1上的三張表table1,table2,table3信息和函數(shù)function1。

        二、步驟

       、俚卿汚user1對(duì)Auser2授權(quán)(若需要?jiǎng)h除則加上)

        grant ,select,on table1 to Auser2;

        grant ,select,on table2 to Auser2;

        grant ,select,on table3 to Auser2;

        grant execute on function1 to Auser2;

       、诘卿汚user2建立同義詞

        create synonym table1 for Auser1.table1;

        create synonym table2 for Auser1.table1;

        create synonym table3 for Auser1.table1;

        create synonym function1 for Auser1.function1;

       、鄣卿汢user1查找db_link名(例如查出來(lái)的db_link名為mydblink1)

        select username,db_link from user_db_links

       、芙user1的同義詞

        create synonym table1 for Auser2.table1@mydblink1;

        create synonym table2 for Auser2.table2@mydblink1;

        create synonym table3 for Auser2.table3@mydblink1;

        create synonym function1 for Auser2.function1@mydblink1;

       、轀y(cè)試

        此時(shí)登錄Buser1通過(guò)select * from table1就可以訪問(wèn)table1了。

        三、注意點(diǎn)

        也可以建立procedure的'同義詞,但是這樣執(zhí)行的過(guò)程中不允許commit。如果要提交的話請(qǐng)?jiān)谌鏙DBC中commit()。

      【Oracle中使用同義詞介紹】相關(guān)文章:

      使用的同義詞04-15

      寫(xiě)作中同義詞列舉05-22

      考慮的同義詞介紹01-14

      新鮮的同義詞介紹05-03

      享受的同義詞介紹01-14

      生長(zhǎng)同義詞介紹11-18

      外強(qiáng)中干的同義詞08-09

      管中規(guī)豹同義詞03-28

      幸福的同義詞介紹及造句09-11