DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: SP2-0642: SQL*Plus internal error state 2091, context 0:0:0 Unsafe to proceed

  1. #1
    Join Date
    Mar 2001
    Location
    Reading, U.K
    Posts
    598

    SP2-0642: SQL*Plus internal error state 2091, context 0:0:0 Unsafe to proceed

    Hi All,

    I am getting the follwoin error

    SP2-0642: SQL*Plus internal error state 2091, context 0:0:0
    Unsafe to proceed


    WITH
    inline_tab AS
    (
    SELECT /*+ no_merge use_hash(ic) */
    DISTINCT sfpi.invoice_id invoice_id
    ,invoice.customer_account_invoice_str invoice_no
    ,sfpi.payment_id payment_id
    ,NULL adjustment_id
    FROM stage_fin_payment sfp
    ,stage_fin_payment_invoice sfpi
    ,(SELECT /*+ no_merge */
    invoice_id
    ,customer_account_invoice_str
    FROM stage_fin_invoice sfi
    WHERE batch_load_id = 3243
    GROUP BY invoice_id
    ,customer_account_invoice_str) invoice
    ,invoice_col ic
    WHERE sfp.to_account_id = sfpi.account_id
    AND sfp.batch_load_id = sfpi.batch_load_id
    AND sfp.batch_load_id = 3243
    AND sfp.from_account_id IS NOT NULL
    AND sfpi.invoice_id = ic.invoice_id
    AND sfpi.invoice_id = invoice.invoice_id(+)
    UNION
    SELECT /*+ no_merge use_hash(ic) */
    DISTINCT sfpi.invoice_id invoice_id
    ,invoice.customer_account_invoice_str invoice_no
    ,sfpi.payment_id payment_id
    ,NULL adjustment_id
    FROM stage_fin_payment sfp
    ,stage_fin_payment_invoice sfpi
    ,(SELECT /*+ no_merge */
    invoice_id
    ,customer_account_invoice_str
    FROM stage_fin_invoice sfi
    WHERE batch_load_id = 3243
    GROUP BY invoice_id
    ,customer_account_invoice_str) invoice
    ,invoice_col ic
    WHERE sfp.from_account_id = sfpi.account_id
    AND sfp.batch_load_id = sfpi.batch_load_id
    AND sfp.batch_load_id = 3243
    AND sfp.to_account_id IS NOT NULL
    AND sfpi.invoice_id = ic.invoice_id
    AND sfpi.invoice_id = invoice.invoice_id(+)
    )
    SELECT 9999 file_id
    ,2 line_type
    ,9999 sequence_no
    ,3243 batch_load_id
    , Invoice_tab.CUSTOMER_NO || '|' || Invoice_tab.ACCOUNT_NO || '|' ||
    Invoice_tab.invoice_no --CR75539
    || '|' || Invoice_tab.PAYMENT_TRANS_AMOUNT || '|' ||
    TO_CHAR(Invoice_tab.PAYMENT_TRANS_DATE
    ,'DD/MM/YYYY')
    --||'|'||ip_account_record.PAYMENT_TRANS_CURRENCY_ID --CR 60350
    || '|' || 'GBP' --CR 60350
    || '|' || Invoice_tab.CREDIT_REASON || '|' || Invoice_tab.DEBIT_REASON || '|' ||
    Invoice_tab.ACTUAL_PAYMENT_AMOUNT || '|' || Invoice_tab.ACTUAL_PAYMENT_METHOD || '|' ||
    Invoice_tab.ACTUAL_PAYMENT_METHOD_DETAIL || '|' || Invoice_tab.ACTUAL_PAYMENT_COMMENT || '|' ||
    Invoice_tab.ACTUAL_PAYMENT_ID || '|' ||
    TO_CHAR(Invoice_tab.PAYMENT_FAILURE_DATE
    ,'DD/MM/YYYY') interface_line_1
    ,NULL interface_line_2
    ,SYSDATE record_created_timestamp
    FROM (SELECT /*+ no_merge use_hash(sfp) use_hash(sfa) use_hash(ac) use_hash(inline) */
    sfp.to_account_id to_account_id
    ,sfp.to_account_name customer_no
    ,sfp.to_account_name account_no
    ,0 payment_trans_amount
    ,sfp.payment_date payment_trans_date
    ,CASE
    WHEN (sfp.currency_id = 1021) THEN
    'GBP'
    ELSE
    NULL
    END payment_trans_currency_id
    ,'PAY1' credit_reason
    ,NULL debit_reason
    ,sfp.to_amount actual_payment_amount
    ,'Transferred Payment' actual_payment_method
    ,NULL actual_payment_method_detail
    ,'Transferred Payment' actual_payment_comment
    ,sfp.payment_id actual_payment_id
    ,NULL payment_failure_date
    ,inline.invoice_no
    FROM stage_fin_payment sfp
    ,stage_fin_account sfa
    ,account_col ac
    ,(select invoice_no, payment_id from inline_tab) inline
    WHERE sfp.batch_load_id = 3243
    AND sfp.to_account_id = sfa.adc_account_id
    AND sfp.from_account_id IS NOT NULL
    AND sfp.payment_status_code NOT IN (2, 3)
    AND sfp.batch_load_id = sfa.batch_load_id
    -- AND sfp.batch_load_id = cp_batch_load_id
    AND sfp.payment_id = nvl(inline.payment_id
    ,sfp.payment_id)
    AND sfa.account_name = ac.account_name
    AND ac.current_debt_flag != 'Closed'
    AND ac.deleted = 'N'
    UNION
    SELECT /*+ no_merge */
    sfp.from_account_id to_account_id
    ,sfp.from_account_name customer_no
    ,sfp.from_account_name account_no
    ,0 payment_trans_amount
    ,sfp.payment_date payment_trans_date
    ,CASE
    WHEN (sfp.currency_id = 1021) THEN
    'GBP'
    ELSE
    NULL
    END payment_trans_currency_id
    ,NULL credit_reason
    ,'ADJ3' debit_reason
    ,sfp.from_amount actual_payment_amount
    ,'Transferred Payment' actual_payment_method
    ,NULL actual_payment_method_detail
    ,'Transferred Payment' actual_payment_comment
    ,sfp.payment_id actual_payment_id
    ,NULL payment_failure_date
    ,inline.invoice_no
    FROM stage_fin_payment sfp
    ,stage_fin_account sfa
    ,account_col ac
    ,(select invoice_no, payment_id from inline_tab) inline
    WHERE sfp.from_account_id = sfa.adc_account_id
    AND sfp.from_account_id IS NOT NULL
    AND sfp.payment_status_code NOT IN (2, 3)
    AND sfp.batch_load_id = sfa.batch_load_id
    AND sfp.batch_load_id = 3243
    AND sfp.payment_id = nvl(inline.payment_id
    ,sfp.payment_id)
    AND sfa.account_name = ac.account_name
    AND ac.current_debt_flag != 'Closed'
    AND ac.deleted = 'N') Invoice_tab

    Thanks in Advance
    Cheers!
    OraKid.

  2. #2
    Join Date
    Mar 2001
    Location
    Reading, U.K
    Posts
    598
    Thanks Guys.
    Its working.
    Cheers!
    OraKid.

  3. #3
    Join Date
    Jul 2007
    Posts
    1
    Hi Guys

    i am getting following error please help

    SP2-0642: SQL*Plus internal error state 2091, context 0:0:0 Unsafe to proceed

    Thanks and Regards
    Gopal

  4. #4
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    oerr SP2 642
    00642, 0, "SQL*Plus internal error state %lu, context %u:%u:%u\n"
    // *Cause: An internal error occurred.
    // *Action: Make a note of the message, then contact Oracle Support
    // Services.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width