ORA-20011: Approximate NDV failed: ORA-08103: object no longer exists

Hi,

When I run the DBMS_STATS as parallel , I got ” ORA-20011: Approximate NDV failed: ORA-08103: object no longer exists ” error.

 

ORA-20011: Approximate NDV failed

Details of error are as follows.

begin
dbms_stats.gather_table_stats(
ownname => 'MSDBA',
tabname => 'TEST_PARTITONED_TABLE',
estimate_percent => dbms_stats.auto_sample_size,
degree => 96,
granularity =>'ALL'
);
end;
Error at line 1
ORA-20011: Approximate NDV failed: ORA-08103: object no longer exists
ORA-06512: at "SYS.DBMS_STATS", line 40751
ORA-06512: at "SYS.DBMS_STATS", line 40035

 

 

ORA-08103: object no longer exists

 

This error is related with Partitioned table and Parallel execution on Cluster Nodes.

 

ORA-06512: at “SYS.DBMS_STATS”

To solve this problem, You can run the same SQL as follows.

 

set the following trace events, then run the same SQL as follows.

alter session set events '10384 trace name context forever , level 16384';

 

SQL> alter session set events '10384 trace name context forever , level 16384';

Session altered.

SQL> ALTER SESSION SET PARALLEL_FORCE_LOCAL=TRUE;

Session altered.

SQL> begin
dbms_stats.gather_table_stats(
ownname => 'MSDBA',
tabname => 'TEST_PARTITONED_TABLE',
estimate_percent => dbms_stats.auto_sample_size,
degree => 96,
granularity =>'ALL'
);
end;
/

PL/SQL procedure successfully completed.

 

Or the second Case’s solution is as follows.

1. Set granularity to ‘PARTITION’:

— Globally :

    SQL> exec dbms_stats.set_global_prefs(pname=>’GRANULARITY’,pvalue=>’PARTITION’)

or

— Just for the table:

  SQL> exec dbms_stats.set_table_prefs(ownname=>’Owner_Name’,tabname=>'<Table_Name>’,pname=>’GRANULARITY’,pvalue=>’PARTITION’)

Or

 

2. Gather statistics after DDL and DML’s have been completed.

 

Do you want to learn Oracle Database for Beginners, then read the following articles.

Oracle Tutorial | Oracle Database Tutorials for Beginners ( Junior Oracle DBA )

 985 views last month,  1 views today

About Mehmet Salih Deveci

I am Founder of SysDBASoft IT and IT Tutorial and Certified Expert about Oracle & SQL Server database, Goldengate, Exadata Machine, Oracle Database Appliance administrator with 10+years experience.I have OCA, OCP, OCE RAC Expert Certificates I have worked 100+ Banking, Insurance, Finance, Telco and etc. clients as a Consultant, Insource or Outsource.I have done 200+ Operations in this clients such as Exadata Installation & PoC & Migration & Upgrade, Oracle & SQL Server Database Upgrade, Oracle RAC Installation, SQL Server AlwaysOn Installation, Database Migration, Disaster Recovery, Backup Restore, Performance Tuning, Periodic Healthchecks.I have done 2000+ Table replication with Goldengate or SQL Server Replication tool for DWH Databases in many clients.If you need Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS Consultancy and Training you can send my email adress [email protected].-                                                                                                                                                                                                                                                 -Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS ve linux Danışmanlık ve Eğitim için  [email protected] a mail atabilirsiniz.

Leave a Reply

Do NOT follow this link or you will be banned from the site!