In this article, we will see how tablespaces are managed in a Multi-tenant architecture.

Mainly we have 4 types of tablespaces

  1. System Tablespace.
  2. User permanent tablespace.
  3. Temporary tablespace.
  4. Undo tablespace.

System tablespace must be created while creating a database using either DBCA or manually.

We can see in above output system tablespace is created for each container database.

User Permanent tablespace can be created by giving user_data tablespace clause while creating the database. And by using CREATE TABLESPACE command by connecting into particular CDB or PDB.

Let us understand it by example :

Create datafile in CDB$ROOT

Step 1: Connect to CDB$ROOT and check connected container using show con_name command

Step 2: Create the u_data tablespace

Step 3: check datafile in v$datafile view

We can see here u_data datafile is created under con_id 1 that is CDB$ROOT.

Create datafile in Pluggable database 

Step 1: Connect to a pluggable database

Step 2: Create a tablespace

Step 3: Check v$datafile view

We can see here datafile is created under con_id 7 which is a PDB1 database.

Setting default user tablespace database.

At CDB level

Connect to CDB$ROOT

Use alter database to change default tablespace

At PDB level

Connect to the PDB database :

Use alter pluggable database statement to change default tablespace :

In the next article, we will be managing temporary and undo tablespace in CDB and PDB.

Stay tuned for More articles on Oracle Multitenant

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Telegram Channel:

Skant Gupta’s LinkedIn:

Joel Perez’s LinkedIn: Joel Perez’s Profile

LinkedIn Group: Oracle Cloud DBAAS

Facebook Page: OracleHelp


About The Author

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.