Tablespaces
π§ What Is a Tablespace?
A tablespace is a logical storage container for segments like tables, indexes, and other schema objects that consume space.
Think of it as a folder where Oracle stores structured data.
In a CDB (Container Database), each PDB (Pluggable Database) and application root has its own set of tablespaces.
π¦ Types of Tablespaces in Oracle Multitenant
Tablespace | Description |
---|---|
SYSTEM | π Contains the data dictionary β internal Oracle metadata like tables, views, triggers, and stored code. Required for every PDB. |
SYSAUX | π§° Auxiliary to SYSTEM. Holds data for Oracle features (like AWR, OEM, etc.) that used to require separate tablespaces. |
UNDO | β©οΈ Stores undo information for rolling back transactions. β’ Local undo mode (default): Each PDB has its own undo tablespace. β’ Shared undo mode (for Oracle RAC): One undo tablespace per instance, shared across all containers. |
TEMPORARY | βοΈ Stores temporary or transient data (e.g., sorting results). Each CDB root, application root, and PDB has its own temporary tablespace. No permanent objects reside here; data lasts only for the session. |
User-Created | π§βπ» Tablespaces you create to store user data like application tables and indexes. You can use the default USERS tablespace or create custom ones (e.g., SALES_TBS, HR_TBS) for better organization and management. |
π How Tablespaces Fit Into Storage
Tablespaces map to physical data files on disk.
- One tablespace consists of one or more data files.
- Each PDB or application container manages its own tablespaces.
- Tablespaces are isolated, meaning data files arenβt shared across tablespaces.
π οΈ DBA Tip of the Day
π‘ Define custom tablespaces for large applications or critical modules. This helps improve performance, backup control, and storage management β especially in multitenant environments.