1Z0-060 · Question #92
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…
The correct answer is C. It fails because local users are unable to use the SET CONTAINER statement. Only common users can execute SET CONTAINER to switch between containers in a CDB; local users are architecturally confined to their own PDB and cannot cross container boundaries.
Question
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?
Exhibit
Options
- AIt succeeds because the PDB_ADMIN user has the required privileges.
- BIt fails because common users are unable to use the SET CONTAINER statement.
- CIt fails because local users are unable to use the SET CONTAINER statement.
- DIf fails because the SET CONTAINER statement cannot be used with PDB$SEED as the target pluggable
How the community answered
(16 responses)- A6% (1)
- B19% (3)
- C69% (11)
- D6% (1)
Why each option
Only common users can execute SET CONTAINER to switch between containers in a CDB; local users are architecturally confined to their own PDB and cannot cross container boundaries.
Privilege grants to a local user are irrelevant here because the restriction is architectural - local users cannot cross container boundaries by design, not because of missing privilege grants.
Common users are explicitly permitted to use SET CONTAINER when granted the SET CONTAINER privilege or CREATE SESSION on the target container, so this statement is factually incorrect.
Local users are created within a specific PDB and their sessions are scoped exclusively to that PDB by design. The ALTER SESSION SET CONTAINER command is a CDB-level operation reserved for common users who exist across the entire CDB. Because the user in this scenario is a local user, the statement fails regardless of any privileges that may have been granted within the PDB.
PDB$SEED can be a valid target for SET CONTAINER under certain conditions; the failure in this scenario is caused by the user being a local user, not by any inherent restriction on using PDB$SEED as the target.
Concept tested: CDB SET CONTAINER restriction for local versus common users
Source: https://docs.oracle.com/en/database/oracle/oracle-database/12.2/dbseg/managing-security-for-oracle-database-users.html
Topics
Community Discussion
No community discussion yet for this question.
