Database Reference
In-Depth Information
made PDB1 the current scope database, so adding a new tablespace here will make it avail-
able only to PDB1 :
SQL> create tablespace pdb1_users
2 datafile 'pdb1_users_01.dbf'
3 size 10m autoextend on;
Tablespace created.
SQL> alter user testpdb default tablespace pdb1_users;
User altered.
SQL> GRANT UNLIMITED TABLESPACE TO testpdb;
Grant succeeded.
Now switch back to CDB$ROOT :
SQL> ALTER SESSION SET CONTAINER=CDB$ROOT;
Session altered.
SQL> SHOW CON_NAME
CON_NAME
------------------
CDB$ROOT
SQL>
You can switch between the root and PDBs by using the ALTER SESSION command with
a valid PDB name. The PDB does not have to be open to establish a connection.
SQL> COL pdb_name FORM a20
SQL> SELECT pdb_name, status FROM dba_pdbs;
PDB_NAME STATUS
-------------------- -------------
PDB1 NORMAL
PDB$SEED NORMAL
PDB2 NEW
PDB3 NEW
Search WWH ::




Custom Search