Home >Database >Oracle >How to modify temporary table space in oracle

How to modify temporary table space in oracle

WBOY
WBOYOriginal
2022-03-07 16:40:364887browse

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.

How to modify temporary table space in oracle

The operating environment of this tutorial: Windows 10 system, Oracle 11g version, Dell G3 computer.

How to modify the temporary table space in Oracle

--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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn