alter session set container=PDB1; CREATE TEMPORARY TABLESPACE TEMP3 TEMPFILE '/disk1/oradata/PDB1/temp03.dbf' SIZE 20G AUTOEXTEND ON NEXT 128K MAXSIZE 20G TABLESPACE GROUP TEMP_NEW EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M FLASHBACK ON; ALTER DATABASE DEFAULT TEMPORARY TABLESPACE TEMP_NEW; DROP TABLESPACE TEMP1 INCLUDING CONTENTS AND DATAFILES; DROP TABLESPACE TEMP2 INCLUDING CONTENTS AND DATAFILES; CREATE TEMPORARY TABLESPACE TEMP1 TEMPFILE '/disk1/oradata/PDB1/temp01.dbf' SIZE 1G AUTOEXTEND ON NEXT 128K MAXSIZE 20G TABLESPACE GROUP TEMP EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M FLASHBACK ON; CREATE TEMPORARY TABLESPACE TEMP2 TEMPFILE '/disk1/oradata/PDB1/temp02.dbf' SIZE 1G AUTOEXTEND ON NEXT 128K MAXSIZE 20G TABLESPACE GROUP TEMP EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M FLASHBACK ON; ALTER DATABASE DEFAULT TEMPORARY TABLESPACE TEMP; DROP TABLESPACE TEMP3 INCLUDING CONTENTS AND DATAFILES; exitMore about temporary tablespace groups in Oracle 19c here
Minimalistic Oracle contains a collection of practical examples from my encounters with Oracle technologies. When relevant, I also write about other technologies, like Linux or PostgreSQL. Many of the posts starts with "how to" since they derive directly from my own personal experience. My goal is to provide simple examples, so that they can be easily adapted to other situations.
Friday, August 23, 2024
How to cleanup temporary tablespaces in a PDB and create new ones in the right location
Notice how temporary tablespace groups can be used instead of directly referencing the temporary tablespace name:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment