This is for Oracle 9i.
1) All users should be logged off the system and you should have a current backup.
2) This command lists the temp datafiles used by the TEMP tablespace:
SELECT tablespace_name, file_name, bytes
FROM dba_temp_files WHERE tablespace_name = 'TEMP';
3) This command drops the temp datafiles (change filename):
ALTER DATABASE
TEMPFILE 'e:\douglas\oracle\oradata\orcl\temp01.dbf'
DROP INCLUDING DATAFILES;
4) This command adds a new tempfile with the indicated sizes :
ALTER TABLESPACE temp ADD
TEMPFILE 'e:\douglas\oracle\oradata\orcl\temp01.dbf'
SIZE 100M AUTOEXTEND ON NEXT 25M MAXSIZE 1024M;