ORACLE用户的创建和权限管理

1  创建用户

create user u1 identified by u1

default tablespace testtbs

temporary tablespace tmp;

2  删除用户

drop user u1 cascade;

3  修改用户属性

alter user u1 identified by aaa;

alter user u1 default tablepace test;

alter user u1 temporary tablespace tmp1;

alter user u1 account lock/unlock;

4  给用户赋予权限

grant create tablespace to u1;

grant select on table1 to u1;

create execute on p_job to u1;

grant update on table1 to u1 with grant option;

grant update on table1 to public; --对表的更新权限赋予所有用户

5  回收权限

revoke create tablespace from u1;

revoke update on tab1 from u1;

revoke all on tabl1 from u1; --回收tabl1表上授予用户U1的所有权限

6  查询用户的权限

select table_name, privilege

from dba_tab_privs

where grantee='U1';

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/444614/viewspace-493993/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/444614/viewspace-493993/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值