创建只对某几个视图或表既有查询权限的用户

用sys或具有dba权限的用户登录sqlplus:

创建用户并分配表空间

CREATE USER XDFWEBIDENTIFIED BY XDFWEB
 DEFAULT TABLESPACE "XDF"
 TEMPORARY TABLESPACE "TEMP"
 QUOTA UNLIMITED ON "XDF";

 

授予权限,并清除角色

GRANT CONNECT TO XDFWEB;

ALTER USER XDFWEB DEFAULT ROLE NONE;

GRANT CREATE SESSION TO XDFWEB;

 

授予用户XDFWEB查询某几个视图或表的权限

GRANT SELECT ON XDF.V_WEB_CFS_STUFFWORK TOXDFWEB;

GRANT SELECT ON XDF.V_WEB_CNTE TO XDFWEB;

GRANT SELECT ON XDF.V_WEB_CNTR_WORK_DETAILTO XDFWEB;

GRANT SELECT ON XDF.V_WEB_OMS_STUFF TOXDFWEB;

GRANT SELECT ON XDF.V_WEB_OMS_STUFFCNTR TOXDFWEB;

GRANT SELECT ON XDF.V_WEB_OMS_STUFFDETAILTO XDFWEB;

GRANT SELECT ON XDF.V_WEB_SHIPQUERY TOXDFWEB;

GRANT SELECT ON XDF.V_WEB_STUFF_CNTR TOXDFWEB;

GRANT SELECT ON XDF.V_WEB_SYS_VOYAGE TOXDFWEB;

GRANT SELECT ON XDF.V_WEB_VOYAGE_MANAGE TOXDFWEB;

GRANT SELECT ON XDF.V_WEB_VOYAGE_NAME1 TOXDFWEB;

GRANT SELECT ON XDF.V_WEB_VOYAGE TO XDFWEB;

GRANTSELECTONXDF.T_WEB_USER_INFOR TO XDFWEB;

 

创建同义词

CREATE PUBLIC SYNONYM V_WEB_CFS_STUFFWORKFOR XDF.V_WEB_CFS_STUFFWORK;

CREATE PUBLIC SYNONYM V_WEB_CNTE FORXDF.V_WEB_CNTE;

CREATE PUBLIC SYNONYMV_WEB_CNTR_WORK_DETAIL FOR XDF.V_WEB_CNTR_WORK_DETAIL;

CREATE PUBLIC SYNONYM V_WEB_OMS_STUFF FORXDF.V_WEB_OMS_STUFF;

CREATE PUBLIC SYNONYM V_WEB_OMS_STUFFCNTRFOR XDF.V_WEB_OMS_STUFFCNTR;

CREATE PUBLIC SYNONYM V_WEB_OMS_STUFFDETAILFOR XDF.V_WEB_OMS_STUFFDETAIL;

CREATE PUBLIC SYNONYM V_WEB_SHIPQUERY FORXDF.V_WEB_SHIPQUERY;

CREATE PUBLIC SYNONYM V_WEB_STUFF_CNTR FORXDF.V_WEB_STUFF_CNTR;

CREATE PUBLIC SYNONYM V_WEB_SYS_VOYAGE FORXDF.V_WEB_SYS_VOYAGE;

CREATE PUBLIC SYNONYM V_WEB_VOYAGE_MANAGEFOR XDF.V_WEB_VOYAGE_MANAGE;

CREATE PUBLIC SYNONYM V_WEB_VOYAGE_NAME1FOR XDF.V_WEB_VOYAGE_NAME1;

CREATE PUBLIC SYNONYM V_WEB_VOYAGE FORXDF.V_WEB_VOYAGE;

CREATEPUBLICSYNONYM T_WEB_USER_INFOR FORXDF.T_WEB_USER_INFOR;


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值