Question 10
Examine the commands executed in the root container of your multitenant container database (CDB) that has multiple pluggable databases (PDBs):
SQL> CREATE USER c##a_admin IDENTIFIED BY orcl123;
SQL> CREATE ROLE c##role1 CONTAINER=ALL;
SQL> GRANT CREATE VIEW TO C##roleI CONTAINER=ALL;
SQL> GRANT c##role1 TO c##a_admin CONTAINER=ALL;
SQL> REVOKE c##role1 FROM c##a_admin;
What is the result of the revoke command?
It executes successfully and the c##role1 role is revoked from the c##a_admin user only in the root container.
It fails and reports an error because the container=all clause is not used.
It executes successfully and the c##rocl1 role is revoked from the c##a_admin user in the root database and all the PDBs.
It fails and reports an error because the comtainer=current clause is not used.
Correct answer: B
Explanation:
SQL> REVOKE c##role1 FROM c##a_admin; REVOKE c##role1 FROM c##a_admin * ERROR at line 1: ORA - 01951: ROLE ‘C##ROLE1’ not granted to ‘C##A_ADMIN’ SQL> REVOKE c##role1 FROM c##a_admin CONTAINER=ALL; Revoke succeeded. SQL> This CREATE USER c##a_admin IDENTIFIED BY orcl123; will create common user event container is not specified.
SQL> REVOKE c##role1 FROM c##a_admin; REVOKE c##role1 FROM c##a_admin * ERROR at line 1: ORA - 01951: ROLE ‘C##ROLE1’ not granted to ‘C##A_ADMIN’ SQL> REVOKE c##role1 FROM c##a_admin CONTAINER=ALL; Revoke succeeded. SQL> This CREATE USER c##a_admin IDENTIFIED BY orcl123; will create common user event container is not specified.