QuestionQ41

VerifiedUsing General Overall Database Enhancements

You are managing the following configuration:

  1. CDB1 is a container database.
  2. PDB1 and PDB2 are two pluggable databases within CDB1.
  3. USER1.EMP is a table in PDB1, and USER2.DEPT is a table in PDB2.

After successfully connecting to PDB2, the CDB1 user SYS executes the following commands:

Question Image

Which two statements are true?

Choose two
Explanation

In Oracle Multitenant architecture, a transaction cannot span multiple containers. If a transaction is started in one PDB and the session then issues ALTER SESSION SET CONTAINER to move to a different PDB, the original transaction is neither committed nor rolled back — it simply remains open and uncommitted in the container where it began. While that transaction is still active, Oracle blocks any DML, DDL, COMMIT, or ROLLBACK statements in the new container until the session switches back to the container where the transaction started. In this scenario, the two INSERT statements into USER1.EMP were never committed before the session switched to PDB2, so they remain uncommitted at that point. Because that uncommitted transaction is still active in the parent (originating) container PDB1, the subsequent INSERT INTO USER2.DEPT executed while connected to PDB2 fails.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!