I am trying to use the DBMS_STATS package to analyze do a schema level analyze....this job that calls the stats package is executed by a user who is not the the owner of the schema being analyzed. I have granted the user who is running the DBMS_STATS the analyze any privilege however the job keeps failing with:
ORA-01031: insufficient privileges
ORA-06512: at "SYS.DBMS_STATS"
errors.........do I need to assign other priviliges...has any one had similar problems when trying to run this package...please help
why don't you use dbms_utility.analyze_schema ???
for your problem, I guess the user hasn't been granted execute on the DBMS_STATS package ...
Create a Synonym-grant with Execute permission
Hi, 25th April 2001 18:12 hrs chennai
As PIPO has said see whether you have given the execute permission to the user who is executing the DBMS_STATS.
or else you can also do like this create a Public synonym and grant the same to the user with execute permission.
Attitude:Attack every problem with enthusiasam ...as if your survival depends upon it
Click Here to Expand Forum to Full Width