1

In Oracle 12c, I have a table created with sharing = metadata. Following are the sql statements:

create table fedcommusr.md_commtab1 sharing=metadata
(deptno number, dname varchar2(100));
insert into fedcommusr.md_commtab1 values (1, 'One');
insert into fedcommusr.md_commtab1 values (2, 'Two');
comment on column fedcommusr.md_commtab1.deptno is 'department number';
comment on column fedcommusr.md_commtab1.dname is 'Department name is';

Executed the DBMS_STATS as follows:

exec DBMS_STATS.GATHER_SCHEMA_STATS(ownname=>'FEDCOMMUSR');

Following is the query executed to obtain the num_rows

select owner,table_name, NUM_ROWS from dba_tables where owner like upper('%fed%') ; 

and output is as follows:

FEDCOMMUSR  MD_COMMTAB1 (null)

Why are the num_rows not updated ?

Vishnu
  • 479
  • 1
  • 3
  • 14

1 Answers1

1

In 12.2 latest RU I tested and have no problem: stats gathered and visible on application root as well as application PDB. You can trace statistics gathering with dbms_stats.set_global_prefs('trace',1+4) and set serveroutput on to show it. Regards, Franck.

FranckPachot
  • 414
  • 4
  • 10