Method: 1. Use "drop tablespace temp including contents and datafiles" to delete the original temporary tablespace; 2. Use the "create temporary tablespace" statement to create a new temporary tablespace.
The operating environment of this tutorial: Windows 10 system, Oracle 11g version, Dell G3 computer.
--Query the default temporary table space name of the current database
select * from database_properties where property_name='DEFAULT_TEMP_TABLESPACE';
--Create a new temporary table space
create temporary tablespace temp01 tempfile '/oradata/temp01.dbf' size 2G autoextend on;
--Modify the default table space to the new temporary table space
alter database default temporary tablespace temp01;
--View the temporary table space currently used by the user
select username,temporary_tablespace from dba_users;
--Delete the original temporary table space
drop tablespace temp including contents and datafiles;
--Check all table space names to confirm whether the temporary table space has been deleted
select tablespace_name from dba_tablespaces;
Extension:
--Add data files to the temporary table space
alter tablespace temp01 add tempfile '/oradata/temp02.dbf' size 2G autoextend on;
--Modify the temporary table Spatial data file size
alter database tempfile '/oradata/temp02.dbf' resize 4G;
Recommended tutorial: "Oracle Video Tutorial"
The above is the detailed content of How to modify temporary table space in oracle. For more information, please follow other related articles on the PHP Chinese website!