TEMP SEGMENT ERROR.

I am getting following error while refreshing the mview.
before it was taking only lest than 2 mints. but now it taking hours and after that i am getting error..
i saw the explain plan and i found lot of waiting
DIRECT PATH WRITE/READ is happening..
my temp tablespace size is 38GB
anybody knows the reason??
how do u improve the performace of HASH joins???
ERROR at line 1:
ORA-12008: error in materialized view refresh path
ORA-01652: unable to extend temp segment by 128 in tablespace TEMP
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 803
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 860
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 841
ORA-06512: at line 1
Regards,
Sandeep Patil.

CREATE MATERIALIZED VIEW "CDRT_STG"."BORR_NORM_N_MV" PCTFREE 10
PCTUSED 0 MAXTRANS 255
STORAGE ( INITIAL 102400K NEXT 1024K MINEXTENTS 1 MAXEXTENTS
2147483645 PCTINCREASE 0) TABLESPACE "CDRT_STG_DATA"
BUILD IMMEDIATE REFRESH COMPLETE ON DEMAND
ENABLE QUERY REWRITE AS
SELECT *
FROM (
SELECT BORR.BORROWER_PK AS B1_BORR_PK, BORR.LOAN_FK1 AS
B1_LOAN_FK1, LOANORIGSYSTEM_LOAN_ID AS
B1_LOAN_ORIG_SYS_LOAN_ID,
BORR.ALIMONY_CHILD_SUPP_OBLIG_IND AS
B1_ALIMONY_CHILDSUPPOBLIG_IND, BORR.BANKRUPTCY_IND AS
B1_BANKRUPTCY_IND, BORR.BORR_DOWN_PAYMENT_IND AS
B1_BORR_DOWN_PAYMENT_IND,
BORR.CITIZENSHIP_RESIDENCY_TYPE AS B1_CTZN_RESIDENCY_TYPE,
BORR.COMAKER_ENDORSER_OF_NOTE_IND AS
B1_CO_MKR_ENDORSER_OF_NOTE_IND,
BORR.HOMEOWNERPASTTHREEYEARSTYPE AS
B1_HOME_OWNER_PAST3YEARS_TYPE, BORR.INTENTTOOCCUPYTYPE
AS B1_INTENT_TO_OCCUPY_TYPE,
BORR.LOAN_FORECLOSUREORJUDGEMNT_IND AS
B1_LOAN_FCLOS_ORJUDGEMNT_IND,
BORR.OUTSTANDNG_JUDGEMNTS_IND AS B1_OUTSTANDNG_JUDGEMNTS_IND,
BORR.PARTYTOLAWSUITINDICATOR AS B1_PARTYTOLAWSUIT_IND,
BORR.CURR_DELINQUENT_IND AS B1_CURR_DELINQUENT_IND,
BORR.PRIORPROPERTYTITLETYPE AS B1_PRIORPROP_TITLETYPE,
BORR.PRIORPROPERTYUSAGETYPE AS B1_PRIORPROP_USAGETYPE,
BORR.PROP_FORECLSD_PASTSEVENYRS_IND AS
B1_PROP_FCLOSD_PAST_7_YRS_IND,
BORR.BORR_FIRSTTIMEHOMEBUYER_IND AS
B1_BORR_FIRSTTIMEHOMEBUYER_IND, BORR.CAIVRSIDENTIFIER AS
B1_CAIVRSIDENTIFIER, BORR.VETERANSTATUSINDICATOR AS
B1_VETERANSTATUS_IND,
BORR.CER_SALESPRICEEXCDSAPPRVALTYPE AS
B1_CER_SALESPRCEXCDSAPPRVALTYP, BORR.HMDAETHNICITYTYPE
AS B1_HMDAETHNICITYTYPE, BORR.GENDERTYPE AS
B1_GENDERTYPE, BORR.OTHER_RACE_NATIONAL_ORIG_DESC AS
B1_OTHER_RACE_NATL_ORIG_DESC,
BORR.RACE_NATIONL_ORIGN_REFUSAL_IND AS
B1_RACE_NATL_ORIGN_REFUSAL_IND,
BORR.VACO_BORR_NON_TAXABLINCOME_AMT AS
B1_VACO_BORR_NON_TAX_INC_AMT,
BORR.VACO_BORR_TAXABL_INCOME_AMT AS
B1_VACO_BORR_TAXABL_INC_AMT, BORR.VAFEDERALTAXAMOUNT AS
B1_VAFEDERALTAXAMOUNT, BORR.VALOCALTAXAMOUNT AS
B1_VALOCALTAXAMOUNT, BORR.VA_PRIM_BORR_NTAX_INCM_AMT AS
B1_VA_PRIM_BORR_NTAX_INCM_AMT,
BORR.VAPRIMARYBORR_TAXABL_INCOM_AMT AS
B1_VAPRIMBORR_TAX_INC_AMT,
BORR.VASOCIALSECURITYTAXAMOUNT AS
B1_VASOCIALSECURITYTAXAMOUNT, BORR.VASTATETAXAMOUNT AS
B1_VASTATETAXAMOUNT, BORR.CERTIFICATIONOCCUPANCYTYPE AS
B1_CERTIFICATIONOCCUPANCYTYPE,
BORR.CERT_OWN_OTHER_PROP_IND AS B1_CERT_OWN_OTHER_PROP_IND,
BORR.CERT_LEAD_PAINT_IND AS B1_CERT_LEAD_PAINT_IND,
BORR.CERT_OWN4ORMORE_DWELLINGS_IND AS
B1_CERT_OWN4ORMORE_DWELNGS_IND,
BORR.CERTIFICATIONPROPERTYSOLDCITY AS B1_CERT_PROP_SOLDCITY,
BORR.CERT_PROP_SOLD_POSTAL_CODE AS
B1_CERT_PROP_SOLD_POSTAL_CODE,
BORR.CERT_ORIG_MORTGAGE_AMT AS B1_CERT_ORIG_MORTGAGE_AMT,
BORR.CERTIFICATIONSALESPRICEAMOUNT AS B1_CERT_SALESPRICEAMT,
BORR.CERTIFICATIONRENTALINDICATOR AS
B1_CERT_RENTAL_IND, BORR.CERT_PROPERTY2BE_SOLD_IND AS
B1_CERT_PROP_2BE_SOLD_IND,
BORR.CERTIFICATIONPROPERTYSOLDSTATE AS B1_CERT_PROP_SOLDSTATE,
BORR.CERT_PROPERTY_SOLD_STREET_ADD AS
B1_CERT_PROP_SOLD_STREET_ADD, BORR.NAME AS B1_BORR_NAME,
BORR.RELATIONSHIPDESCRIPTION AS
B1_RELATIONSHIPDESCRIPTION, BORR.TELEPHONENUMBER AS
B1_PHONE_NBR, BORR.NONPERSONENTITYINDICATOR AS
B1_NONPERSONENTITY_IND, BORR.UNPARSEDNAME AS
B1_UNPARSEDNAME, BORR.TITLEDESCRIPTION AS
B1_TITLEDESCRIPTION, BORR.SIGNINGCAPACITYTEXTDESCRIPTION
AS B1_SIGNINGCAPACITYTEXT_DESC,
BORR.JOINT_ASSET_LIAB_REPORTING_TYP AS
B1_JOINT_ASSET_LIAB_REPTNG_TYP,
BORR.JOINTASSETBORROWERID AS B1_JOINT_ASSET_BORR_ID,
BORR.AGEATAPPLICATIONYEARS AS B1_AGEATAPPLICATIONYEARS,
BORR.APPLICATIONSIGNEDDATE AS B1_APPLICATIONSIGNEDDATE,
BORR.PRINTPOSITIONTYPE AS B1_PRINTPOSITIONTYPE,
BORR.DEPENDENTCOUNT AS B1_DEPENDENTCOUNT,
BORR.MARITALSTATUSTYPE AS B1_MARITALSTATUSTYPE,
BORR.SCHOOLINGYEARS AS B1_SCHOOLINGYEARS,
BORR.BORROWERNONOBLIGATEDINDICATOR AS
B1_BORR_NONOBLIGATED_IND, BORR.RELATIONSHIPTITLETYPE AS
B1_RELATIONSHIPTITLETYPE, BORR.RELSHIP_TITLETYPOTHRDES
AS B1_RELSHIP_TITLETYPOTHRDES,
TO_CHAR(BORR_TYP.BORROWERID) AS B1_SEQUENCEIDENTIFIER,
BORR.CREDITREPORTIDENTIFIER AS B1_CREDITREPORTIDENTIFIER,
BORR.PTPDOCUMENTUSEDTOIDENTIFYTYPE AS
B1_PTP_DOC_USEDTOIDENT_TYPE,
BORR.ALTERNATE_DOC_IDENTIFIER AS B1_ALTERNATE_DOC_IDENTIFIER,
BORR.ALTERNATE_DOC_VERIFIED_DATE AS
B1_ALTERNATE_DOC_VERIFIED_DATE,
BORR.PTPEXCLUDELIABILITIESINDICATOR AS
B1_PTP_EXCLUDELIABILITIES_IND,
BORR.PTPEXCLUDEINCOMEINDICATOR AS B1_PTPEXCLUDEINC_IND,
BORR.PTPTYPE AS B1_PTPTYPE,
BORR.INCOME_YTD_VERIFICATN_END_DATE AS
B1_INC_YTD_VERIFICATN_END_DATE,
BORR.PTPINCOMEVERIFIEDPRIORYEAR AS B1_PTPINCVERIFIEDPRIORYEAR,
BORR.SIMPLEADDRESS0 AS B1_SIMPLEADDRESS0,
BORR.HMDARACETYPE AS B1_HMDARACETYPE, BORR.HMDARACETYPE0
AS B1_HMDARACETYPE0, BORR.HMDARACETYPE1 AS
B1_HMDARACETYPE1, BORR.HMDARACETYPE2 AS B1_HMDARACETYPE2,
BORR.HMDARACETYPE3 AS B1_HMDARACETYPE3,
NME.FIRSTNAME AS B1_FIRSTNAME, NME.LASTNAME AS
B1_LASTNAME, NME.MIDDLENAME AS B1_MIDDLENAME,
NME.NAMESUFFIX AS B1_NAMESUFFIX, ADR.STREETADDRESS AS
B1_ADDRESS1, ADR.STREETADDRESS2 AS B1_ADDRESS2,
ADR.CITY0 AS B1_CITY, ADR.STATE0 AS B1_STATE,
ADR.POSTALCODE AS B1_ZIPCODE, BDPH.VALUE AS B1_PHONE,
BCSF.CREDITSCOREVALUE AS B1_FICO_EQUIFAX,
BCSFD.CREDITSCOREDATE AS B1_FICO_EQUIFAX_DATE,
BCSFE.CREDITSCOREVALUE AS      B1_FICO_EXPERIAN,
BCSFED.CREDITSCOREDATE AS      B1_FICO_EXPERIAN_DATE,
BCSFT.CREDITSCOREVALUE AS      B1_FICO_TRANSUNION,
BCSFTD.CREDITSCOREDATE AS      B1_FICO_TRANSUNION_DATE,
BRIR.BORROWERRESIDENCYBASISTYPE AS
B1_BORR_RESIDENCYBASISTYPE, BCIB.MONTHLYTOTALAMOUNT AS
B1_BASE_INC, BCIO.MONTHLYTOTALAMOUNT AS
B1_OVERTIME_INC, BCIBS.MONTHLYTOTALAMOUNT AS
B1_BONUS_INC, BCIC.MONTHLYTOTALAMOUNT AS
B1_COMMISSION_INC, BCID.MONTHLYTOTALAMOUNT AS
B1_DIVINTEREST_INC, BCIN.MONTHLYTOTALAMOUNT AS
B1_NETRENT_INC, BCIO1.OTHER_INCOME1 AS B1_OTHER_INC1,
0 AS B1_OTHER_INC2, 0 AS B1_OTHER_INC3,
BENM.NAME AS B1_EMP_NAME, BEPH.TELEPHONENUMBER AS
B1_EMP_TPHONE_NUM, BEBE.SELF_EMPLOYED_INDICATOR AS
B1_BORR_SELFEMPLOYED_IND,
BEEP.EMPLOYMENTPOSITIONDESCRIPTION AS
B1_EMPLOYMENTPOSITION_DESC, BEPT.PTPVERIFICATION AS
B1_PTPVERIFICATION, BORR_TYP.SSN AS B1_SSN,
BORR_TYP.BIRTHDATE AS B1_BIRTHDATE, DET_ADD.COUNTY AS
B1_COUNTY, DET_ADD.COUNTRY AS B1_COUNTRY,
BSME.MONTHLY_HOUS_EXP_AMT AS B1_MONTHLY_HOUS_EXP_AMT,
BSST.SUBTOTAUTOASSETVALUE AS B1_SUBTOTAUTOASSETVALUE,
BSSTA.SUBTOTCHECKINGSAVBAL AS B1_SUBTOTCHECKINGSAVBAL,
BSSFC.SUBTOTLIFEINSCASHVAL AS B1_SUBTOTLIFEINSCASHVAL,
BSSTSV.SUBTOTOTHERASSETVAL AS B1_SUBTOTOTHERASSETVAL,
BSSTFV.SUBTOTRETIREMENTFUNDVAL AS
B1_SUBTOTRETIREMENTFUNDVAL, BSSDD.STOCKSANDBONDSVAL AS
B1_STOCKSANDBONDSVAL, BSTB.TOTALLIABILITIESBALANCE AS
B1_TOTALLIABILITIESBALANCE,
BSSTBE.SUBTOTALLIABILITIESBALANCE AS
B1_SUBTOTALLIABILITIESBALANCE,
BSICTA.CUR_MON_INC_TOT_AMT AS B1_CUR_MON_INC_TOT_AMT,
BORR.PTPCREDITREPORTORDEREDDATE AS
B1_PTPCREDITREPORTORDEREDDATE, RANK() OVER (PARTITION BY
LOANORIGSYSTEM_LOAN_ID ORDER BY BORR.LOAN_FK1 DESC) AS MYRANK
FROM CDRT_STG.IM_BORROWER_IN BORR,
CDRT_STG.IM_SIMPLE_BORR_TYPE_IN BORR_TYP,
CDRT_STG.IM_MAILINGADDRESS_IN M_ADD,
CDRT_STG.IM_MAILINGADDRESSTYPE_IN M_ADDTYP,
CDRT_STG.IM_DETAILEDNAME_TYPE_IN DET,
CDRT_STG.IM_SIMPLENAMETYPE_IN NME, CDRT_STG.IM_LOAN_IN
LOAN, CDRT_STG.IM_DETAILED_ADD_TYPE_IN DET_ADD,
CDRT_STG.IM_SIMPLEADDRESSTYPE_IN ADR, (SELECT
PTPSIMPLEBORROWERTYPE_FK1, value
from (
SELECT PTPSIMPLEBORROWERTYPE_FK1, VALUE, rank() over
(partition by PTPSIMPLEBORROWERTYPE_FK1 order by value )
my_rank
FROM CDRT_STG.IM_CONTACT_DETAIL_IN,CDRT_STG.IM_BORROWER_IN
WHERE PTPSIMPLEBORROWERTYPE_FK1 = BORROWER_SNAME_FK1
and IM_CONTACT_DETAIL_IN.TYPE1 = 'Phone')
where my_rank = 1) BDPH, (SELECT BORROWER_FK1,
CREDITSCOREVALUE
FROM (SELECT BORROWER_FK1,CREDITSCOREVALUE ,rank() over
(partition by BORROWER_FK1 order by CREDITSCOREVALUE) my_rank
FROM CDRT_STG.IM_CREDIT_SCORE_IN
WHERE CreditRepositorySourceType0 ='Equifax')
where my_rank=1) BCSF, (SELECT BORROWER_FK1,
CREDITSCOREDATE
FROM (
SELECT BORROWER_FK1,CREDITSCOREDATE,rank() over (partition by
BORROWER_FK1 order by CREDITSCOREDATE ) my_rank
FROM CDRT_STG.IM_CREDIT_SCORE_IN
WHERE CreditRepositorySourceType0 ='Equifax')
where my_rank=1) BCSFD, (SELECT BORROWER_FK1,
CREDITSCOREVALUE
FROM (SELECT BORROWER_FK1,CREDITSCOREVALUE ,rank() over
(partition by BORROWER_FK1 order by CREDITSCOREVALUE) my_rank
FROM CDRT_STG.IM_CREDIT_SCORE_IN
WHERE CreditRepositorySourceType0 ='Experian' )
where my_rank=1) BCSFE, (SELECT BORROWER_FK1,
CREDITSCOREDATE
FROM (
SELECT BORROWER_FK1,CREDITSCOREDATE ,rank() over (partition
by BORROWER_FK1 order by CREDITSCOREDATE) my_rank
FROM CDRT_STG.IM_CREDIT_SCORE_IN
WHERE CreditRepositorySourceType0 ='Experian' )
where my_rank=1) BCSFED, (SELECT BORROWER_FK1,
CREDITSCOREVALUE
FROM (
SELECT BORROWER_FK1,CREDITSCOREVALUE, rank() over (
partition by BORROWER_FK1 order by CREDITSCOREVALUE) my_rank
FROM CDRT_STG.IM_CREDIT_SCORE_IN
WHERE CreditRepositorySourceType0 ='TransUnion' )
where my_rank=1) BCSFT, (SELECT BORROWER_FK1,
CREDITSCOREDATE
FROM (
SELECT BORROWER_FK1,CREDITSCOREDATE, rank() over (
partition by BORROWER_FK1 order by CREDITSCOREDATE) my_rank
FROM CDRT_STG.IM_CREDIT_SCORE_IN
WHERE CreditRepositorySourceType0 ='TransUnion' )
where my_rank=1) BCSFTD, (SELECT BORROWER_FK2,
BORROWERRESIDENCYBASISTYPE
FROM CDRT_STG.IM_RESIDENCE_IN
WHERE BORROWERRESIDENCYTYPE='Current') BRIR, (SELECT
BORROWERFK3,MONTHLYTOTALAMOUNT
FROM (SELECT BORROWERFK3,MONTHLYTOTALAMOUNT ,rank() over (
partition by BORROWERFK3 order by MONTHLYTOTALAMOUNT) my_rank
FROM CDRT_STG.IM_CURR_INCOME_IN
WHERE INCOMETYPE = 'Base' )
where my_rank=1) BCIB, (SELECT BORROWERFK3,
MONTHLYTOTALAMOUNT
FROM (SELECT BORROWERFK3,MONTHLYTOTALAMOUNT ,rank() over (
partition by BORROWERFK3 order by MONTHLYTOTALAMOUNT) my_rank
FROM CDRT_STG.IM_CURR_INCOME_IN
WHERE INCOMETYPE = 'Overtime' )
where my_rank=1) BCIO, (SELECT BORROWERFK3,
MONTHLYTOTALAMOUNT
FROM (SELECT BORROWERFK3,MONTHLYTOTALAMOUNT ,rank() over (
partition by BORROWERFK3 order by MONTHLYTOTALAMOUNT) my_rank
FROM CDRT_STG.IM_CURR_INCOME_IN
WHERE INCOMETYPE = 'Bonus' )
where my_rank=1) BCIBS, (SELECT BORROWERFK3,
MONTHLYTOTALAMOUNT
FROM (SELECT BORROWERFK3,MONTHLYTOTALAMOUNT ,rank() over (
partition by BORROWERFK3 order by MONTHLYTOTALAMOUNT) my_rank
FROM CDRT_STG.IM_CURR_INCOME_IN
WHERE INCOMETYPE = 'Commissions' )
where my_rank=1) BCIC, (SELECT BORROWERFK3,
MONTHLYTOTALAMOUNT
FROM (SELECT BORROWERFK3,MONTHLYTOTALAMOUNT ,rank() over (
partition by BORROWERFK3 order by MONTHLYTOTALAMOUNT) my_rank
FROM CDRT_STG.IM_CURR_INCOME_IN
WHERE INCOMETYPE = 'DividendsInterest' )
where my_rank=1) BCID, (SELECT BORROWERFK3,
MONTHLYTOTALAMOUNT
FROM (SELECT BORROWERFK3,MONTHLYTOTALAMOUNT ,rank() over (
partition by BORROWERFK3 order by MONTHLYTOTALAMOUNT) my_rank
FROM CDRT_STG.IM_CURR_INCOME_IN
WHERE INCOMETYPE = 'NetRentalIncome' )
where my_rank=1) BCIN, (SELECT BORROWERFK3,
NVL(SUM(MONTHLYTOTALAMOUNT),0) as OTHER_INCOME1
FROM CDRT_STG.IM_CURR_INCOME_IN
WHERE INCOMETYPE NOT IN('Base','Overtime', 'Bonus',
'Commissions', 'DividendsInterest','Overtime') group by
BORROWERFK3) BCIO1, (SELECT BORROWER_FK6,NAME
FROM (SELECT BORROWER_FK6,NAME ,rank() over (
partition by BORROWER_FK6 order by NAME) my_rank
FROM CDRT_STG.IM_EMPLOYER_IN
WHERE EMPLOYMENTCURRENTINDICATOR = 'Y')
where my_rank=1) BENM, (SELECT BORROWER_FK6,
TELEPHONENUMBER
FROM (
SELECT BORROWER_FK6,TELEPHONENUMBER ,rank() over (
partition by BORROWER_FK6 order by TELEPHONENUMBER) my_rank
FROM CDRT_STG.IM_EMPLOYER_IN
WHERE EMPLOYMENTCURRENTINDICATOR = 'Y')
where my_rank=1) BEPH, (SELECT BORROWER_FK6,
SELF_EMPLOYED_INDICATOR
FROM (
SELECT BORROWER_FK6,SELF_EMPLOYED_INDICATOR ,rank() over (
partition by BORROWER_FK6 order by SELF_EMPLOYED_INDICATOR)
my_rank
FROM CDRT_STG.IM_EMPLOYER_IN
WHERE EMPLOYMENTCURRENTINDICATOR = 'Y')
where my_rank=1) BEBE, (SELECT BORROWER_FK6,
EMPLOYMENTPOSITIONDESCRIPTION
FROM (
SELECT BORROWER_FK6,EMPLOYMENTPOSITIONDESCRIPTION ,rank()
over (
partition by BORROWER_FK6 order by
EMPLOYMENTPOSITIONDESCRIPTION) my_rank
FROM CDRT_STG.IM_EMPLOYER_IN
WHERE EMPLOYMENTCURRENTINDICATOR = 'Y')
where my_rank=1) BEEP, (SELECT BORROWER_FK6,
PTPVERIFICATION
FROM (
SELECT BORROWER_FK6,PTPVERIFICATION ,rank() over (
partition by BORROWER_FK6 order by PTPVERIFICATION) my_rank
FROM CDRT_STG.IM_EMPLOYER_IN
WHERE EMPLOYMENTCURRENTINDICATOR = 'Y')
where my_rank=1) BEPT, (SELECT BORROWER_FK1,
NVL(SUM(AMOUNT3), 0) AS MONTHLY_HOUS_EXP_AMT
FROM CDRT_STG.IM_SUMMARY_IN GROUP BY BORROWER_FK1) BSME,
(SELECT BORROWER_FK1,NVL(SUM(AMOUNT3),0) AS
SUBTOTAUTOASSETVALUE
FROM CDRT_STG.IM_SUMMARY_IN
WHERE AMOUNT_TYPE = 'SubtotalAutoAssetsValue' group by
BORROWER_FK1) BSST, (SELECT BORROWER_FK1,
NVL(SUM(AMOUNT3),0) AS SUBTOTCHECKINGSAVBAL
FROM CDRT_STG.IM_SUMMARY_IN
WHERE AMOUNT_TYPE = 'SubtotalCheckingSavingsBalance' group
by BORROWER_FK1) BSSTA, (SELECT BORROWER_FK1,
NVL(SUM(AMOUNT3),0) AS SUBTOTLIFEINSCASHVAL
FROM CDRT_STG.IM_SUMMARY_IN
WHERE AMOUNT_TYPE = 'SubtotalLifeInsuranceCashValue' group
by BORROWER_FK1) BSSFC, (SELECT BORROWER_FK1,
NVL(SUM(AMOUNT3),0) AS SUBTOTOTHERASSETVAL
FROM CDRT_STG.IM_SUMMARY_IN
WHERE AMOUNT_TYPE = 'SubtotalOtherAssetsValue' group by
BORROWER_FK1) BSSTSV, (SELECT BORROWER_FK1,
NVL(SUM(AMOUNT3),0) AS SUBTOTRETIREMENTFUNDVAL
FROM CDRT_STG.IM_SUMMARY_IN
WHERE AMOUNT_TYPE = 'SubtotalRetirementFundsValue' group by
BORROWER_FK1) BSSTFV, (SELECT BORROWER_FK1,
NVL(SUM(AMOUNT3),0) AS STOCKSANDBONDSVAL
FROM CDRT_STG.IM_SUMMARY_IN
WHERE AMOUNT_TYPE = 'SubtotalStocksAndBondsValue' GROUP BY
BORROWER_FK1) BSSDD, (SELECT BORROWER_FK1,
SUM(NVL(AMOUNT3,0)) AS TOTALLIABILITIESBALANCE
FROM CDRT_STG.IM_SUMMARY_IN
WHERE AMOUNT_TYPE = 'TotalLiabilitesBalance' group by
BORROWER_FK1) BSTB, (SELECT BORROWER_FK1,
NVL(SUM(AMOUNT3),0) AS SUBTOTALLIABILITIESBALANCE
FROM CDRT_STG.IM_SUMMARY_IN
WHERE AMOUNT_TYPE = 'SubtotalLiabilitesMonthlyPayment' group
by BORROWER_FK1) BSSTBE, (SELECT BORROWERFK3,
NVL(SUM(MONTHLYTOTALAMOUNT),0) AS CUR_MON_INC_TOT_AMT
FROM CDRT_STG.IM_CURR_INCOME_IN GROUP BY BORROWERFK3) BSICTA
WHERE BORR_TYP.PTPSIMPLEBORROWERTYPE_PK(+) =
BORR.BORROWER_SNAME_FK1
AND BORR_TYP.PTPSIMPLEBORROWERTYPE_PK =
M_ADD.SIMPLEBORROWERTYPE_FK(+)
AND M_ADDTYP.MAILINGADDRESSTYPE_PK(+) = M_ADD.MAILINGADDRESS
AND BORR_TYP.NAME13 = DET.DETAILEDNAMETYPE_PK(+)
AND NME.SIMPLENAMETYPE_PK(+) = DET.SIMPLENAMETYPE_FK
AND BORR.LOAN_FK1 = LOAN.LOAN_PK(+)
AND DET_ADD.DETAILEDADDRESSTYPE_PK(+) =
M_ADDTYP.DET_ADDRESS_TYPE_FK
AND ADR.SIMPLEADDRESSTYPE_PK(+) =
DET_ADD.SIMPLEADDRESSTYPE_FK1
AND BDPH.PTPSIMPLEBORROWERTYPE_FK1(+) =
BORR.BORROWER_SNAME_FK1
AND BCSF.BORROWER_FK1(+) = BORR.BORROWER_PK
AND BCSFD.BORROWER_FK1(+) = BORR.BORROWER_PK
AND BCSFE.BORROWER_FK1(+) = BORR.BORROWER_PK
AND BCSFED.BORROWER_FK1(+) = BORR.BORROWER_PK
AND BCSFT.BORROWER_FK1(+) = BORR.BORROWER_PK
AND BCSFTD.BORROWER_FK1(+) = BORR.BORROWER_PK
AND BRIR.BORROWER_FK2(+) = BORR.BORROWER_PK
AND BCIB.BORROWERFK3(+) = BORR.BORROWER_PK
AND BCIO.BORROWERFK3(+) = BORR.BORROWER_PK
AND BCIBS.BORROWERFK3(+) = BORR.BORROWER_PK
AND BCIC.BORROWERFK3(+) = BORR.BORROWER_PK
AND BCID.BORROWERFK3(+) = BORR.BORROWER_PK
AND BCIN.BORROWERFK3(+) = BORR.BORROWER_PK
AND BCIO1.BORROWERFK3(+) = BORR.BORROWER_PK
AND BENM.BORROWER_FK6(+) = BORR.BORROWER_PK
AND BEPH.BORROWER_FK6(+) = BORR.BORROWER_PK
AND BEBE.BORROWER_FK6(+) = BORR.BORROWER_PK
AND BEEP.BORROWER_FK6(+) = BORR.BORROWER_PK
AND BEPT.BORROWER_FK6(+) = BORR.BORROWER_PK
AND BSME.BORROWER_FK1(+) = BORR.BORROWER_PK
AND BSST.BORROWER_FK1(+) = BORR.BORROWER_PK
AND BSSTA.BORROWER_FK1(+) = BORR.BORROWER_PK
AND BSSFC.BORROWER_FK1(+) = BORR.BORROWER_PK
AND BSSTSV.BORROWER_FK1(+) = BORR.BORROWER_PK
AND BSSTFV.BORROWER_FK1(+) = BORR.BORROWER_PK
AND BSSDD.BORROWER_FK1(+) = BORR.BORROWER_PK
AND BSTB.BORROWER_FK1(+) = BORR.BORROWER_PK
AND BSSTBE.BORROWER_FK1(+) = BORR.BORROWER_PK
AND BSICTA.BORROWERFK3(+) = BORR.BORROWER_PK)
WHERE MYRANK = 1
=================
OK i will paste the mview defination..
the mview base tables are around 20 and also it contains lot of inline views.
its very very complex SQL.
is there any way to attach the file???
or look above the mview def.

Similar Messages

  • Unalbe to extend temp segment

    Hi, i am facing a error frequently in my alert log file .Ora-1652 unable to extend temp segment by 128 bytes.i even increased the temporary tablespace size to 4 gb from 1.5 gb ,still i am facing the problem.Even if i shut my database and again startup my dtabase my temp space is showing free_bytes=0. i am not able to get rid of this problem.
    Thanks in advance
    Kishore

    Always the Temp segment Space shows Zero. Please check whether you are still getting the temp segment error.
    It shoud not shouw this error once you increased the space.
    Thanks
    Ashok Salimath

  • Error: ORA-01652: Unable to extend temp segment by 128

    Hello.
    The error occured when I tried to execute a complex query. I saw that my temp file is 30GB and it's hard to believe that it's getting full by this query!!!
    There is an analytic function used in the query and probably it is causing the huge need of space. Here is the execution plan of the query:
    SELECT STATEMENT, GOAL = CHOOSE               Cost=3455606     Cardinality=3615949     Bytes=636407024          IO cost=3455606     Optimizer=CHOOSE          Timestamp=19.3.2007 ã. 11:00:08
    WINDOW SORT               Cost=3455606     Cardinality=3615949     Bytes=636407024          IO cost=3455606               Timestamp=19.3.2007 ã. 11:00:08
    FILTER                                                  Timestamp=19.3.2007 ã. 11:00:08
    HASH JOIN OUTER                                                  Timestamp=19.3.2007 ã. 11:00:08
    HASH JOIN OUTER               Cost=6610     Cardinality=20963     Bytes=2683264          IO cost=6610               Timestamp=19.3.2007 ã. 11:00:08
    HASH JOIN               Cost=6572     Cardinality=20963     Bytes=2096300          IO cost=6572               Timestamp=19.3.2007 ã. 11:00:08
    PARTITION RANGE SINGLE                                                  Timestamp=19.3.2007 ã. 11:00:08
    TABLE ACCESS FULL     Object owner=RS     Object name=LOANS     Cost=369     Cardinality=24551     Bytes=1104795          IO cost=369     Optimizer=ANALYZED          Timestamp=19.3.2007 ã. 11:00:08
    TABLE ACCESS FULL     Object owner=RS     Object name=LOAN_PLANS     Cost=5629     Cardinality=826902     Bytes=45479610          IO cost=5629     Optimizer=ANALYZED          Timestamp=19.3.2007 ã. 11:00:08
    TABLE ACCESS FULL     Object owner=RS     Object name=EXCH_RATES     Cost=2     Cardinality=1     Bytes=28          IO cost=2     Optimizer=ANALYZED          Timestamp=19.3.2007 ã. 11:00:08
    VIEW     Object owner=MDR          Cost=3203514     Cardinality=167045285     Bytes=8018173680                         Timestamp=19.3.2007 ã. 11:00:08
    WINDOW SORT               Cost=3203514     Cardinality=167045285     Bytes=13530668085          IO cost=3203514               Timestamp=19.3.2007 ã. 11:00:08
    HASH JOIN               Cost=6667     Cardinality=167045285     Bytes=13530668085          IO cost=6667               Timestamp=19.3.2007 ã. 11:00:08
    PARTITION RANGE SINGLE                                                  Timestamp=19.3.2007 ã. 11:00:08
    TABLE ACCESS FULL     Object owner=RS     Object name=LOANS     Cost=369     Cardinality=48079     Bytes=2067397          IO cost=369     Optimizer=ANALYZED          Timestamp=19.3.2007 ã. 11:00:08
    TABLE ACCESS FULL     Object owner=RS     Object name=LOAN_PLANS     Cost=5629     Cardinality=826902     Bytes=31422276          IO cost=5629     Optimizer=ANALYZED          Timestamp=19.3.2007 ã. 11:00:08
    So I have 3 questions that I'm fighting with since last week:
    1) Why the windowing clause of the analytic function requires so many resources since I have index on the "partition by" and "order by" clauses? Is there any way to optimize it?
    2) Is it possible for the query to fill all the 30GB of the temp segment? The table that the query selects from has 4 million records.
    3) What can I do to run successfully my query?
    Thanks.

    FYI, here is the query:
    INSERT INTO LoanPlans ( LoanRefNum, NumFlow, DateFlow, AmtFlowPrinc, AmtFlowInt)
    SELECT t1.event || t1.branch || t1.amendm Field1,
    Row_Number() over
    (partition by t1.branch,t1.event,t1.amendm
    order by t1.inst_nbr) Field2,
    t1.mat_date Field3, t1.inst_principal*t3.ind_rate Field4,
    t1."INT"*t3.ind_rate Field5
    FROM RS.LOAN_PLANS t1 INNER JOIN
    RS.LOANS t2 ON (t1.event=t2.event AND
    t1.branch=t2.branch AND t1.amendm=t2.amendm AND
    t1.DATE_KEY = t2.DATE_KEY) LEFT JOIN
    ( SELECT t2.branch branch, t2.event event, t2.amendm amendm,
    SUM(t1.inst_principal) over
    (partition by t1.branch, t1.event, t1.amendm
    order by t1.inst_nbr) sum_inst,
    t2.inst_nbr inst_nbr, t2.releas - t2.capital_payd inst_rest
    FROM RS.LOANS t2 INNER JOIN
    RS.LOAN_PLANS t1 ON (t2.branch = t1.branch AND
    t2.event = t2.event AND t2.amendm = t1.amendm AND
    t2.DATE_KEY = t1.DATE_KEY)
    ) q ON (t1.branch = q.branch AND t1.event = q.event AND
    t1.amendm = q.amendm) LEFT JOIN
    RS.EXCH_RATES t3 ON (t1.currency = t3.currency AND
    t1.DATE_KEY = t3.DATE_KEY AND t1.DATE_KEY = t3.acc_date)

  • System copy export  -  error message unable to extend temp segment PSAPTEMP

    I am performing an export of ECC ABAP+java instance and during the export of the source system I get the following error during the ABAP export:
    ORA-01652: unable to extend temp segment by 128 in tablespace PSAPTEMP
    ORA-27072: File I/O error
    What do I need to do with this error? I have extended the tablespace via brtools but still getting the error.
    Is this because I did not select the shutdown instance during the export? or do I need to do something more via brtools to the PSAPTEMP tablesapce?
    I am running on Oracle 10.2.0.2. unix
    Thanks
    Mikie

    Hello Mike,
    >> My PSAPTEMP is 8GB.
    I would bet the table you try to export is bigger (if you export sorted.. you will need temp space)
    >> You have said you increased it to 800GB, that is almost a terabyte. Is this correct?
    >> If so, how did you arrive at this figure.
    As i already said .. this was the temp space that i needed in a sorted exported with many parallel exports (splitted packages and splitted tables). The system that i have migrated was round about 3 TB and we need to do it very fast.. so i needed the temporary space for the many parallel actions... but this should not be the "normal" case if you have no specific values.
    >> And if you could define how you extended PSAPTEMP. Did you use brtools?
    I have extended it manually (over sqlplus) .. i have monitored it in my test cases with the view V$TEMPSEG_USAGE and increased it if necessary.
    >> did you recreate PSAPTEMP via SQLPLUS size 800GB and then dropped it and recreated to normal size?
    No, in my case i have exported and imported it at the same time (distribution monitor) so there was no need to drop it after the export, because i have build up a new target database. But under normal conditions you would only drop the tempfiles after your work has been done. This is possible with Oracle 10g (with some restrictions).
    => http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_3002.htm#i2093894
    Restrictions on Dropping Files To drop a datafile or tempfile, the datafile or tempfile:
    - Must be empty.
    - Cannot be the first file that was created in the tablespace. In such cases, drop the tablespace instead.
    - Cannot be in a read-only tablespace.
    Regards
    Stefan

  • READER_1_1_1RR_4035SQL Error [ ORA-01652: unable to extend temp segment b

    Hi,
    I am still facing the error for table space evnthough datafile is avl
    READER_1_1_1     RR_4035     SQL Error [
    ORA-01652: unable to extend temp segment by 128 in tablespace TEMP2
    Database driver error...
    Function Name : Execute
    SQL Stmt : SELECT
    ONLINE     DATA     PERMANENT     LOCAL     200     0.063     0.03
    ONLINE     DEV1_BIPLATFORM     PERMANENT     LOCAL     64     44.313     69.24
    ONLINE     DEV1_IAS_TEMP     TEMPORARY     LOCAL     100     0     0
    ONLINE     DEV1_MDS     PERMANENT     LOCAL     100     5.438     5.44
    ONLINE     DEV_BIPLATFORM     PERMANENT     LOCAL     64     44.313     69.24
    ONLINE     DEV_IAS_TEMP     TEMPORARY     LOCAL     100     0     0
    ONLINE     DEV_MDS     PERMANENT     LOCAL     100     5.438     5.44
    ONLINE     EXAMPLE     PERMANENT     LOCAL     975.188     109.125     11.19
    ONLINE     FLA_TBS1     PERMANENT     LOCAL     10     0.063     0.63
    ONLINE     MES_DW2     PERMANENT     LOCAL     2,091.19     1,794.19     85.8
    ONLINE     SYSAUX     PERMANENT     LOCAL     1,245.38     906.938     72.82
    ONLINE     SYSTEM     PERMANENT     LOCAL     3,300.00     2,429.44     73.62
    ONLINE     TEMP     TEMPORARY     LOCAL     24,458.00     5,020.00     20.52
    ONLINE     TOOLS     PERMANENT     LOCAL     1,050.00     0.063     0.01
    ONLINE     UNDOTBS1     UNDO     LOCAL     2,670.00     95.438     3.57
    ONLINE     USERS     PERMANENT     LOCAL     43,530.98     30,366.30     69.76

    No Sense:
    ORA-01652: unable to extend temp segment by 128 in tablespace TEMP2
    tablespace TEMP2
    Database driver error...
    Function Name : Execute
    SQL Stmt : SELECT
    ONLINE     DATA     PERMANENT     LOCAL     200     0.063     0.03
    ONLINE     DEV1_BIPLATFORM     PERMANENT     LOCAL     64     44.313     69.24
    ONLINE     DEV1_IAS_TEMP     TEMPORARY     LOCAL     100     0     0
    ONLINE     DEV1_MDS     PERMANENT     LOCAL     100     5.438     5.44
    ONLINE     DEV_BIPLATFORM     PERMANENT     LOCAL     64     44.313     69.24
    ONLINE     DEV_IAS_TEMP     TEMPORARY     LOCAL     100     0     0
    ONLINE     DEV_MDS     PERMANENT     LOCAL     100     5.438     5.44
    ONLINE     EXAMPLE     PERMANENT     LOCAL     975.188     109.125     11.19
    ONLINE     FLA_TBS1     PERMANENT     LOCAL     10     0.063     0.63
    ONLINE     MES_DW2     PERMANENT     LOCAL     2,091.19     1,794.19     85.8
    ONLINE     SYSAUX     PERMANENT     LOCAL     1,245.38     906.938     72.82
    ONLINE     SYSTEM     PERMANENT     LOCAL     3,300.00     2,429.44     73.62
    ONLINE     TEMP     TEMPORARY     LOCAL     24,458.00     5,020.00     20.52
    ONLINE     TOOLS     PERMANENT     LOCAL     1,050.00     0.063     0.01
    ONLINE     UNDOTBS1     UNDO     LOCAL     2,670.00     95.438     3.57
    ONLINE     USERS     PERMANENT     LOCAL     43,530.98     30,366.30     69.76
    tablespace TEMP2 doesn't exist.
    i used statement
    ALTER TABLESPACE temp
    ADD TEMPFILE 'D:\app\TEMP16.DBF' SIZE 128M autoextend on;
    ALTER TABLESPACE
    USERS ADD DATAFILE 'D:\app\SYS00.DBF' SIZE 1080M autoextend on;
    alter user DATAWAREHOUSE quota unlimited on USERS
    why add datafile in user tablespace¿?
    and you solved the issue doing the same like we told you a few days before in:
    ORA-1652: unable to extend temp segment by 128 in tablespace
    unable to create INITIAL extent for segment in tablespace USERS
    Remember close your threads:
    896398     
    Handle:      896398 
    Status Level:      Newbie
    Registered:      Nov 9, 2011
    Total Posts:      530
    Total Questions:      158 (116 unresolved)

  • Unable to extend temp segment by 4096 in tablespace  error

    Hi
    Can some help me resolving this problem .which occured when i try to import some dump file to an user.
    ORA-39171: Job is experiencing a resumable wait.
    ORA-01652: unable to extend temp segment by 4096 in tablespace HDM_INDEX
    i added 2 gb of datafile to the table space it is still shows the same .
    any expert suggestion is highly apprciated.
    thanks

    790072 wrote:
    Hi
    Can some help me resolving this problem .which occured when i try to import some dump file to an user.
    Pl post details of OS and database versions, along with the complete import command and parameters used.
    ORA-39171: Job is experiencing a resumable wait.
    ORA-01652: unable to extend temp segment by 4096 in tablespace HDM_INDEX
    i added 2 gb of datafile to the table space it is still shows the same .Pl identify the tablespace you added space to (and the commands used to add space)
    >
    any expert suggestion is highly apprciated.Pl post relevant sections from the database alert.log
    >
    >
    thanks
    ORA-1652 Error Troubleshooting          [Document 793380.1]
    ORA-01652: Estimate Space Needed to CREATE INDEX          [Document 100492.1]
    TROUBLESHOOTING GUIDE (TSG) - UNABLE TO EXTEND Errors          [Document 1025288.6]
    HTH
    Srini

  • ORA-01652: unable to extend temp segment by 128 in tablespace TEMP2

    Dear all,
    received this error when generate a report.
    check the TEMP1 and TEMP2 they all have lot of spaces.
    check the env $APPLLCSP return empty.
    Please advise how to correct this error.
    Regards,
    Payables: Version : 12.0.0
    APXSSIMP module: Supplier Sites Open Interface Import
    APPLLCSP Environment Variable set to :
    Current NLS_LANG and NLS_NUMERIC_CHARACTERS Environment Variables are :
    American_America.UTF8
    Enter Password:
    REP-0069: Internal error
    REP-57054: In-process job terminated:Terminated with error:
    REP-300: MSG-00001: After SRWINIT
    MSG-00002: After Get_Company_Name
    MSG-00003: After Get_NLS_Strings
    MSG-00004: After Importing Suppliers
    MSG-00005: After Get_Header_Information
    ORA-01652: unable to extend temp segment by 128 in tablespace TEMP2
    ==> SELECT assi.org_id C_Rejected_Org_Id,
    MSG-00020: After SRWEXIT
    Report Builder: Release 10.1.2.0.2 - Production on Mon May 11 09:55:36 2009

    >
    check the TEMP1 and TEMP2 they all have lot of spaces.
    >
    How much is "lot" ? :-) How did you determine this "lot" ?
    Pl see MOS Doc 1025288.6 (How to Diagnose and Resolve UNABLE TO EXTEND Errors)
    HTH
    Srini

  • Confuse between temp file error and perment file error

    during the weekend, i usually maintain our database and this weekend i end up with strange situation,
    i lunched my scripts to reorginize datafiles, however the scripts is crash all the time due to weird message which is in my opinion is misleading ora message.
    this is the situaion:
    i am using this scripts to tell me if my datafiles are full or not
    1 L_INDEX 24 107.12109375 103.74609375 3.375 0 96.8493600262553 3.15063997374467
    2 L_TABLES 30 108.2939453125 97.1689453125 11.125 0 89.7270341680719 10.2729658319281
    as you can see, the free space on the l_index tablespace is now 3G and need to reogrinze to free space, however when we run our scripts to free spaces by moving objects to tools tablespace and then return them back,
    I recieve this message:
    ORA-01652: unable to extend temp segment by .......
    to solve this error is adding new temp files, however we have 5 temps file and there were pantly of space there and also i add 2 new files with size 1g and maxsize is 32G, still i am receving this error and my scripts crash when i try to rebuild the index,
    the workaround was is adding new datafile to l_index and try again to rebuild the index and it works,
    so i am wondering if the problem was on the datafiles, why i recieved error about temp, i waste some time thinking that my problem was with temp, however the real problem came from l_index tablespace.
    oracle verison is 10.1.0.4 and os is windows
    Thanks

    ORA-01652: unable to extend temp segment by Temporary tablespace is also used when re-creating or creating indexes in database.
    A temp segment is created the moment create or re-build indexes command is issued and will be held until the index is being created completely. If either of the tablespace have insufficient space, you might get the error ORA-1652 or ORA 1654.
    You should be looking at the tablespace name for adding space instead of looking temp segment.
    ORA-1652: unable to extend temp segment by in tablespace

  • Unable to extend TEMP segment even after adding fresh temp files

    Hi All,
    I have a huge table with rows nearly 2 million. When this table is moved to another tablespace, the command failed giving the following error:
    ORA-01652: unable to extend temp segment by 128 in tablespace XYZ
    To overcome this error, an additional temp file was added with huge size. Unfortunately, the same error appeared again when the table was tried to move to another tablespace. I wonder if the new temp file was not recognized by database, so tried to see how many files belong to temporary tablespace, but the query listed the newly added temp file also.
    What could be the possible reason for this error? Suggestions or clues are most welcome.
    Thanks,
    ...

    The temp segment is for the table that is being moved.
    Oracle creates a temporary segment when doing a move. If the target tablespace has enough space, the move succeeds and the temp segment gets converted to a Table segment. Else, if the move fails because of lack of space (the temp segment itself unable to grow), then the temp segment is dropped on failure.
    Thus, in a
    alter table ABC move tablespace MY_TBS;or
    the target tablespace MY_TBS should have enough space for ABC. While Oracle is building the copy of ABC in MY_TBS, it is being built as a temporary segment. If the copy succeeds, the temporary segment is renamed as a Table segment 'ABC' and the original table segment 'ABC' is dropped.
    This behaviour also happens when you do an ALTER TABLE .. MOVE ; into the same tablespace that it is existing in. The new copy of the table is a temporary sgement till the copy succeeds.

  • Unable to extend temp segment by 128 in tablespace PSAPTEMP

    Hi everybody!
    While processing a UNICODE coversion with SAPINST on my SAP NW2004s system (AIX 5,2  - Oracle 10.2 - BW 7.0) into my.SAPDFACT_1.log file the following errors occured:
    DbSl Trace: ORA-1403 when accessing table SAPUSER
    (DB) INFO: connected to DB
    (DB) INFO: DbSlControl(DBSL_CMD_NLS_CHARACTERSET_GET): UTF8
    (GSI) INFO: dbname   = "HBQ20080503070541                                                                                "
    (GSI) INFO: vname    = "ORACLE                          "
    (GSI) INFO: hostname = "si088ss1                                                        "
    (GSI) INFO: sysname  = "AIX"
    (GSI) INFO: nodename = "si088ss1"
    (GSI) INFO: release  = "2"
    (GSI) INFO: version  = "5"
    (GSI) INFO: machine  = "0031832B4C00"
    (DB) INFO: /BIC/FZHPY_LIM created #20080503200234
    (IMP) INFO: import of /BIC/FZHPY_LIM completed (133182692 rows) #20080503212420
    DbSl Trace: Error 1652 in exec_immediate() from oci_execute_stmt(), orpc=0
    DbSl Trace: ORA-1652 occurred when executing SQL stmt (parse error offset=42)
    (DB) ERROR: DDL statement failed
    (CREATE UNIQUE INDEX "/BIC/FZHPY_LIM~0" ON "/BIC/FZHPY_LIM" ( "KEY_ZHPY_LIMP", "KEY_ZHPY_LIMT", "KEY_ZHPY_LIMU", "KEY_ZHPY_LIM2", "KEY_ZHPY_LIM3", "KEY_ZHPY_LIM4", "KEY_ZH
    PY_LIM5", "KEY_ZHPY_LIM6", "KEY_ZHPY_LIM7" ) TABLESPACE PSAPSR3 STORAGE (INITIAL 65536 NEXT 0000002560K MINEXTENTS 0000000001 MAXEXTENTS 2147483645 PCTINCREASE 0 ) NOLOGGING COMPUTE STATISTICS )
    DbSlExecute: rc = 99
      (SQL error 1652)
      error message returned by DbSl:
    ORA-01652: unable to extend temp segment by 128 in tablespace PSAPTEMP
    (DB) INFO: disconnected from DB
    Anybody can help me?
    Thanks a lot!

    Hi Stefan!
    desc SAPSR3."/BIC/FZHPY_LIM";
    Name                                      Null?    Type
    KEY_ZHPY_LIMP                             NOT NULL NUMBER(10)
    KEY_ZHPY_LIMT                             NOT NULL NUMBER(10)
    KEY_ZHPY_LIMU                             NOT NULL NUMBER(10)
    KEY_ZHPY_LIM2                             NOT NULL NUMBER(10)
    KEY_ZHPY_LIM3                             NOT NULL NUMBER(10)
    KEY_ZHPY_LIM4                             NOT NULL NUMBER(10)
    KEY_ZHPY_LIM5                             NOT NULL NUMBER(10)
    KEY_ZHPY_LIM6                             NOT NULL NUMBER(10)
    KEY_ZHPY_LIM7                             NOT NULL NUMBER(10)
    /BIC/ZHCONTING                            NOT NULL NUMBER(17,2)
    /BIC/ZHD_IMP                              NOT NULL NUMBER(17,2)
    /BIC/ZHPERC2                              NOT NULL NUMBER(10)
    SELECT AVG_ROW_LEN FROM ALL_TABLES WHERE TABLE_NAME = '/BIC/FZHPY_LIM';
    AVG_ROW_LEN
    SELECT BYTES, BLOCKS FROM DBA_SEGMENTS WHERE SEGMENT_NAME = '/BIC/FZHPY_LIM';
         BYTES     BLOCKS
    7180648448     876544
    SELECT FILE_NAME, TABLESPACE_NAME, BYTES, BLOCKS, AUTOEXTENSIBLE, MAXBYTES, MAXBLOCKS FROM DBA_TEMP_FILES;
    FILE_NAME
    TABLESPACE_NAME                     BYTES     BLOCKS AUT   MAXBYTES  MAXBLOCKS
    /oracle/HBQ/sapdata1/temp_1/temp.data1
    PSAPTEMP                       1048576000     128000 YES 1.0486E+10    1280000
    /oracle/HBQ/sapdata1/temp_1/temp2.data1
    PSAPTEMP                        298844160      36480 YES 3.4359E+10    4194176
    Thanks.

  • Unable to extend temp segment

    Hi All,
    I received the following error;
    ORA-01652: unable to extend temp segment by 128 in tablespace TEMP2
    Then I added the datafile in temp2 tablespace.
    But still it giving the same error;
    Syntax of Create tablespace is
    Create temporary tablespace temp2
    Datafile ‘\temp_01.dbf’ size 500m;
    Table contains 100000 records;
    Please help me.
    Thanks and regards,
    Prathamesh.

    Please check the allocation and deallocation of space in a temporary tablespace sort segment using the V$SORT_SEGMENT view. The V$TEMPSEG_USAGE view identifies the current sort users in those segments.
    Also, check settings of TEMP tablespace. May be it's trying to create a huge extent as NEXT (larger than available space), which is not required. In that case reduce NEXT EXTENT for this.

  • Add Unique Constraint - Unable to extend temp segment

    I'm getting the error "ORA-01652: unable to extend temp segment by 1024 in tablespace ...". I'm a developer, and our DBA is on vacation. I'm trying to understand what's happening, so I monitor V$SORT_SEGMENT while the constraint is being created. Here is what that view looks like immediately before and after the exception is thrown:
    10:43:07 < ... > select * from v$sort_segment;
    TABLESPACE_NAME                 SEGMENT_FILE SEGMENT_BLOCK EXTENT_SIZE CURRENT_USERS TOTAL_EXTENTS TOTAL_BLOCKS USED_EXTENTS USED_BLOCKS FREE_EXTENTS FREE_BLOCKS ADDED_EXTENTS EXTENT_HITS FREED_EXTENTS
    FREE_REQUESTS   MAX_SIZE MAX_BLOCKS MAX_USED_SIZE MAX_USED_BLOCKS MAX_SORT_SIZE MAX_SORT_BLOCKS RELATIVE_FNO
    TEMP                                       0             0         128             1           460     58880     460       58880            0           0           460         505          2809
                1       2809     359552           460           58880           460           58880            0
    Elapsed: 00:00:00.04
    10:43:13 < ... > select * from v$sort_segment;
    TABLESPACE_NAME                 SEGMENT_FILE SEGMENT_BLOCK EXTENT_SIZE CURRENT_USERS TOTAL_EXTENTS TOTAL_BLOCKS USED_EXTENTS USED_BLOCKS FREE_EXTENTS FREE_BLOCKS ADDED_EXTENTS EXTENT_HITS FREED_EXTENTS
    FREE_REQUESTS   MAX_SIZE MAX_BLOCKS MAX_USED_SIZE MAX_USED_BLOCKS MAX_SORT_SIZE MAX_SORT_BLOCKS RELATIVE_FNO
    TEMP                                       0             0         128             0           460     58880       0           0          460       58880           460         505          2809
                1       2809     359552           460           58880           460           58880            0
    Elapsed: 00:00:00.02My DBA had previously instructed me to issue this command to try to avoid this error:
    alter database tempfile '...' resize 12g;I do that, but I still only show 460 free segments. Can someone point me to some documentation on how to make the Free Extents be larger than 460?
    Here's my client info:
    SQL*Plus: Release 11.2.0.3.0 Production on Tue Nov 6 10:40:39 2012
    Copyright (c) 1982, 2011, Oracle.  All rights reserved.Here's my server info:
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options

    Given that you appear to be able to add/increase temp files, you are also likely to be able to see the dba_* views. As a first shot, try:
    select sum(bytes) from dba_free_space
    where tablespace_name = <name from the error message>If there appears to be sufficient space (no idea what that would be since I do not know how big your objects are) then try something like:
    select file_id, block_id, bytes from dba_free_space
    where tablespace_name = <name from the error message>
    order by bytes descIf you have large amounts of contiginous free space (i.e. the first few rows have a large value for the bytes column) then ther may be something else going on.
    If both queries show relativel small values for the amount of free space, you will need to add another datafile to the tablespace, or increase the size of one of the existing datafile.
    To see the datafiles in the tablespace use:
    select file_name, bytes from dba_data_files
    where tablespace_name = <name from the error message>You can increase the size of a datafile using something similar to the alter database command you have for the tempfiles like:
    alter database datafile <a quoted full name from dba_data_files> resize some bigger numberJust make sure that the file system has enough free space for the new size.
    John

  • Oracle Alert - ORA-1652 Unable to extend the Temp Segment

    Hi Team,
    During our DB Reorg we have received the Oracle Alert - ORA-1652 Unable to extend the Temp Segment by 15485 in tablespace :PSAPBTABI.
    Our DBReorg got cancelled..
    We would like to know how we can resolve the above error so that we can reschedule the DB Reorg activity..
    Regds,
    Satyanarayana N

    Hi,
    If you are using UNIX OS, the temp files are created as sparse file due to the OS functionality.
    Altough you have assigned 49 GB the actual size will be very very less.
    You can check the actula file size with du or df command. To remove these sparse condition you will need to perform certain steps.
    Read this note and execute the steps given and then see the file size difference.
    548221 - Temporary Files are created as sparse files
    Do update the message if the OS is different.
    Regards,
    Nilesh

  • ORA-1652: unable to extend temp segment by 128 in tablespace

    HI,
    i am getting an error in alert log file.....
    Thread 1 advanced to log sequence 1758
      Current log# 2 seq# 1758 mem# 0: /dev/vx/rdsk/racdg/orcl_raw_log12
    Mon Sep  8 12:34:16 2008
    ARC1: Evaluating archive   log 1 thread 1 sequence 1757
    ARC1: Beginning to archive log 1 thread 1 sequence 1757
    Creating archive destination LOG_ARCHIVE_DEST_1: '/arch/log/1_1757.dbf'
    ARC1: Completed archiving  log 1 thread 1 sequence 1757
    Mon Sep  8 13:04:26 2008
    Completed checkpoint up to RBA [0x6de.2.10], SCN: 0x0000.6c1f757f
    Mon Sep  8 13:49:16 2008
    ORA-1652: unable to extend temp segment by 128 in tablespace                 TEMPI don';t want to add datafile
    SQL> select bytes,maxbytes,increment_by from dba_temp_files;
         BYTES   MAXBYTES INCREMENT_BY
    6134169600          0            0
    SQL> select TABLESPACE_NAME, BYTES_USED, BYTES_FREE from V$TEMP_SPACE_HEADER;
    TABLESPACE_NAME                BYTES_USED BYTES_FREE
    TEMP                           6037700608   96468992i have also referred metalink note: 19047.1
    Is there any way to avoid this problem without adding any datafile........

    how to find out which session is using temp tablespace
    SQL> select * from v$sort_usage;
    USERNAME                       USER                           SESSION_ADDR
    SESSION_NUM SQLADDR             SQLHASH TABLESPACE
    CONTENTS  SEGTYPE     SEGFILE#    SEGBLK#    EXTENTS     BLOCKS   SEGRFNO#
    DATA3                        DATA3                        000000044D84F558
          25860 00                        0 TEMP
    TEMPORARY DATA             201     183561          1        128          1pls correct me if the above query is worng to find out the no. of session s using temp tablespace
    i think we have already allocated good amt of space to pga_aggregate_target
    SQL> show parameter pga
    NAME                                 TYPE        VALUE
    pga_aggregate_target                 big integer 524288000
    SQL>Edited by: user00726 on Sep 8, 2008 2:29 AM

  • The Sky is Falling! ORA-01652: unable to extend temp segment by 128

    So we currently have a production problem and I'm not so in the know as a lowly java developer and not an Oracle expert.
    We keep getting this error(below) when a certain heavy query hits the DB.
    Our DBA claims that the tablespace for 'TABLE_SPACE_NAME_HERE' is 20GB of space and that the problem is the query.
    The query has been running fine for many many months but all of a sudden is presenting a problem and we have to do something quick.
    We tried bouncing the application server but the error came right back when the big select query gets hit.
    Any thoughts? Help! : )
    java.sql.SQLException: ORA-01652: unable to extend temp segment by 128 in tablespace TABLE_SPACE_NAME_HERE
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:113)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:754)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:219)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:972)
         at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1074)
         at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:854)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1156)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3415)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3460)
         at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:296)

    LosLobo wrote:
    So, the next question... what is our lesson learned in this case?It depends on the root cause.
    Our DBA thinks 30GB is an unreasonable size for the tablespace and is fingering the select query that was causing the error to occur. Their solution is move to the query to a view and then reduce the tablespace back to 20GB.
    My thoughts are shouldn't the DB be able to handle a query that has been running fine for the last couple years? Also, if we do what is suggested what would prevent another query from coming along and causing the same issue all over again?Has the DBA identified the source of the issue? Did the query plan change? It's possible that something with statistics (or with some configuration change) causes Oracle to believe that two different query plans are roughly equally efficient. One plan might take substantially more TEMP space than another. It's possible that Oracle had been choosing the plan that involved less TEMP space being used and recently changed to preferring the plan that takes more TEMP space. If that's the issue, you may want to force Oracle to use the plan that involves less TEMP usage.
    Regardless of your TEMP tablespace size, another query may come along that causes TEMP to run out of space. Or data growth may cause TEMP to run out of space. Or an increase in the number of users may cause TEMP to run out of space. Ideally, the DBAs would be identifying how much TEMP space is used over the course of the day so that if things are growing steadily additional space can be added as necessary. If TEMP space increases dramatically because a query plan changes, however, even the best monitoring is unlikely to be able to predict that level of growth.
    Whether 30 GB is unreasonable (or whether 20 GB is unreasonable) will depend heavily on your application. We don't know enough to be able to comment. A TB-sized OLTP database serving millions of customers will have very different TEMP requirements than a multi-TB data warehouse which will have very different TEMP requirements than a small department-level application.
    My surmising is we must have just crossed a watermark threshold and the simplest most reasonable solution is to just leave the larger tablespace size.Why do you believe this is the case? It is entirely possible that you need more TEMP because your TEMP usage has been growing slowly over time. It is entirely possible that the query in question has always been using more TEMP space than it really should and that you finally have enough usage to cause the problem to bubble to the surface. It is entirely possible that the query used a reasonable amount of TEMP for the past couple years and suddenly started using far more because of a query plan change. Once you identify the source of the problem, we can figure out the appropriate solution. Without knowing the source of the problem, we're all just guessing.
    Justin

Maybe you are looking for

  • Problem with Latest Epson Printer Driver Update

    I installed the Epson printer driver update that came out today, but it made absolutely no difference. My Epson printer is still using a the same old Epson driver plus Gutenprint. There is no other option. I don't get it. What's the point of installi

  • HT2693 it said activation Error,and i can't get in and see my serial number. what can i do?

    it said activation Error,and i can't get in and see my serial number.

  • Multiple NetStreams - IE 6/7 Issue

    Hello folks, I need help with a NetStream/IE specific issue (possibly bug in IE or IE FlashPlayer 9). Problem Background: - I made flash flv player for client to play multiple FLV pseudo-streams (php-streamed) and keep them synchronized - I have 2 Ne

  • QoS (Quality of Service) ??

    Can anyone explain to me what this is?    Twice when ordering BT Vision the sales people have not added this to my account and consequently this stops the service from working and errors, both times it has taken numerous phone calls before they have

  • Your ideas

    Hi! Hi friends! Sorry i was out of this forum for a while this days. A lot of things to do! but let me get everything sorted then i will start coming to the forum again. I stumble to this blog, which got me interested, need some ideas to do this This