The following query will show how much free space is left in each tablespace. A space check would be the first step in diagnosing and rectifying errors like
'ORA-01654: unable to extend index scott.my_idx by 128 in tablespace
SELECT df.tablespace_name TABLESPACE,
df.total_space TOTAL_SPACE,
fs.free_space FREE_SPACE,
df.total_space_mb TOTAL_SPACE_MB,
(df.total_space_mb - fs.free_space_mb) USED_SPACE_MB,
fs.free_space_mb FREE_SPACE_MB,
ROUND(100 * (fs.free_space / df.total_space),2) PCT_FREE
FROM (SELECT tablespace_name,
SUM(bytes) TOTAL_SPACE,
ROUND(SUM(bytes) / 1048576) TOTAL_SPACE_MB
FROM dba_data_files
GROUP BY tablespace_name) df,
(SELECT tablespace_name,
SUM(bytes) FREE_SPACE,
ROUND(SUM(bytes) / 1048576) FREE_SPACE_MB
FROM dba_free_space
GROUP BY tablespace_name) fs
WHERE df.tablespace_name = fs.tablespace_name (+)
ORDER BY PCT_FREE asc;
If you find that a Tablespace is lacking in freeSpace, you might want to add extra space to it by issuing the following command.
ALTER TABLESPACE TABLESPACENAME
ADD DATAFILE '/slot01/oracle/mydbdata/tablespacenamexx.dbf' SIZE 500 M
With Excerpts from: http://www.psoug.org/reference/tablespaces.html