dbms_stats.gather_schema_stats for XDB schema
Hi ,
we scheduled a nightly Job, to gather statistics for some schemas in the Prod-DB.
some times we get error, when this job is running for XDB schema.
begin
dbms_stats.gather_schema_stats ( ownname => 'XDB'
method_opt => 'FOR ALL COLUMNS SIZE AUTO',
options => 'GATHER AUTO');
end;
/
ORA-20000: Insufficient privileges to analyze an object in Schema
ORA-06512: at "SYS.DBMS_STATS", line 25335
ORA-06512: at "SYS.DBMS_STATS", line 25414
ORA-06512: at "SYS.DBMS_STATS", line 25367
but sometimes it succeeded !!
this happens only on XDB.
do u have an explain for that ?
is there an exception for XDB schema !