当前位置:网站首页>Oracle modify default temporary tablespace

Oracle modify default temporary tablespace

2022-04-23 13:41:00 Wangcai 2


-- Create a temporary table space
create temporary tablespace wdy_temp 
tempfile 'D:\oracle\app\oracle\oradata\XE\wdy_temp.DBF' 
size 50m 
autoextend on 
next 50m maxsize unlimited
extent management local;

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

alter database default temporary tablespace temp01;

-- View the temporary tablespace currently used by the user

select username,temporary_tablespace from dba_users;

-- Delete the original temporary tablespace

drop tablespace temp including contents and datafiles;

-- Check all tablespace names and confirm whether the temporary tablespace has been deleted

select tablespace_name from dba_tablespaces;

Expand :

-- Add data files to temporary tablespaces

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

-- Modify temporary tablespace data file size

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

版权声明
本文为[Wangcai 2]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230604300659.html