Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Count rows table of user schema

3600799Dec 9 2017 — edited Dec 11 2017

I work on an oracle db 11.2.0.4.0

I try to read number record of a schema.There are about 3.000 tables on this schema. I read that the classical statement

num_rows column in dba_tables  is true for the data time of the last analyze. So I try script as :

select

    table_name,

    to_number(

      extractvalue(

        xmltype(

dbms_xmlgen.getxml('select count(*) c from '||table_name))

        ,'/ROWSET/ROW/C')) count

  from user_tables;

show the list  of table but when I try do go to the bottom this messagge popup:

ORA-19202: Error during elaboration XML

ORA-00942: table or view not exists

ORA-06512: a "SYS.DBMS_XMLGEN", line 176

ORA-06512: at line 1

I am not understand what is happen .

There are other way to do a report with the number of the records ?

Thanks in adavantage to anyone wants to answer.

Dan

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 8 2018
Added on Dec 9 2017
13 comments
381 views