DBMS_STATS.GATHER_SCHEMA_STATS [message #120067] |
Tue, 17 May 2005 10:42 |
kapil2005
Messages: 44 Registered: March 2005
|
Member |
|
|
I am getting following error message when i run a procedure and all it does is run DBMS_STATS.gather_schema_stats(ownname =>'SOMEUSER', estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE, cascade => TRUE);
BEGIN SYSTEM.ANAL_SCHEMAS; END;
*
ERROR at line 1:
ORA-20000: Insufficient privileges to analyze an object in Schema
ORA-06512: at "SYS.DBMS_STATS", line 10156
ORA-06512: at "SYS.DBMS_STATS", line 10324
ORA-06512: at "SYS.DBMS_STATS", line 10378
ORA-06512: at "SYS.DBMS_STATS", line 10355
ORA-06512: at "SYSTEM.ANAL_SCHEMAS", line 22
ORA-06512: at line 1
When i run the "DBMS_STATS.gather_schema_stats(ownname =>'SOMEUSER', estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE, cascade => TRUE);" manually from sqlplus it executes successfully with any problems.
anyone has any idea? i was wondering, if the pinned tables would cause this? i have some tables pinned and packages kept in shared_pool. and these objects are owned by someuser and system runs this procedure.
Thank you,
Kapil
|
|
|
|
|
|
|
Re: DBMS_STATS.GATHER_SCHEMA_STATS [message #120111 is a reply to message #120067] |
Tue, 17 May 2005 16:14 |
kapil2005
Messages: 44 Registered: March 2005
|
Member |
|
|
Well all users in this database are having these privs
ANALYZE ANY
SELECT ANY TABLE
SELECT ANY SEQUENCE
SELECT ANY DICTIONARY
and many other privs that are necessary to connect and access database. and oracle version is 92060. anyways it worked with CASCADE=False, so i am going to gather statistics in old way.
Thank you for your quick responses and your time.
Kapil
|
|
|