当前位置:网站首页>Oracle database synonym creation
Oracle database synonym creation
2022-07-03 06:09:00 【vincentwc】
Oracle Databases are distinguished by users , Before when developing a project , Called the electronic signature resource of another project , The problem is , The table of the electronic signature is under another user , After searching, find the processing method , My solution is to create a oracle Synonyms of ,
This case : stay vincent Users can access scott Of emp surface
1. Create user with administrator account vincent:
SQL> conn /as sysdba
Connected to Oracle Database 11g Enterprise Edition Release 11.2.0.1.0
Connected as [email protected]
SQL> create user vincent identified by root;
User created
SQL> grant create session,connect,resource to vincent;
Grant succeeded
2. Use the administrator account to give the current account 【vincent】 give CREATE SYNONYM Authority
SQL> grant create synonym to vincent;
Grant succeeded
3. stay scott Under the user , Do the following :【 to vincent User assignment query emp Table authority 】
SQL> grant select on emp to vincent;
Grant succeeded
4. stay vincent Create synonyms under user :
SQL> create or replace synonym emp2 for scott.emp;
here , stay vincent Under the user , adopt select * from emp2 You can check scott User emp data
边栏推荐
- Kubernetes notes (IX) kubernetes application encapsulation and expansion
- Simple solution of small up main lottery in station B
- SVN分支管理
- BeanDefinitionRegistryPostProcessor
- Exportation et importation de tables de bibliothèque avec binaires MySQL
- PHP用ENV获取文件参数的时候拿到的是字符串
- Kubernetes notes (IV) kubernetes network
- Code generator - single table query crud - generator
- Jedis source code analysis (I): jedis introduction, jedis module source code analysis
- Alibaba cloud OOS file upload
猜你喜欢
MySQL 5.7.32-winx64 installation tutorial (support installing multiple MySQL services on one host)
Maximum likelihood estimation, divergence, cross entropy
Kubernetes cluster environment construction & Deployment dashboard
Phpstudy setting items can be accessed by other computers on the LAN
Kubernetes notes (10) kubernetes Monitoring & debugging
Life is a process of continuous learning
深度学习,从一维特性输入到多维特征输入引发的思考
Fluentd facile à utiliser avec le marché des plug - ins rainbond pour une collecte de journaux plus rapide
[teacher Zhao Yuqiang] the most detailed introduction to PostgreSQL architecture in history
Bio, NiO, AIO details
随机推荐
Zhiniu stock project -- 05
Project summary --2 (basic use of jsup)
项目总结--01(接口的增删改查;多线程的使用)
Detailed explanation of findloadedclass
Mysql database table export and import with binary
How does win7 solve the problem that telnet is not an internal or external command
[teacher Zhao Yuqiang] the most detailed introduction to PostgreSQL architecture in history
CKA certification notes - CKA certification experience post
使用 Abp.Zero 搭建第三方登录模块(一):原理篇
Ext4 vs XFS -- which file system should you use
Fluentd is easy to use. Combined with the rainbow plug-in market, log collection is faster
[teacher Zhao Yuqiang] calculate aggregation using MapReduce in mongodb
Oauth2.0 - explanation of simplified mode, password mode and client mode
技术管理进阶——你了解成长的全貌吗?
Oauth2.0 - use database to store client information and authorization code
Solve the problem that Anaconda environment cannot be accessed in PowerShell
BeanDefinitionRegistryPostProcessor
GPS坐标转百度地图坐标的方法
[teacher Zhao Yuqiang] MySQL high availability architecture: MHA
轻松上手Fluentd,结合 Rainbond 插件市场,日志收集更快捷