What is the result of the last SET CONTAINER statement and why is it so?

You are connected using SQL* Plus to a multitenant container database (CDB) with
SYSDBA privileges and execute the following sequence statements: What is the result of
the last SET CONTAINER statement and why is it so?

You are connected using SQL* Plus to a multitenant container database (CDB) with
SYSDBA privileges and execute the following sequence statements: What is the result of
the last SET CONTAINER statement and why is it so?

A.
It succeeds because the PDB_ADMIN user has the required privileges.

B.
It fails because common users are unable to use the SET CONTAINER statement.

C.
It fails because local users are unable to use the SET CONTAINER statement.

D.
If fails because the SET CONTAINER statement cannot be used with PDB$SEED as the
target pluggable database (PDB).



Leave a Reply 4

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


rodge

rodge

Alexis is incorrect.

PDB_ADMIN is not a common user and therefore cannot SET CONTAINER.
If he were a common user, his username would have to have been created prefixed with a “C##”.
This is the most obvious reason why the user is not a common user

Reference:

https://docs.oracle.com/database/121/DBSEG/users.htm#DBSEG573

Within each PDB, a user name must be unique with respect to other user names and roles.
Note the following restrictions:
The user name cannot start with c## (or C##) unless this user is a common user account.

To create a common user account, follow these rules:

To create a common user, you must be connected to the root and have the commonly granted CREATE USER system privilege.

The session’s current container must be CDB$ROOT.
The name that you give the common user must start with C## or c## and contain only ASCII or EDCDIC characters.

The given answer of C is correct.