Home  >  Article  >  Database  >  了解Oracle权限管理

了解Oracle权限管理

WBOY
WBOYOriginal
2016-06-07 17:04:421172browse

create user myuser identified by mypassword default tablespace users; /** 请输入用户名: myuser 输入口令: ERROR: OR

create user myuser identified by mypassword default tablespace users; 
/** 
请输入用户名:  myuser 
输入口令: 
ERROR: 
ORA-01045: user MYUSER lacks CREATE SESSION privilege; logon denied 
创建用户后,用户并不能马上登录 
 
*/ 
 
grant create session to myuser;--分配连接权限后用户myuser可以正常使用pl/sql  
grant create table to myuser;--给用户myuser分配创建表的权限  
alter user myuser quota 100M on users;--给用户myuser分配USERS表空间  
grant create session to myuser with amdin option;--用户myUser可以将自己的权限往下分  
grant create session,create table to myuser;--一次分配多个权限  
revoke create session,create table from myuser;--回收用户权限,使用with admin option 会因传播者权限变更失效  
 
--对象权限 grant OP_TYPE on OBJECT_NAME to USER;  
grant select,insert,update,delete,execute,index,references,alter on emp to myuser; 
grant all on emp to myuser; 
grant select on emp to myuser with grant option; 
revoke update,insert on emp from myuser; 
 
--利用角色分配权限(角色是权限的集合)  
 
create role myrole; 
grant select,update to myrole; 
grant myrole to to myuser; 
 
--角色继承  
grant roleA to roleB; 
--roleB 继承roleA   

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn