一  以需要被查询的用户登录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

相关文章:

  • 2021-06-05
  • 2022-12-23
  • 2021-10-07
  • 2022-02-17
  • 2022-12-23
  • 2021-11-20
  • 2022-02-23
  • 2021-06-19
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-03-02
  • 2022-01-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案