oracle賦予一個使用者具有查詢另一個使用者所有表資料

來源:互聯網
上載者:User

標籤:win   ...   bsp   運行   test   vgs   資料   粘貼   查詢   

一  以需要被查詢的使用者登入oracle(假如為A)   B為要查詢A使用者下的表的使用者

二  執行查詢語句: select ‘grant select on A.‘|| tname ||‘ to  B;‘ from tab;

以下為類比結果:

  1. grant select on A.DEPT to  B; 
  2. grant select on A.EMP to  B; 
  3. grant select on A.BONUS to  B; 
  4. grant select on A.SALGRADE to  B; 
  5. grant select on A.AVGSAL to  B; 
  6. grant select on A.BOOK to  B; 
  7. grant select on A.TEST_INDEX to  B;  
  8. grant select on A.TB_EMPLOYEES to  B; 

...

三 將結果複製

四  登入system使用者

五 開啟sqlwindow ,粘貼,運行。

可以將select換成all就是這些表的所有許可權都賦予給B

oracle賦予一個使用者具有查詢另一個使用者所有表資料

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.