Accessing a table without specifying the schema name

半城伤御伤魂 提交于 2019-12-05 03:41:59

If you want all users to be able to select from the table without qualifying with the schema name, you want to create a public synonym:

create public synonym TEST_EMP for GBO_ARC_SCHEMA.TEST_EMP;

If you only want user_b to omit the schema name, you want to create a private synonym WITHIN user_b's schema (that is logged on as user_b)

create synonym TEST_EMP for GBO_ARC_SCHEMA.TEST_EMP;

If you insist on not using synonyms, then, after logging in, do a

alter session set current_schema = GBO_ARC_SCHEMA;

On the server roles for the login you are using, simply uncheck sysadmin and serveradmin roles. That should solve it

For Postgres users with the same problem

ALTER ROLE <YOUR_USERNAME> SET search_path TO GBO_ARC_SCHEMA;
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!