I am trying to execute below query in Oracle:
SELECT DISTINCT
t4.s_studentreference "Student ID",
t3.p_surname "Surname",
t3.p_forenames "Forenames",
t1.m_reference "Course",
t2.e_name "Enrolment Name"
FROM student t4,
person t3,
enrolment t2,
course t1
WHERE t4.s_id(+) =t3.p_id
AND (t2.e_student=t3.p_id)
AND (t2.e_course =t1.m_id)
AND (t1.m_reference LIKE 'LL563%15')
OR (t1.m_reference LIKE 'LL562%15')
OR (t1.m_reference LIKE 'LL563%16')
OR (t1.m_reference LIKE 'LL562%16')
But, I am getting below error:
ORA-01652: unable to extend temp segment by 128 in tablespace TEMP
01652. 00000 - "unable to extend temp segment by %s in tablespace %s"
*Cause: Failed to allocate an extent of the required number of blocks for
a temporary segment in the tablespace indicated.
*Action: Use ALTER TABLESPACE ADD DATAFILE statement to add one or more
files to the tablespace indicated.
I used below query to find temp segment space:
select inst_id, tablespace_name, total_blocks, used_blocks, free_blocks
from gv$sort_segment;
Gives:
INST_ID, TABLESPACE_NAME, TOTAL_BLOCKS, USED_BLOCKS, FREE_BLOCKS
1 TEMP 3199872 15360 3184512
Any idea how to resolve?
Thanks, Aruna