11.5.10.2 to R12.2 Upgrade Script apidstln.sql Running For More Than 3 Hours (Doc ID 2177159.1)

Last updated on DECEMBER 30, 2016

Applies to:

Oracle Payables - Version 12.2 and later
Information in this document applies to any platform.
11.5.10.2 to R12.2 Upgrade script apidstln.sql Running For More Than 3 Hours

Symptoms

In Oracle Payables, apidstln.sql running since long as part of upgrade driver run (Upgrade from 11.5.10.2 to R12.2.0)

SQLID: 95xc571pvcrga
SQLTEXT: INSERT INTO AP_PREPAY_HISTORY_ALL (PREPAY_HISTORY_ID,
PREPAY_INVOICE_ID, PREPAY_LINE_NUM, ACCOUNTING_EVENT_ID, HISTORICAL_FLAG,
INVOICE_ID, ORG_ID, POSTED_FLAG, RELATED_PREPAY_APP_EVENT_ID,
TRANSACTION_TYPE, LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
CREATED_BY, CREATION_DATE, INVOICE_LINE_NUMBER, ACCOUNTING_DATE) SELECT /*+
ordered use_nl_with_index(AIL, AP_INVOICE_LINES_U1) */
AP_PREPAY_HISTORY_S.NEXTVAL, AIL.PREPAY_INVOICE_ID, AIL.PREPAY_LINE_NUMBER,
APH.ACCOUNTING_EVENT_ID, 'Y', APH.INVOICE_ID, APH.ORG_ID, APH.POSTED_FLAG,
APH.ACCOUNTING_EVENT_ID, DECODE(SIGN(APH.AMOUNT), -1, 'PREPAYMENT APPLIED',
'PREPAYMENT UNAPPLIED') TRANSACTION_TYPE, FND_GLOBAL.USER_ID LAST_UPDATED_BY,
SYSDATE LAST_UPDATE_DATE, FND_GLOBAL.CONC_LOGIN_ID LAST_UPDATE_LOGIN,
FND_GLOBAL.USER_ID CREATED_BY, SYSDATE CREATION_DATE,
APH.INVOICE_LINE_NUMBER, APH.ACCOUNTING_DATE FROM (SELECT /*+ ordered
rowid(AI) swap_join_inputs(UPG) use_nl_with_index(AID, AP_INVOICE_DISTRIB
UTIONS_U1) */ AID.ACCOUNTING_EVENT_ID, AID.INVOICE_ID, AID.ORG_ID,
AID.POSTED_FLAG, AID.AMOUNT, AID.INVOICE_LINE_NUMBER, AID.ACCOUNTING_DATE,
ROW_NUMBER() OVER (PARTITION BY AID.ACCOUNTING_EVENT_ID, AID.INVOICE_ID ORDER
BY INVOICE_LINE_NUMBER) RNUM FROM AP_INVOICES_ALL AI, XLA_UPGRADE_DATES UPG,
AP_INVOICE_DISTRIBUTIONS_ALL AID WHERE AI.ROWID BETWEEN :B2 AND :B1 AND
TRUNC(AI.GL_DATE) BETWEEN UPG.START_DATE AND UPG.END_DATE AND
AI.SET_OF_BOOKS_ID = UPG.LEDGER_ID AND AID.INVOICE_ID = AI.INVOICE_ID AND
AID.LINE_TYPE_LOOKUP_CODE = 'PREPAY' AND AID.ACCOUNTING_EVENT_ID IS NOT NULL)
APH, AP_INVOICE_LINES_ALL AIL WHERE AIL.INVOICE_ID = APH.INVOICE_ID AND
AIL.LINE_NUMBER = APH.INVOICE_LINE_NUMBER AND AIL.PREPAY_INVOICE_ID IS NOT
NULL AND APH.RNUM = 1

Changes

Upgrade

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms