oracle临时表空间

--查看临时表空间
SELECT * FROM v$tablespace;
SELECT * FROM dba_tablespaces;
--查看所有临时表空间文件
SELECT * FROM dba_data_files;
--查看临时临时表空间文件
SELECT * FROM dba_temp_files;
--查看临时表空间组
SELECT * FROM dba_tablespace_groups;

--查找默认临时表空间
SELECT * FROM database_properties where property_name='DEFAULT_TEMP_TABLESPACE';

--创建是临时表空间 不属于组
create temporary tablespace temp2 tempfile 'E:APPADMINISTRATORORADATAOUNION emp2a.dbf' size 10m autoextend on;

--创建是临时表空间 属于组
create temporary tablespace temp3 tempfile 'E:APPADMINISTRATORORADATAOUNION emp3a.dbf' size 10m autoextend on
tablespace group temp_grp;

--将temp2加入组temp_grp
alter tablespace temp2 tablespace group temp_grp;
--将temp2移除组temp_grp
alter tablespace temp2 tablespace group '';

--将temp2添加一个临时文件
alter tablespace temp2 add tempfile 'E:APPADMINISTRATORORADATAOUNION emp2b.dbf'size 10m autoextend on ;

--修改系统默认临时表空间为组:
alter database default temporary tablespace temp_grp;
--修改系统默认临时表空间
alter database default temporary tablespace temp2;

原文地址:https://www.cnblogs.com/523823-wu/p/8665856.html