What is the result?

In your multitenant container database (CDB) containing pluggable database (PDBs), you granted
the CREATE TABLE privilege to the common user C # # A_ADMIN in root and all PDBs. You
execute the following command from the root container:
SQL > REVOKE create table FROM C # # A_ADMIN;
What is the result?

In your multitenant container database (CDB) containing pluggable database (PDBs), you granted
the CREATE TABLE privilege to the common user C # # A_ADMIN in root and all PDBs. You
execute the following command from the root container:
SQL > REVOKE create table FROM C # # A_ADMIN;
What is the result?

A.
It executes successfully and the CREATE TABLE privilege is revoked from C # # A_ADMIN in
root only.

B.
It fails and reports an error because the CONTAINER=ALL clause is not used.

C.
It excludes successfully and the CREATE TABLE privilege is revoked from C # # A_ADMIN in
root and all PDBs.

D.
It fails and reports an error because the CONTAINER=CURRENT clause is not used.

E.
It executes successfully and the CREATE TABLE privilege is revoked from C # # A_ADMIN in
all PDBs.

Explanation:
REVOKE ..FROM
If the current container is the root:

/ Specify CONTAINER = CURRENT to revoke a locally granted system privilege, object privilege,
or role from a common user or common role. The privilege or role is revoked from the user or role
only in the root. This clause does not revoke privileges granted with CONTAINER = ALL.
/ Specify CONTAINER = ALL to revoke a commonly granted system privilege, object privilege on a
common object, or role from a common user or common role. The privilege or role is revoked from
the user or role across the entire CDB. This clause can revoke only a privilege or role granted with
CONTAINER = ALL from the specified common user or common role. This clause does not revoke
privileges granted locally with CONTAINER = CURRENT. However, any locally granted privileges
that depend on the commonly granted privilege being revoked are also revoked.
If you omit this clause, then CONTAINER = CURRENT is the default.
Oracle Database SQL Language Reference 12c, Revoke



Leave a Reply 7

Your email address will not be published. Required fields are marked *


emavw

emavw

if i granted with “container=all” the answer is B

Dr. Oracle

Dr. Oracle

Correct answer is A

Extortioner

Extortioner

B – tested

Marc

Marc

A

Marc

Marc

Sorry B:

SQL> grant create table to c##A_ADMIN container=ALL;

Grant succeeded.

SQL> revoke create table from c##a_admin;
revoke create table from c##a_admin
*
ERROR at line 1:
ORA-65092: system privilege granted with a different scope to ‘C##A_ADMIN’

SQL> revoke create table from c##a_admin container=all;

Revoke succeeded.

SQL>

Vietnam

Vietnam

B is correct!