Create a new temporary tablespace to be default:
CREATE TEMPORARY TABLESPACE temp2 TEMPFILE 'DATAFILE_LOCATION/temp2_01.dbf' SIZE 500M REUSE AUTOEXTEND ON NEXT 20M MAXSIZE unlimited EXTENT MANAGEMENT LOCAL;
ALTER DATABASE DEFAULT TEMPORARY TABLESPACE temp2;
Drop the previously default tablespace:
CREATE TEMPORARY TABLESPACE temp2 TEMPFILE 'DATAFILE_LOCATION/temp2_01.dbf' SIZE 500M REUSE AUTOEXTEND ON NEXT 20M MAXSIZE unlimited EXTENT MANAGEMENT LOCAL;
ALTER DATABASE DEFAULT TEMPORARY TABLESPACE temp2;
Drop the previously default tablespace:
DROP TABLESPACE temp INCLUDING CONTENTS AND DATAFILES;
Create previous tablespace again:
CREATE TEMPORARY TABLESPACE temp TEMPFILE ' DATAFILE_LOCATION /temp_01.dbf' SIZE 500M REUSE AUTOEXTEND ON NEXT 20M MAXSIZE unlimited EXTENT MANAGEMENT LOCAL;
Make it default tablespace:
ALTER DATABASE DEFAULT TEMPORARY TABLESPACE temp;
Drop the temporary tablespace created for swapping:
DROP TABLESPACE temp2 INCLUDING CONTENTS AND DATAFILES;
SELECT tablespace_name, file_name, bytes FROM dba_temp_files WHERE tablespace_name = 'TEMP';
Adding Datafile to a Temporary Tablespace:
Create previous tablespace again:
CREATE TEMPORARY TABLESPACE temp TEMPFILE ' DATAFILE_LOCATION /temp_01.dbf' SIZE 500M REUSE AUTOEXTEND ON NEXT 20M MAXSIZE unlimited EXTENT MANAGEMENT LOCAL;
Make it default tablespace:
ALTER DATABASE DEFAULT TEMPORARY TABLESPACE temp;
Drop the temporary tablespace created for swapping:
DROP TABLESPACE temp2 INCLUDING CONTENTS AND DATAFILES;
SELECT tablespace_name, file_name, bytes FROM dba_temp_files WHERE tablespace_name = 'TEMP';
Adding Datafile to a Temporary Tablespace:
ALTER TABLESPACE temp ADD TEMPFILE '
DATAFILE_LOCATION /temp_02.dbf' SIZE 512m AUTOEXTEND ON NEXT 500M MAXSIZE UNLIMITED;
--------------------------------------------------------
Happy to Help
--------------------------------------------------------
Happy to Help
Comments
Post a Comment