Sometimes one of your users run a bad query (often a cartesian join) and use the whole space of your temporary tablespace.
The next thing is all other users complaining due to the lack of space.
The simple solution, rather than one temporary tablespace, you simple create a group with at least two temporary tablespaces, and the maximum that one could use is half of your whole space.
First step is create the group, to do it you must create one tablespace together:
Create temporary tablespace TEMP2 TEMPFILE ‘/u01/temp2.dbf’ size 2g tablespace group GTEMP;
Then you put your former temporary tablespace at the same group:
Alter tablespace TEMP TABLESPACE GROUP GTEMP;
Finally you change your users to the group:
Spool gtemp.sql;
Select ‘Alter user ‘||username|| ‘temporary tablespace GTEMP;’ from dba_users where temporary_tablespace=’TEMP’;
Spool off;
@gtemp.sql