In your multitenant container database (CDB) containing same pluggable databases (PDBs), you execute the
following commands in the root container:
Which two statements are true?
A.
The C # # ROLE1 role is created in the root database and all the PDBs.
B.
The C # # ROLE1 role is created only in the root database because the container clause is not used.
C.
Privileges are granted to the C##A_ADMIN user only in the root database.
D.
Privileges are granted to the C##A_ADMIN user in the root database and all PDBs.
E.
The statement for granting a role to a user fails because the CONTAINER clause is not used.
Explanation:
* You can include the CONTAINER clause in several SQL statements, such as the CREATE USER, ALTER
USER, CREATE ROLE, GRANT, REVOKE, and ALTER SYSTEM statements.
* * CREATE ROLE with CONTAINER (optional) clause
/ CONTAINER = ALL
Creates a common role.
/ CONTAINER = CURRENT
Creates a local role in the current PDB.
The correct answer should be A and D. Since the role is created in the root container, the clause SET CONTAINER=ALL is implicitly implied, which means the role exists in the root and in every existing and future pluggable database (PDB), and the associated privilege applies in all containers. Also, both the name of the role and the user start with C##, which is a must when granting a common role to a common user.