Oracle分配权限

以管理员身份登录数据库

创建用户:create user [username] identified by [password];

赋予登录权限:grant create session to [username];

赋予建表权限:grant create table to [username];

赋予表空间使用权限:grant unlimited tablespace to [username];

用户拥有建表权限,相应拥有增删查改权限

查看用户权限:select * from user_sys_privs;

撤销登录权限:revoke create session to [username];

撤销建表权限:revoke create table from [username];

撤销表空间使用权限:revoke unlimited tablespace from [username];

赋予所有用户建表权限:grant create session to public;

赋予用户当前表查询权限:grant select on [tablename] to [username];

赋予用户当前表所有权限:grant all on [tablename] to [username];

撤销用户当前表查询权限:revoke select on [tablename] from [username];

撤销用户当前表所有权限:revoke all on [tablename] from [username];

赋予用户当前表当前列更新权限:grant update ([column]) on [tablename] to [username];

赋予用户当前表当前列插入权限:grant insert ([column]) on [tablename] to [username];

系统权限传递:

grant alter table to [username] with admin option;

对象权限传递:

grant select on [tablename] to [username] with grant option;

------------------------------------------------------------------------------------

grant create session,create table,create view,create any index to [username];

grant unlimited tablespace to [username];

------------------------------------------------------------------------------------


<script type="text/javascript"> </script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值