2020年12月1日 星期二

Oracle EBS: 已有執行ad_ctx_ddl.sync_index('APPLSYS.FND_LOBS_CTX'), 但修改org item時, 存檔仍需數分鐘才完成

問題: 已有執行ad_ctx_ddl.sync_index('APPLSYS.FND_LOBS_CTX'), 但修改org item時, 存檔仍需數分鐘才完成


狀況:

1.CTXSYS.CTX_PENDING只有數百筆, select速度極快

2.CTXSYS.DR$WAITING有3萬多筆, 但select耗時近30秒, 即使table沒資料時也是同樣狀況


解決方案: 要執行alter table ctxsys.DR$WAITING move


--steps A

begin

      ad_ctx_ddl.sync_index('APPLSYS.FND_LOBS_CTX');

 end;

--steps B

alter table ctxsys.DR$WAITING move


ALTER TABLE CTXSYS.DR$WAITING SHRINK SPACE


減少CTXSYS.DR$WAITING,CTXSYS.DR$PENDING table中筆數的方法:


connect as ctxsys:


 select u.username, i.idx_name

 from dr$index i, dba_users u

 where u.user_id=i.idx_owner#

 and idx_id in (select pnd_cid from ctxsys.dr$pending);


exec ctx_ddl.sync_index('USERNAME.INDEX');



Ref:

1.请教:在新建物料和修改物料时非常慢是什么原因

http://www.itpub.net/thread-1440660-1-1.html


2.Can Users Manually Shrink DR$WAITING And DR$PENDING in the CTXSYS schema? (Doc ID 2447229.1)


3.E-Business Suite Applications Technology Stack Database Contains Millions Of Records In CTXSYS.DR$PENDING And CTXSYS.DR$WAITING Tables (Doc ID 382809.1)


2020年11月30日 星期一

Oracle EBS: Script To Split An Order Line

set serveroutput on

DECLARE

 l_header_rec OE_ORDER_PUB.Header_Rec_Type;

 l_line_tbl OE_ORDER_PUB.Line_Tbl_Type;

 l_action_request_tbl OE_ORDER_PUB.Request_Tbl_Type;

 l_header_adj_tbl OE_ORDER_PUB.Header_Adj_Tbl_Type;

 l_line_adj_tbl OE_ORDER_PUB.line_adj_tbl_Type;

 l_header_scr_tbl OE_ORDER_PUB.Header_Scredit_Tbl_Type;

 l_line_scredit_tbl OE_ORDER_PUB.Line_Scredit_Tbl_Type;

 l_request_rec OE_ORDER_PUB.Request_Rec_Type ;

 l_return_status VARCHAR2(1000);

2020年11月27日 星期五

Oracle EBS: ICX_CAT_ITEMS_CTX_DTLS_TLP table資料量大的處理方法

問題: 在查看org item存檔速度問題時, 發現ICX_CAT_ITEMS_CTX_DTLS_TLP的資料有2G, 超過1700萬筆, 因此找了purge的方法(雖然事後證實這與現有存檔速度問題無關)



作法: 


1. Go into the responsibility: Purchasing.


2. Navigate to Reports / Run / Single Request


3. Execute Purge Catalog Intermedia Index (ICXPCIIP)


4. Create Index on ICX_CAT_ITEMS_CTX_DTLS_TLP 


a) Creating index


create index ICX.XX_ICX_CAT_ITEMS_CTX_TLP_99 on ICX.ICX_CAT_ITEMS_CTX_DTLS_TLP (INVENTORY_ITEM_ID,ORG_ID,LANGUAGE,SEQUENCE) online compute statistics parallel 8;


b) Disabling parallel on an index (example):


ALTER INDEX ICX.XX_ICX_CAT_ITEMS_CTX_TLP_99 NOPARALLEL;


c) Gathering stats on a table (example):


Exec fnd_stats.gather_table_stats('ICX','ICX_CAT_ITEMS_CTX_DTLS_TLP',100);



Ref:

1.Performance Issue with INVIDITM.fmb or INCOIN Involving ICX_CAT_ITEMS_CTX_DTLS_TLP (Doc ID 1925118.1)



2020年10月31日 星期六

修正ra_interface_lines_all中資料以重新作autoinvoice

修正ra_interface_lines_all中資料以重新作autoinvoice

1.確認Auto Invoice程式未在執行中

2.清除ra_inteface_lines_all中的flag並commit

UPDATE ra_interface_lines_all
    SET interface_line_id = NULL,
        customer_trx_id = NULL,
        request_id = NULL,
        link_to_line_id = NULL,
        interface_status  = null
  WHERE NVL (interface_status, 'x') != 'P';

 3.重新執行AutoInvoice

 

Ref:

1.AutoInvoice: "Stuck in the Interface" issue

http://oraclapps.blogspot.com/2019/07/autoinvoice-stuck-in-interface-issue.html

 

2.Troubleshooting AutoInvoice: "Stuck in the Interface" issues: Interface line not created in AR and no error is showing in the interface (Doc ID 1146573.1)

 

Oracle EBS: 批次將concurrent產出之output更名為所需之PO PDF

 針對以程式批次產出之PO PDF output, 整批進行更名並下載.


1.找出request_id與其中PO之關聯, 取得PO number

2.組出如下內容, 存檔為cp_po.sh

cp -p o172681076.out /tmp/pdf_file/3200244536.pdf

cp -p o172681077.out /tmp/pdf_file/3200244557.pdf

cp -p o172681078.out /tmp/pdf_file/3200244558.pdf

cp -p o172681079.out /tmp/pdf_file/3200244559.pdf

cp -p o172681080.out /tmp/pdf_file/3200244564.pdf

cp -p o172681081.out /tmp/pdf_file/3200244566.pdf

3.執行cp_po.sh

4.下載/tmp/pdf_file中的PDF檔案