设为首页 加入收藏

TOP

Oracle创建用户,并赋于只读某几张表的权限
2019-01-27 04:08:28 】 浏览:30
Tags:Oracle 创建 用户 只读 张表的 权限
#进入 数据库

su - oracle

sqlplus / as sysdba

#创建只读用户

create user kms identified by "123@456";

grant connect to kms;

#给表赋予权限

grant select on ecology.hrmresource to kms;

grant select on ecology.HrmDepartment to kms;

grant select on ecology.HrmSubCompany to kms;

grant select on ecology.hrmjobtitles to kms;

#创建同义词

grant create synonym to kms;

create or replace synonym kms.hrmresource for ecology.hrmresource;

create or replace synonym kms.HrmDepartment for ecology.HrmDepartment;

create or replace synonym kms.HrmSubCompany for ecology.HrmSubCompany;

create or replace synonym kms.hrmjobtitles for ecology.hrmjobtitles;

注意:如果不创建同义词,那么kms用户查询表时,必须使用ecology.table这类的写法,不能直接用table.


编程开发网
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇MySQLDDL操作实践 下一篇MySQL的查询操作

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

array(4) { ["type"]=> int(8) ["message"]=> string(24) "Undefined variable: jobs" ["file"]=> string(32) "/mnt/wp/cppentry/do/bencandy.php" ["line"]=> int(214) }