欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Oracle数据库权限管理

程序员文章站 2022-05-08 12:21:59
...
------------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];
相关标签: oracle grant