1:查看旧临时表空间信息
set pagesize 999
set linesize 160
col PROPERTY_NAME for a26
col PROPERTY_VALUE for a18
SELECT PROPERTY_NAME, PROPERTY_VALUE FROM DATABASE_PROPERTIES WHERE PROPERTY_NAME='DEFAULT_TEMP_TABLESPACE';
set pagesize 999
set linesize 160
col USERNAME for a30
col TEMPORARY_TABLESPACE for a18
SELECT USERNAME, TEMPORARY_TABLESPACE FROM DBA_USERS;
2:创建中转的临时表空间
CREATE TEMPORARY TABLESPACE TEMP02 TEMPFILE '/data/orcl/temp_01.dbf' SIZE 8G AUTOEXTEND ON maxsize 30G;
3:切换临时表空间。
ALTER DATABASE DEFAULT TEMPORARY TABLESPACE TEMP02;
4:重新指定用户临时表空间为新建的临时表空间
select 'alter user '|| username ||' TEMPORARY TABLESPACE TEMP02 ;' from dba_users;
5:删除旧的临时表空间数据文件
DROP TABLESPACE TEMP INCLUDING CONTENTS AND DATAFILES;