ORA-25153: Temporary Tablespace is Empty
Today, I learned Temporary Table, I encountered for ORA-25153: Temporary Tablespace is Empty
Following Step:
1.create global temporary table tt(id number,name varchar2(10));
2.insert into tt values(1,'lsh');
ORA-25153: Temporary Tablespace is Empty
3.I check the temp tablespace of the current user,find there are no tempfiles
select username,default_tablespace,temporary_tablespace from dba_users
where username='HR';
USERNAME DEFAULT_TABLESPACE TEMPORARY_TABLESPACE
--------------------------------------------------------------------------------------
HR USERS TEMP
select file_name,tablespace_name from dba_temp_files;
no rows
4.alter tablespace temp add temp file '/u01/oradata/lsh/temp02.dbf' size 100m;
5.select file_name,tablespace_name from dba_temp_files;
FILE_NAME TABLESPACE_NAME
----------------------------
/u01/oradata/lsh/temp02.dbf TEMP
6.insert into tt values(1,'lsh');
7.select * from tt;