Nir
Nir

Reputation: 2639

What privileges to grant in order to select from all PDBs

Why both select doesnt return the same result? Or if you want more general question - What privileges to grant in order to select from all PDBs.

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

Upvotes: 0

Views: 2669

Answers (1)

Nir
Nir

Reputation: 2639

The answer:

ALTER USER c##nir set **container_data=all** container = current;

CONTAINER_DATA controls the data which will be viewed from.

Upvotes: 1

Related Questions