set timing on;
exec fnd_stats.gather_schema_statistics ('GL',estimate_percent => dbms_stats.auto_sample_size,degree=>8,options=>'GATHER AUTO');
exec fnd_stats.gather_schema_statistics ('XLA,estimate_percent => dbms_stats.auto_sample_size',degree=>8,options=>'GATHER AUTO');
exec fnd_stats.gather_schema_statistics ('AP',estimate_percent => dbms_stats.auto_sample_size,degree=>8,options=>'GATHER AUTO');
exec fnd_stats.gather_schema_statistics ('FA',estimate_percent => dbms_stats.auto_sample_size,degree=>8,options=>'GATHER AUTO');
exec fnd_stats.gather_schema_statistics ('AR',estimate_percent => dbms_stats.auto_sample_size,degree=>8,options=>'GATHER AUTO');
exec fnd_stats.gather_schema_statistics ('CE',estimate_percent => dbms_stats.auto_sample_size,degree=>8,options=>'GATHER AUTO');
exec fnd_stats.gather_schema_statistics ('PA',estimate_percent => dbms_stats.auto_sample_size,degree=>8,options=>'GATHER AUTO');
exec fnd_stats.gather_schema_statistics ('CUX',estimate_percent => dbms_stats.auto_sample_size,degree=>8,options=>'GATHER AUTO');
exec fnd_stats.gather_schema_statistics ('ALL',estimate_percent => dbms_stats.auto_sample_size,degree=>8,options=>'GATHER AUTO');
exec fnd_stats.gather_schema_statistics ('GL',estimate_percent => 100,degree=>8,options=>'GATHER AUTO');
exec fnd_stats.gather_schema_statistics ('XLA,estimate_percent => 100',degree=>8,options=>'GATHER AUTO');
exec fnd_stats.gather_schema_statistics ('AP',estimate_percent => 100,degree=>8,options=>'GATHER AUTO');
exec fnd_stats.gather_schema_statistics ('FA',estimate_percent => 100,degree=>8,options=>'GATHER AUTO');
exec fnd_stats.gather_schema_statistics ('AR',estimate_percent => 100,degree=>8,options=>'GATHER AUTO');
exec fnd_stats.gather_schema_statistics ('CE',estimate_percent => 100,degree=>8,options=>'GATHER AUTO');
exec fnd_stats.gather_schema_statistics ('PA',estimate_percent => 100,degree=>8,options=>'GATHER AUTO');
exec fnd_stats.gather_schema_statistics ('CUX',estimate_percent => 100,degree=>8,options=>'GATHER AUTO');
exec fnd_stats.gather_schema_statistics ('ALL',estimate_percent => 100,degree=>8,options=>'GATHER AUTO');
11g建议使用DBMS_STATS.AUTO_SAMPLE_SIZE,维护窗口内,尽可能按照100%完成自动采样,若100%的方式不适合,则会at least采用30%的采样比例。并且强调了11g采用了HASH算法,计算统计信息,因此几乎在所有场景下,性能都不是问题。
1. 9i中ESTIMATE_PERCENT默认100%。
2. 10g中ESTIMATE_PERCENT默认为DBMS_STATS.AUTO_SAMPLE_SIZE,一个非常非常小的数,通常会造成poor的统计信息,因此并不建议使用AUTO。
3. 11g中ESTIMATE_PERCENT默认为DBMS_STATS.AUTO_SAMPLE_SIZE,但由于其采用了一种新的HASH算法,倾向于默认100%采样,其性能要比9i和10g中更优,因此一般情况下,建议使用DBMS_STATS.AUTO_SAMPLE_SIZE,由Oracle来自主选择采样比例。
GATHER AUTO重新分析当前没有统计的对象,以及统计数据过期(变脏)的对象。注意,使用GATHER AUTO类似于组合使用GATHER STALE和GATHER EMPTY。 注意,无论GATHER STALE还是GATHER AUTO,都要求进行监视。如果执行一个alter table xxx monitoring命令,Oracle会用dba_tab_modifications视图来跟踪发生变动的表。这样一来,就确切地知道,自从上一次分析统计数据以来,发生了多少次插入、更新和删除操作。
ORA-20005 WHEN GATHERING STATISTICS FOR EBS <APPS> schema 11i or R12 IN Database 10G or 11G (Doc ID 375351.1)
ORA-20005: Object Statistics Are Locked (stattype = ALL) ORA-06512: At "APPS.FND_STATS" (Doc ID 2431009.1)
set lines 200 pages 5000
select owner, table_name, stattype_locked from dba_tab_statistics where stattype_locked is not null;
select owner, table_name, stattype_locked from dba_tab_statistics where owner = 'APPLSYS' and stattype_locked is not null;
--SQL> exec dbms_stats.unlock_schema_stats ('AR');
--SQL> exec dbms_stats.unlock_table_stats('AR', 'AR_REV_REC_QT');
exec dbms_stats.unlock_table_stats('APPLSYS','AQ$_WF_CONTROL_P');
exec dbms_stats.unlock_table_stats('ASO','ASO_ORDER_FEEDBACK_T');
https://blog.csdn.net/bisal/article/details/74931933
https://blog.csdn.net/viviliving/article/details/103739400
ORA-20005: Object Statistics Are Locked (stattype = ALL) ORA-06512: At "APPS.FND_STATS"
未经允许不得转载:徐万新之路 » ORA-20005: Object Statistics Are Locked (stattype = ALL) ORA-06512: At "APPS.FND_STATS"
相关推荐
- ORACLE 临时表空间使用率过高的原因及解决方案(转)
- EBS s_oc4j_sesstimeout配置和ICX:会话超时时间
- EBS Cloning 更改颜色Java 色彩设计
- cursors.sql
- Oracle EBS 主要模块中文名称及英文缩写
- Oracle E-Business Suite Installation and Upgrade Notes Release 12 (12.2)
- Oracle E-Business Suite Release 12.2 Critical Patch Update 2024
- How To Download And Install The Latest OPatch(6880880) Version (Doc ID 274526.1)
最新评论
这个牛
放下欲望,男人从来不醉,充分且必要
勇气、责任、自信、创新,为天下先!
软件即数据,软件即服务,软件即管理,软件就是对人类各种社会活动的仿真和记录。软件很重要,但软件不可能凌驾于业务之上,尤其不可能高人一等。