Showing posts with label INVALID. Show all posts
Showing posts with label INVALID. Show all posts

Thursday, July 30, 2009

Invalid ICX, JG, JAI, AND OKL Objects After Patching

After applying AP patches one or all of the following objects are invalid:ICX_PO_VENDOR_SITES_V JG_AP_TAX_LINES_SUMMARY_V JG_PO_TAX_LINES_SUMMARY_V JG_PO_REQ_TAX_LINES_SUMMARY_V JG_PO_REL_TAX_LINES_SUMMARY_V JAI_AP_IA_TRIGGER_PKG JAI_AP_IDA_TRIGGER_PKG OKL_PAY_INVOICES_DISB_PVT
The following error messages are received when trying to recompile the invalids:
Errors for ICX_PO_VENDOR_SITES_V ORA-00904: "BANK_NUMBER": invalid identifier
Errors for JG_AP_TAX_LINES_SUMMARY_V'; ORA-00904: "POVS"."AP_TAX_ROUNDING_RULE": invalid identifier Errors for JG_PO_REL_TAX_LINES_SUMMARY_V ORA-00904: "POVS"."AP_TAX_ROUNDING_RULE": invalid identifier Errors for JG_PO_REL_TAX_LINES_SUMMARY_V ORA-00904: "POVS"."AP_TAX_ROUNDING_RULE": invalid identifier Errors for JG_PO_REQ_TAX_LINES_SUMMARY_ ORA-00904: "PRVS"."AP_TAX_ROUNDING_RULE": invalid identifier Errors for JG_PO_TAX_LINES_SUMMARY_V ORA-00904: "POVS"."AP_TAX_ROUNDING_RULE": invalid identifier
Errors for PACKAGE BODY JAI_AP_IA_TRIGGER_PKG: LINE/COL ERROR -------- ----------------------------------------------------------------- 86/7 PL/SQL: Statement ignored 86/28 PLS-00302: component 'CHECK_TOLERANCE_HOLD' must be declared
Errors for PACKAGE BODY JAI_AP_IDA_TRIGGER_PKG: LINE/COL ERROR -------- ----------------------------------------------------------------- 103/7 PL/SQL: Statement ignored 103/28 PLS-00302: component 'CHECK_TOLERANCE_HOLD' must be declared
Errors for PACKAGE BODY OKL_PAY_INVOICES_DISB_PVT: LINE/COL ERROR -------- ----------------------------------------------------------------- 675/10 PL/SQL: SQL Statement ignored 678/46 PL/SQL: ORA-00904: "PVS"."PAYMENT_METHOD_LOOKUP_CODE": invalid identifier 795/3 PL/SQL: Statement ignored 795/10 PLS-00364: loop index variable 'CUR_VENDOR_DTLS' use is invalid


This is because Various Payables and other patches have caused these objects to become invalid.

Follow the step below that pertains to the invalid package that is your issue:
1. Drop ICX_PO_VENDOR_SITES_V, this is an obsolete object.


2. To resolve JG_AP_TAX_LINES_SUMMARY_V
a) Download and review the readme for
Patch 7641584: UNABLE TO VALIDAT AN INVALID
OBJECT JG_AP_TAX_LINES_SUMMARY_V .


3. To resolve JG_PO_REL_TAX_LINES_SUMMARY_V, JG_PO_REQ_TAX_LINES_SUMMARY_V, and JG_PO_TAX_LINES_SUMMARY_V:
Download and review the readme for Patch 82019111OFF:7757644:12.0.4:12.0.4:INVALID JG OBJECTS.

4. For invalid packages; JAI_AP_IA_TRIGGER_PKG and JAI_AP_IDA_TRIGGER_PKG
Download and review the readme for Patch 7659470:1OFF:7612034:12.0.5:R12:ORA-4088: ERROR DURING EXECUTION OF TRIGGER 'AP

5. If JAI_AP_IDA_TRIGGER_PKG remains invalid after Patch 7659470, perform the following:
a) Download and review the readme for Patch 6708042

6) To resolve OKL_PAY_INVOICES_DISB_PVT
a) Download and review the readme for Patch 7662017: APPLICATION OF Patch 7596239 HAS CREATED 8 INVALID OBJECTS

Tuesday, January 13, 2009

Identifying and compiling invalid objects in Oracle applications:

Invalid objects can occur for many reasons. You will usually find invalid objects after upgrading, or applying patches Invalid objects are usually caused by missing grants, synonyms, views, tables or packages, but can also be caused by corrupted packages.
You should normally use DBA_OBJECTS for querying the invalid objects because it returns every object in the Database.


Use this command to find the number of invalid objects in database.

SELECT COUNT(*) FROM DBA_OBJECTS WHERE STATUS = 'INVALID';

For a more detailed query, use the following script:

SELECT OWNER, OBJECT_TYPE, COUNT(*) FROM DBA_OBJECTS WHERE STATUS = 'INVALID' GROUP BY OWNER, OBJECT_TYPE;

There are different ways to recompile invalid objects in schema.
1. DBMS_DDL

2. DBMS_UTILITY
3. UTL_RECOMP
4. UTLRP.SQL

DBMS_DDL
Syntax: Exec dbms_ddl.alter_compile(type,schema,name)
Where

Type : Must be procedure,function,package or package body.
Schema : Database username.
Name: Object name
Example:

Sql> exec dbms_ddl.alter_compile ('PROCEDURE','SCOTT','TEST');
PL/SQL procedure successfully completed.

DBMS_UTILITY:

This compiles the object in the specified schema.
Syntax

Exec dbms_utility.compile_schema ( schema,compile all)
Schema : Database Username

Compile All : Object type ( procedure, function, packages,trigger)
Example

SQL> exec dbms_utility.compile_schema('SCOTT');
PL/SQL procedure successfully completed

UTL_RECOMP
Syntax

Exec UTL_RECOMP.RECOMP_SERIAL ();
Example

SQL> Exec UTL_RECOMP.RECOMP_SERIAL ();
PL/SQL procedure successfully completed
Note: Required SYS user to run this package

UTLRP.SQL
Syntax

Located: $ORACLE_HOME/rdbms/admin
Example:

Sql> @$ ORACLE_HOME/rdbms/admin/utlrp.sql

Objects that requires recompilation are:VIEW, SYNONYM, PUBLIC SYNONYM, PROCEDURE, FUNCTION, PACKAGE, PACKAGE BODY, TRIGGER, UNDEFINED , JAVA CLASS, TYPE, TYPE BODY