为了从所有 PDB select 授予什么特权
What privileges to grant in order to select from all PDBs
为什么 select return 的结果不一样?
或者,如果您想要更一般的问题 - 授予哪些权限才能从所有 PDB 中 select。
conn / as sysdba
create user c##nir identified by c##nir container=all;
grant connect,dba,resource to c##nir container=all;
grant select on cdb_synonyms to c##nir container=all;
select CON_ID from cdb_synonyms group by CON_ID;
CON_ID
----------
1
4
11
10
14
5
8
13
3
7
15
6
12
9
conn c##nir/c##nir
select CON_ID from cdb_synonyms group by CON_ID;
CON_ID
----------
1
select CON_ID from containers(dba_synonyms) group by CON_ID
*
ERROR at line 1:
ORA-00942: table or view does not exist
答案:
ALTER USER c##nir set **container_data=all** container = current;
CONTAINER_DATA 控制将从中查看的数据。
为什么 select return 的结果不一样? 或者,如果您想要更一般的问题 - 授予哪些权限才能从所有 PDB 中 select。
conn / as sysdba
create user c##nir identified by c##nir container=all;
grant connect,dba,resource to c##nir container=all;
grant select on cdb_synonyms to c##nir container=all;
select CON_ID from cdb_synonyms group by CON_ID;
CON_ID
----------
1
4
11
10
14
5
8
13
3
7
15
6
12
9
conn c##nir/c##nir
select CON_ID from cdb_synonyms group by CON_ID;
CON_ID
----------
1
select CON_ID from containers(dba_synonyms) group by CON_ID
*
ERROR at line 1:
ORA-00942: table or view does not exist
答案:
ALTER USER c##nir set **container_data=all** container = current;
CONTAINER_DATA 控制将从中查看的数据。