11i - 12 Gather Schema Statistics fails with Ora-20001 errors after 11G database Upgrade (文档 ID 781813.1)

11i - 12 Gather Schema Statistics fails with Ora-20001 errors after 11G database Upgrade (文档 ID 781813.1) 转到底部

In this Document

  Symptoms
  Changes
  Cause
  Solution

APPLIES TO:

Oracle Applications Technology Stack - Version 11.5.10.2 to 12.1.3 [Release 11.5.10 to 12.1]
Oracle EBS Applications Performance - Version 12.1.1 to 12.1.1 [Release 12.1]
Information in this document applies to any platform.
Oracle Server Enterprise Edition - Version: 11.1.0.6 to 11.1.0.8

SYMPTOMS

"Gather Schema Statistics" program reported following errors in request log files:

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***

Error #4: ERROR: While GATHER_TABLE_STATS:  object_name=FII.FII_FIN_ITEM_HIERARCHIES***ORA-20001: invalid column name or duplicate columns/column groups/expressions in method_opt***

CHANGES

Problem started after database has been upgraded to 11G.

CAUSE

There are two reasons for that error message:

1 ) There are duplicate rows on FND_HISTOGRAM_COLS table for JE_BE_LINE_TYPE_MAP table.
Because of this problem, FND_STATS tries to gather histogram information using wrong command and
it fails with ora-20001 errors.

The following SQL should return one row, not two:

SQL>select column_name, nvl(hsize,254) hsize
from FND_HISTOGRAM_COLS 
where table_name = ‘JE_BE_LINE_TYPE_MAP‘
order by column_name;

COLUMN_NAME HSIZE
------------------------------ ----------
SOURCE 254
SOURCE 254

Since there are two rows in histograms table, FND_STATS creates following command to gather statistics on table ‘JE_BE_LINE_TYPE_MAP‘ :

dbms_Stats.gather_table_stats(OWNNAME => ‘GL‘, TABNAME 
=>‘JE_BE_LINE_TYPE_MAP‘,METHOD_OPT=>‘FOR ALL COLUMNS SIZE 1 FOR COLUMNS SOURCE SIZE 254 FOR 
COLUMNS SOURCE SIZE 254‘);

Above command will work on 9i and 10G databases but it will fail with ora-20001 errors on 11G.

2) Column does not exist on the table but still listed in FND_HISTOGRAMS_COL table.

You can use following SQL to identify. SQL will prompt for table name, use table name from the errors. In above examples you can use FII_FIN_ITEM_HIERARCHIES.

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;

SOLUTION

Find out all duplicates and/or obsolete rows in FND_HISTOGRAM_COLS and delete one of them logged in as the applsys user.
Remember to take backup of the FND_HISTOGRAM_COLS table before deleting any data.

-- 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;

时间: 2024-10-22 21:48:56

11i - 12 Gather Schema Statistics fails with Ora-20001 errors after 11G database Upgrade (文档 ID 781813.1)的相关文章

FAQ: Automatic Statistics Collection (文档 ID 1233203.1)

In this Document   Purpose   Questions and Answers   What kind of statistics do the Automated tasks collect   How do I revert to a previous set of statistics?   Does the automatic statistic collection jobs populate CHAIN_CNT?   11g+ Automatic Mainten

在Oracle电子商务套件版本12.2中创建自定义应用程序(文档ID 1577707.1)

在本文档中 本笔记介绍了在Oracle电子商务套件版本12.2中创建自定义应用程序所需的基本步骤.如果您要创建新表单,报告等,则需要自定义应用程序.它们允许您将自定义编写的文件与Oracle电子商务套件提供的标准种子功能分离.在向您的环境应用修补程序或执行升级时可以保留自定义设置. 自定义数据和索引表空间默认为APPS_TS_TX_DATA和APPS_TS_TX_IDX. 注意:当没有活动的修补程序周期时,应在运行文件系统上执行本文档中描述的过程. 也可以按照此过程更正先前创建的不使用AD Sp

Deploying JRE (Native Plug-in) for Windows Clients in Oracle E-Business Suite Release 12 (文档 ID 393931.1)

In This Document Section 1: Overview Section 2: Pre-Upgrade Steps Section 3: Upgrade and Configuration Section 4: Post-installation Steps Section 5: Known Issues Section 6: Appendices This document covers the procedure to upgrade the version of the J

11i - 12 How To Set Email Style Preference For All Users At Once?

(文档 ID 578574.1) In this Document   Goal   Solution   Workflow Information Center, Diagnostics, & Community   References APPLIES TO: Oracle Workflow Cartridge - Version 11.5.9 to 12.2 [Release 11.5 to 12.2]Information in this document applies to any

XML文档类型定义---XML Schema结构

5.1 Schema概述 XML Schema是2001年5月正式发布的W3C的推荐标准,经过数年的大规模讨论和开发如今终于尘埃落定,成为全球公认的XML环境下首选的数据建模工具. 使用DTD虽然带来较大的方便,但是,DTD存在一些缺陷:一是它用不同于XML的语言编写,需要不同的分析器技术.这增加了工具开发商的负担,降低了软件瘦身的可能性,此外开发人员需要多学一门语言及其语法.而XML Schema是按标准XML规则编写的,更容易掌握.二是DTD不支持名称空间.随着大部分的数据处理日益以XML为

20140602-XML之Schema文档学习笔记

20140602-XML之Schema文档学习笔记 一.Schema约束 几个重要知识: 1.namespace 相当于schema文件的id.Namespace是一个概念,并没有这个属性. 2.targetNamespace属性 注意:这个属性只在schema文档中出现.用来指定schema文档的namespace的值. 3.xmlns属性(非常重要,用于引入一个约束) 引入一个约束,它的值是一个schema文档的targetNamespace值(确切地说,是targetNamespace的属

关于Spring配置文件xml文档的schema约束

最开始使用spring框架的时候,对于其配置文件xml,只是网上得知其使用方法,而不明其意.最近想着寻根问底的探究一下.以下是本文主要内容: 1.配置文件示例. [html] view plain copy print? <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:m

2.10 环境变量PATH 2.11 cp命令 2.12 mv命令 2.13 文档查看cat/more/less/head/tail

2.10 环境变量PATH 2.11 cp命令 2.12 mv命令 2.13 文档查看cat/more/less/head/tail 2.10 环境变量PATH 如果你的目录在这里面 那么你敲命令句不需要敲绝对路径 但是如果再打开一个终端, 怎么让永久生效呢 系统有一个文件,是可以让它开机 或者是每次打开终端 都回去加载命令的 cat 一下看下文件有没有加上 命令 再打开一个终端 也是可以的 如果先取消掉 就重新改下变量PATH 还可以把里面的命令删掉 vi /etc/profile 重新退出

hbase0.96与hive0.12整合文档

本文所用环境为3台hadoop2.2,hbase已经安装完毕,具体安装可参照前两篇文章. hive适用的元数据库为mysql,所以master上要安装mysql,用系统自带的即可,这里不在详述. (1)安装hive 解压 # tar zvxf hive-0.12.0.tar.gz -C /usr # cd /usr # mv hive-0.12.0 hive 2.替换jar包,保持hbase0.96与hadoop2.2一致 # cd /usr/hive/lib # rm -rf hbase-0.