Home > Database > Oracle > body text

How to modify temporary table space in oracle

WBOY
Release: 2022-03-07 16:40:36
Original
4828 people have browsed it

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';
Copy after login

--Create a new temporary table space

create temporary tablespace temp01   tempfile '/oradata/temp01.dbf' size 2G autoextend on;
Copy after login

--Modify the default table space to the new temporary table space

alter database default temporary tablespace temp01;
Copy after login

--View the temporary table space currently used by the user

select username,temporary_tablespace from dba_users;
Copy after login

--Delete the original temporary table space

drop tablespace temp including contents and datafiles;
Copy after login

--Check all table space names to confirm whether the temporary table space has been deleted

select tablespace_name from dba_tablespaces;
Copy after login

Extension:

--Add data files to the temporary table space

alter tablespace temp01 add tempfile '/oradata/temp02.dbf' size 2G autoextend on;
Copy after login

--Modify the temporary table Spatial data file size

alter database tempfile '/oradata/temp02.dbf' resize 4G;
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template