ORA-19202, ORA-01031 Raised by Calling SYS.DBMS_XMLGEN (Doc ID 1948758.1)

Last updated on FEBRUARY 08, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.3 to 12.1.0.1 [Release 11.2 to 12.1]
Information in this document applies to any platform.

Symptoms

Executing the query

SELECT TABLE_NAME, TABLESPACE_NAME, OWNER, count  as TABLE_ROW_COUNT , 0 TABLE_SIZE
FROM
(select all_tables.tablespace_name, all_tables.table_name, all_tables.owner, to_number
(extractvalue(xmltype(dbms_xmlgen.getxml('select count(*) c from ' ||
'"'||all_tables.owner||'"."'||all_tables.table_name||'"')),'/ROWSET/ROW/C')) count
from all_tables
where all_tables.owner IN (SELECT SCHEMA_NAME FROM ENITMON.ESHQID_DB_SCHEMA_DIM where UPPER(INSTANCE_NAME)='EWHPWRP3')
and all_tables.tablespace_name not in ('USERS','SYSAUX')
and (all_tables.table_name like ('I%') or all_tables.table_name like ('K%') or all_tables.table_name like ('L%') or all_tables.table_name like ('M%') or all_tables.table_name like ('N%') or all_tables.table_name like ('O%') )
)

raises
ORA-19202: Error occurred in XML processing
ORA-01031: insufficient privileges
ORA-06512: at "SYS.DBMS_XMLGEN", line 176



Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms