ORA-01652:无法在表空间TEMP

时间:2018-02-05 10:29:53

标签: sql oracle oracle11g oracle10g

我尝试了下面的查询但是我得到的错误就像表空间错误一样。 此外,我将表空间增加到最大。 但是查询在我的测试实例中按预期运行,因为它在Prod中不起作用。

SELECT DISTINCT
    p1.emp_id,
    p1.first_name,
    p1.last_name,
    u1.username,
    u1.system_id
FROM
    person p1
    JOIN username_person ap1 ON p1.person_id    = ap1.person_id
    JOIN username u1         ON ap1.username_id = u1.username_id
    JOIN (
        SELECT
           p.domain_id,
            SUM(
                CASE
                    WHEN(
                        u.username NOT LIKE 'a-%'
                        AND u.status = 'ACTIVE'
                        AND system_id = 349
                    ) THEN 1
                    ELSE 0
                END
            ) AS not_eligible
        FROM
            person p
            JOIN username_person ap ON p.person_id = ap.person_id
            JOIN username u ON ap.username_id = u.username_id
        GROUP BY
            p.emp_id
    ) a ON p1.emp_id = a.emp_id
           AND a.not_eligible = 0
           AND u1.system_id = 123
           AND u1.status = 'ACTIVE'

请找到以下错误:

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.

有没有其他方法可以使用该查询来避免上述错误?

0 个答案:

没有答案