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;

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

  1. Oracle EBS Concurrent Request:Gather Schema Statistics[Z]

    Oracle EBS 的Concurrent Request"Gather Schema Statistics"是一个和性能相关的Concurrent Program,它会对表,列 ...

  2. FAQ: Automatic Statistics Collection (文档 ID 1233203.1)

    In this Document   Purpose   Questions and Answers   What kind of statistics do the Automated tasks ...

  3. Database Initialization Parameters for Oracle E-Business Suite Release 12 (文档 ID 396009.1)

    In This Document Section 1: Common Database Initialization Parameters For All Releases Section 2: Re ...

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

    在本文档中 本笔记介绍了在Oracle电子商务套件版本12.2中创建自定义应用程序所需的基本步骤.如果您要创建新表单,报告等,则需要自定义应用程序.它们允许您将自定义编写的文件与Oracle电子商务套 ...

  5. 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 Configurati ...

  6. RMAN restore fails with ORA-01180: can not create datafile 1 (文档 ID 1265151.1)

    http://blog.itpub.net/26655292/viewspace-2131269/ ########Q&A issue1:ORA-01180: can not create d ...

  7. 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, & ...

  8. solr schema.xml文档节点配置

    首先,讲解一下/usr/local/solr/collection1/conf/schema.xml的配置,此文档功能类似于配置索引数据库. Field:类似于数据库字段的属性(此文统一使用用“字段” ...

  9. 拆分ABBYY FineReader 12文档的方法

    处理大量多页文档时,通常都会首先扫描所有文档,然后才进行分析和识别.但是,要正确保留每个纸质文档的原始格式,ABBYY FineReader 12必须将每个文档作为单独 FineReader 文档进行 ...

随机推荐

  1. Python GUI中 text框里实时输出

    首先GUI中不同函数的局部变量的问题. 发现不同button定义的函数得到的变量无法通用. 通过global 函数内的变量可以解决这个问题 def openfiles2(): global s2fna ...

  2. delphi程序设计改进可读性一法

    Delphi,Lazarus程序设计改进一法 作者:steven QQ:1565498246 Delphi/Lazarus有一个思想就是方法.函数名调用,后边可以不使用括号(),比如调用函数Now,这 ...

  3. Servlet会话管理三(HttpSession)

    Session是服务器端技术,服务器在运行时可以为每一个用户的浏览器创建一个其独享的HttpSession对象.由于Session为浏览器用户所独享,所以用户在访问服务器的web资源时,可以把各自的数 ...

  4. 编程学习笔记(第四篇)面向对象技术高级课程:绪论-软件开发方法的演化与最新趋势(4)meta、元与元模型、软件方法的未来发展

    一.meta.元与元模型 1.元. ​ "元" 英语是 Meta,meta在不同的行业领域有不同的翻译,在 IT 领域一般来说 Meta 是翻译成元,主要因为在 IT 中Meta ...

  5. [规则原则定理]规则原则定理章1CAP原则

    CAP原则又称CAP定理,指的是在一个分布式系统中,Consistency(一致性). Availability(可用性).Partition tolerance(分区容错性),三者不可兼得 分布式系 ...

  6. clean

    启动tomcat 报 Could not delete D:/online/.metadata/.plugins/org.eclipse.wst.server.core/tm  

  7. SpringMVC学习笔记:数据的接收与返回

    SpringMVC的定义:Spring Web MVC is the original web framework built on the Servlet API and included in t ...

  8. Windows-universal-samples学习笔记系列四:Data

    Data Blobs Compression Content indexer Form validation (HTML) IndexedDB Logging Serializing and dese ...

  9. SLI的相关学习

    今天帮人安装前年的机皇-微星GT80S的操作系统,安装好后用鲁大师测试下跑分,发现双显卡和单显卡鲁大师的跑分竟然一样,就像副显卡根本没有工作,听主人所这台机器能跑到36万以上. 然后就苦逼的尝试,把B ...

  10. mybatis学习四 mybatis的三种查询方式

    <select id="selAll" resultType="com.caopeng.pojo.Flower"> select * from fl ...