普通用户是没有权限赋 select any table 的权限的
你用A用户登录,给B赋权限
先用下面的查出所有的表的语句,然后复制出来一下子执行就可以了
select 'grant select on A.' || table_name || 'to B;' from user_tables;
1、SYNONYM(同义词)可以满足您
CREATE [PUBLIC]SYNONYM synonym For schema.object
2、需要权限
grant create synonym to hr;
grant create synonym to scott;
3、例如
conn /as sysdba
提供对象的公共访问:
create public synonym pub_emp for hr.employees;
pub_emp属于public用户,数据库所有用户都可以访问。
4、conn scott/tigger
create public synonym emp2 for hr.employees;
select count(*) from emp1;
select count(*) from emp2;
5、访问其他数据库时,要首先建立数据库连结:
CREATE DATABASE LINK test_link CONNECT TO username IDENTIFIED BY password USING 'DB01';
Select count(*) from hr.employees@test_link;
create synonym link_emp for hr.employees@test_link;
select count(*) from link_emp;