码迷,mamicode.com
首页 > 其他好文 > 详细

关于grant授权问题

时间:2014-09-01 10:43:42      阅读:228      评论:0      收藏:0      [点我收藏+]

标签:style   color   os   io   strong   div   问题   sp   on   

单表授权
grant select , insert, update, delete on 表名 to 被授权用户名;
grant select , insert, update, delete, references , alter, index  on T_FIX_BIND_ROUTE  to  SPOS_USER3;
 
所有表授权
select ‘grant select, insert, update, delete on ‘ ||t.tname||‘ to 被授权用户名;‘ 
  from tab t 
 where t.tabtype = ‘TABLE‘;
 
单序列授权
grant select on 序列名 to 被授权用户名;
grant select on nac_user.seq_l_tradelist_atuoid to spos_user3;
 
授权某用户下所有序列
select ‘grant select on ‘ ||t.sequence_name||‘ to 被授权用户名;‘ 
  from sys.dba_sequences t 
 where sequence_owner = ‘授权用户名(大写)‘ ;
 
存储过程授权
grant execute on nac_posp to spos_user3;
 
赋给用户调试权限
grant debug session to 用户名
 
DBA收回权限
select ‘REVOKE ALL ON  WEB_USER.‘ || T.object_name || ‘ FROM NAC_USER;‘
  from dba_objects t
 where t.owner = ‘WEB_USER‘
   AND T.object_type IN (‘TABLE‘ , ‘SEQUENCE‘ , ‘VIEW‘ , ‘PROCEDURE‘)  --对象类型
 
 
 

关于grant授权问题

标签:style   color   os   io   strong   div   问题   sp   on   

原文地址:http://www.cnblogs.com/bitter-first-sweet-last/p/3948709.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!