Friday 26 February 2016

Gather Schema Statistics Is Failing With ORA-20000 Error For Tables Ending With _TAB

Issue:

 FDPSTP failed due to ORA-20000: Unable to analyze TABLE "APPS"."COSTPARAMETERS1358_TAB", insufficient privileges or does not exist
ORA-06512: at "APPS.FND_STATS", line 2457
ORA-06512: at line 1

Cause:

Several tables were created with quotes around their names (all ended with _TAB) during upgrade
however Gather Schema Statistics program (FNDGSCST) does not recognize them and fails.

The csrrsreg.sql script belongs to "Oracle Scheduler" product (CSR)
It registers the XML Schema for Scheduler Rules and creates the
relevant CSR_RULES_B database object to store Scheduler Rules.
It seems that _TAB tables were generated by this script.

Fix: 

*) A simple solution consists in renaming the tables (i.e. removing the quotes), for instance:

alter table "costParameters1358_TAB" rename to costParameters1358_TAB;

However it is recommended to open a new SR with "Oracle Scheduler" product (CSR) team
to validate this solution and to confirm that script csrrsreg.sql is well the cause of this issue.

*) As a workaround the offending tables can be excluded from running statistics.


1. Retrieve the Application ID by running the SELECT statement below:

select application_id from fnd_tables where table_name = <'exact table name'> ;

2. Run the following script once for each table to insert a record
corresponding to it in FND_EXCLUDE_TABLE_STATS, for example:

Begin
fnd_stats.load_xclud_tab('INSERT',<application_id from step 1>,'costParameters1358_TAB');
End;

Check FND_EXCLUDE_TABLE_STATS table has entry of costParameters1358_TAB or "costParameters1358_TAB".


3. Re-run the Gather Schema Statistics or Gather Table Statistics program.

Ref: (Doc ID 1520146.1)

No comments:

Post a Comment