`

Oracle数据库权限管理

阅读更多
------------Oracle分配权限 以管理员身份登录数据库------
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];
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics