[go: up one dir, main page]

0% found this document useful (0 votes)
49 views2 pages

Chapter - 11 - Creating Tablespace in CDB and PDB

The document provides instructions on creating tablespaces in Oracle's Container Database (CDB) and Pluggable Databases (PDBs). It details the SQL commands for creating permanent and temporary tablespaces, assigning default tablespaces, and managing temporary tablespace settings. Additionally, it explains the limitations and configurations for temporary tablespaces within CDB and PDB environments.

Uploaded by

Parth
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views2 pages

Chapter - 11 - Creating Tablespace in CDB and PDB

The document provides instructions on creating tablespaces in Oracle's Container Database (CDB) and Pluggable Databases (PDBs). It details the SQL commands for creating permanent and temporary tablespaces, assigning default tablespaces, and managing temporary tablespace settings. Additionally, it explains the limitations and configurations for temporary tablespaces within CDB and PDB environments.

Uploaded by

Parth
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

DBA Trainer Oracle DBA - Creating Tablespace in CDB and PDB www.dbatrainer.

con

Creating Tablespace in CDB and PDB


Tablespaces in CDB and PDBs..

Create a Permanent tablespace in the root container:

SQL>connect sys@CDB5

SQL>CREATE TABLESPACE tbs_CDB_users DATAFILE


‘/u01/app/oracle/oradata/CDB5/cdb_users01.dbf’ size 100M;

Create a Permanent tablespace in PDB container:

SQL>connect sys@PDB1

SQL>CREATE TABLESPACE tbs_PDB1_users DATAFILE


'/u01/app/oracle/oradata/CDB/HR/pdb_users01.dbf' size 100M;

Assigning Default Tablespace

 In the CDB:-

SQL>connect sys@CDB1 as sysdba

SQL>alter database default tablespace [tablespace_name];

 In the PDB:-

SQL>connect sys@PDB1 as sysdba

SQL>alter database default tablespace [tablespace_name];

Creating Local Temporary Tablespace

• Only one default temporary tablespace or tablespace group is allowed per CDB or PDB.

• Each PDB can have temporary tablespaces or tablespace groups but only one default
per PDB.

• Temporary tablespaces will be transported with the PDB when it is unplugged.

• When you create user you can specify a temporary tablespace to be used by that user. If
a temporary tablespace is not specified , the default tablespace for the PDB is used. If a
default tablespace has not been specified for the PDB , the temporary tablespace for the
CDB Used.

DBA Trainer - Online Oracle DBA Training Institute Page 1


DBA Trainer Oracle DBA - Creating Tablespace in CDB and PDB www.dbatrainer.con

Creating Local Temporary Tablespace..

• SQL>CREATE TEMPORARY TABLESPACE tbs_hr_temp TEMPFILE


'/u01/app/oracle/oradata/CDB/HR/HR_temp1.dbf' size 100M;

• SQL>ALTER PLUGGABLE DATABASE DEFAULT TEMPORARY TABLESPACE tbs_hr_temp;

• The default temporary tablespace in the CDB is shared by all the PDBs. The amount of
space a single PDB can use in the shared temporary tablespace can be set in the PDB by:

SQL>alter pluggable database storage (MAX_SHARED_TEMP_SIZE 500M);

DBA Trainer - Online Oracle DBA Training Institute Page 2

You might also like