Hi guys,
I am testing the Default Containers Target in Oracle 12.2 CDB database (in Linux 6.764-bit)
I have two PDBs: PDB1 and PDB2
I have the LOGIN_AUDIT table owned by a common user (C##USER1) in the two PDBs and in the root as well.
I changed the default container target to PDB2:
conn / as sysdba
ALTER DATABASE CONTAINERS DEFAULT TARGET = (PDB2);
When I connect to the root as the common user that owns the table and execute an update statement on the table LOGIN_AUDIT, the update affects the table in the PDB1 (not the default container target PDB2).
UPDATE CONTAINERS(LOGIN_AUDIT) SET USER_ID='USERx';
SQL> conn C##USER1/oracle
Connected.
SQL> UPDATE CONTAINERS(LOGIN_AUDIT) SET USER_ID='USERx';
3 rows updated.
SQL> SELECT USER_ID FROM LOGIN_AUDIT;
no rows selected
-- this is pdb1:
SQL> SELECT USER_ID FROM CONTAINERS(LOGIN_AUDIT) WHERE CON_ID=3;
USER_
-----
USERx
USERx
-- this is pdb2:
SQL> SELECT USER_ID FROM CONTAINERS(LOGIN_AUDIT) WHERE CON_ID=4;
USER_
-----
USER1
USER2
USER3
Attached is the script to re-produce the issue.
Can anyone explain to me please where I have gone wrong?