如何给第三方人员提供oracle接口
2015-10-22 14:01
363 查看
在实际项目中常常需要做接口提供给其他平台使用,需要给调用者提供Oracle数据库用户,此用户可能只能访问我方生产库中的某几张表,而且只能查询不能增删改,这就需要我们从Oracle数据库中给接口设置相应的权限,具体如下:
假设我方用户为scott,我们给第三方用户建立的接口用户为scott_read,我们开放给第三方用户的表为student表。
1.使用system用户登录:sqlplus system/password@orcl。
2.创建scott_read用户:create user scott_read(用户名) identified by tiger(密码)。
3.将connect和resource权限赋给scott_read用户:grant connect,resource to scott_read。
注意:此处一定注意不要将dba权限赋给scott_read,否则此用户可以操作我们数据库的任何东西,这是大忌。
4.将scott的student表查询权限赋给scott_read用户:grant select on scott.student(表或视图名) to scott_read。
5.创建同义词:create or replace synonym scott_read.student for scott.student。
至此,scott_read用户可以直接查询student表中的所有数据,并且不会给我们的数据库造成任何影响。
原文地址:http://bbs.delit.cn/thread-167-1-1.html
转载请注明出处:
撰写人:度量科技http://www.delit.cn
假设我方用户为scott,我们给第三方用户建立的接口用户为scott_read,我们开放给第三方用户的表为student表。
1.使用system用户登录:sqlplus system/password@orcl。
2.创建scott_read用户:create user scott_read(用户名) identified by tiger(密码)。
3.将connect和resource权限赋给scott_read用户:grant connect,resource to scott_read。
注意:此处一定注意不要将dba权限赋给scott_read,否则此用户可以操作我们数据库的任何东西,这是大忌。
4.将scott的student表查询权限赋给scott_read用户:grant select on scott.student(表或视图名) to scott_read。
5.创建同义词:create or replace synonym scott_read.student for scott.student。
至此,scott_read用户可以直接查询student表中的所有数据,并且不会给我们的数据库造成任何影响。
原文地址:http://bbs.delit.cn/thread-167-1-1.html
转载请注明出处:
撰写人:度量科技http://www.delit.cn
相关文章推荐
- Oracle Split
- oracle 注入整理
- oracle hanganalyze工具的使用
- ORACLE SEQUENCE
- Oracle PLSQL Procedure 如何进行性能调优分析
- Oracle 监听(Listener) 中 services 说明
- Ubuntu14 安装Oracle 11g
- oracle 序列初始化的plsql块脚本
- JDBC连接Oracle数据库时出现的ORA-12505错误及解决办法
- Oracle查看表空间利用率脚本
- Linux环境的Oracle11gR2(ASM)的单实例搭建安装
- Oracle数据库的轻松干净卸载
- Oracel exp/imp 优化
- Oracle 字符集的查看和修改
- oracle 不要建空表再导入数据,直接根据原表建成分区表
- oracle 根据在线更新分区。
- 【转发】未能加载文件或程序集“Oracle.DataAccess”或它的某一个依赖项。试图加载格式不正确的程序。
- Sqlserver 连接oracle和mysql数据库 已经oracle导入sqlserver表数据
- oracle管理控制台不能打开,提示此网站的安全证书有问题?
- Oracle 12c EM express