Search This Blog

Thursday, October 20, 2016

Gather schema statistics failed for all schemas in R12.2

Hello DBA's,

Gather schema statistics (GSS) is completing with error in all our instances. GSS is really critical for concurrent performance and this should run periodically to gain performance for concurrent programs.

EBS - 12.2.3
DB - 11.2.0.3

Issue #1 :

+---------------------------------------------------------------------------+

Current system time is 16-OCT-2016 14:23:48

+---------------------------------------------------------------------------+

**Starts**16-OCT-2016 14:23:49
**Ends**16-OCT-2016 15:22:43
ORA-0000: normal, successful completion
+---------------------------------------------------------------------------+
Start of log messages from FND_FILE
+---------------------------------------------------------------------------+
In GATHER_SCHEMA_STATS , schema_name= ALL percent= 40 degree = 8 internal_flag= NOBACKUP
stats on table AQ$_WF_CONTROL_P is locked
stats on table GAT_REQ_QTBL is locked
Error #1: ERROR: While GATHER_TABLE_STATS:
object_name=GL.JE_BE_LINE_TYPE_MAP***ORA-20001: invalid column name or duplicate columns/column groups/expressions in method_opt***
Error #2: ERROR: While GATHER_TABLE_STATS:
object_name=GL.JE_BE_LOGS***ORA-20001: invalid column name or duplicate columns/column groups/expressions in method_opt***
Error #3: ERROR: While GATHER_TABLE_STATS:
object_name=GL.JE_BE_VAT_REP_RULES***ORA-20001: invalid column name or duplicate columns/column groups/expressions in method_opt***
+---------------------------------------------------------------------------+
End of log messages from FND_FILE
+---------------------------------------------------------------------------+

Issue #2 :

**Starts**16-OCT-2016 14:19:20
**SQL error and free**16-OCT-2016 14:19:21
ORACLE error 20001 in FDPSTP

Cause: FDPSTP failed due to ORA-20001: invalid column name or duplicate columns/column groups/expressions in method_opt
ORA-06512: at "APPS.FND_STATS", line 2680
ORA-06512: at line 1
.

The SQL statement being executed at the16-OCT-2016 14:19:21
+---------------------------------------------------------------------------+
Start of log messages from FND_FILE
+---------------------------------------------------------------------------+
ORA-20001: invalid column name or duplicate columns/column groups/expressions in method_opt
+---------------------------------------------------------------------------+
End of log messages from FND_FILE
+---------------------------------------------------------------------------+

Recommended fix :

Gather Schema Statistics Failing for GL Tables, GL.JE_BE_LINE_TYPE_MAP***ORA-20001: invalid column name (Doc ID 2112879.1)

Fix fo Issue #1 :

Patch 22259917: FND_STATS.RESTORE_SCHEMA_STATS FOR ALL SCHEMA IS FAILED

Fix for Issue #2 : 

Below is applied in test (8033) and this issue is fixed now. We are good to apply it in production.

-- identify duplicate rows

select table_name, column_name, count(*)
from FND_HISTOGRAM_COLS
group by table_name, column_name
having count(*) > 1;

-- Use above results on the following SQL to delete duplicates

delete from FND_HISTOGRAM_COLS
where table_name = '&TABLE_NAME'
and  column_name = '&COLUMN_NAME'
and rownum=1;

-- Use following SQL to delete obsoleted rows

delete from FND_HISTOGRAM_COLS
where (table_name, column_name) in
  (
   select hc.table_name, hc.column_name
   from FND_HISTOGRAM_COLS hc , dba_tab_columns tc
   where hc.table_name  ='&TABLE_NAME'
   and hc.table_name= tc.table_name (+)
   and hc.column_name = tc.column_name (+)
   and tc.column_name is null
  );

commit;

Re-run GSS and test. fix worked successfully for our env.

No comments:

Post a Comment

You cannot complete this task because one of the following events caused a loss of page data: A system failure has occurred "Front end is locked after 12.2 upgrade"

  If you have upgraded to Oracle E-Business Suite 12.2.10 Release Update Pack from Oracle E-Business Suite 12.2.6 Release Update Pack (or ea...