oracle权限设置步骤

dba用户:

–授予zhangsan用户创建session的权限,即登陆权限
grant create session to zhangsan
–授予zhangsan用户使用表空间的权限
grant unlimited tablespace to zhangsan
–授予创建表的权限
grant create table to zhangsan

–创建用户,设置密码
create user lisi identified by 123456
–授予zhangsan用户创建session的权限,即登陆权限
grant create session to lisi
–授予zhangsan用户使用表空间的权限
grant unlimited tablespace to lisi
–授予创建表的权限
grant create table to lisi

–授予zhangsan用户查看指定表lisi的权限
grant select on lisi.lisi to zhangsan;
–//授予修改表的权限
grant update on lisi.lisi to zhangsan;

–授权YAJTMSZP用户,修改YAJOMS2C用户的eo_c_order表权限
grant update on YAJOMS2C.eo_c_order to YAJTMSZP;

zhangsan用户:

–开始没有创建表权限
create table zhangsan(id varchar2(64),name varchar2(64))
select * from zhangsan for update
–对lisi.lisi表没有select权限
select * from lisi.lisi
–对lisi.lisi表没有update权限
update lisi.lisi set id=’3’ where id=’1’

lisi用户:

–创建实验用lisi用户表
create table lisi(id varchar2(64),name varchar2(64))
–增加lisi表数据
select * from lisi for update

猜你喜欢

转载自blog.csdn.net/xiongxianze/article/details/78091152